RecordLinkageRule#

class RecordLinkageRule#

RecordLinkageRule class. Describes a rule in the record linkage process.

get_field_rule_type(self: pyhelayers.RecordLinkageRule, field_name: str) pyhelayers.RecordLinkageRuleType#

Get the rule type of a given field

Parameters:

field_name – name of the field

get_field_shingles_size(self: pyhelayers.RecordLinkageRule, field_name: str) int#

Get the shingles size generated for a given field

Parameters:

field_name – name of the field

get_field_shingles_weight(self: pyhelayers.RecordLinkageRule, field_name: str) int#

Get the shingles weight generated for a given field

Parameters:

field_name – name of the field

set_field(self: pyhelayers.RecordLinkageRule, field_name: str, type: pyhelayers.RecordLinkageRuleType, shingles_weight: int = 1, shingles_size: int = 5) None#

Set a rule for a specific field

Parameters:
  • field_name – the name of the field to be set. The field must appear in the RecordLinkageConfig object given to the c’tor

  • type – rule type to apply for the given field

  • shingles_weight – if given rule is RL_RULE_SIMILAR, sets the weight of the shingle generated by that rule

  • shingles_size – if given rule is RL_RULE_SIMILAR, sets the size of the shingles generated by that rule