Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatically check how many components are defined in rl.Compare() #201

Open
bergen288 opened this issue Nov 28, 2023 · 0 comments
Open

Comments

@bergen288
Copy link

I have the following function to define recordlinkage indexer and comparer. there are 2 components define by rl_comparer.exact and rl_comparer.string and I have to manually define 'component_number' as 2. Is there a way to automatically check how many components are defined and set it as 'component_number' in return set?

def rl_config_wex():
    rl_indexer = rl.Index()
    rl_comparer = rl.Compare()
    rl_indexer.block('postal_code')
    rl_comparer.exact('street_number', 'street_number', label="street_number")
    rl_comparer.string('street_name', 'street_name', threshold=0.8, label="street_name")
    return {'rl_indexer': rl_indexer, 'rl_comparer': rl_comparer, 'component_number': 2}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant