RecordLinkageConfig#
- class RecordLinkageConfig#
RecordLinkageConfig class with record field definitions and various tunings of the Record-Linkage algorithm and heuristics.
- get_fields_names(self: pyhelayers.RecordLinkageConfig) list #
Get the fields names in order
- get_name_field_name(self: pyhelayers.RecordLinkageConfig) str #
Get the name of the name field (used by some specific name related heuristics).
- get_num_bands(self: pyhelayers.RecordLinkageConfig) int #
Get the number of bands used by the min-hash algorithm
- get_size_bands(self: pyhelayers.RecordLinkageConfig) int #
Get the number of hashes per band used by the min-hash algorithm
- get_verbosity(self: pyhelayers.RecordLinkageConfig) pyhelayers.Verbosity #
Get the Verbosity level.
- is_fully_initialized(self: pyhelayers.RecordLinkageConfig) bool #
Returns true if all required fields are set
- set_num_bands_and_size_bands(self: pyhelayers.RecordLinkageConfig, num_bands: int, size_bands: int) None #
Set the number of bands and the number of hashes per band, used by the min-hash algorithm.
- Parameters:
num_bands – The number of bands to use.
size_bands – The number of hashes per band.
- set_records_fields(self: pyhelayers.RecordLinkageConfig, fields_names: list, name_field_name: str) None #
Set the field names.
- Parameters:
fields_names – Both players CSV files contain these fields by the order given here.
name_field_name – The name of the name field used by some specific name related heuristics.
- set_verbosity(self: pyhelayers.RecordLinkageConfig, verbosity: pyhelayers.Verbosity) None #
Set the verbosity level
- Parameters:
verbosity (Verbosity) – The desired verbosity level
-
class RecordLinkageConfig : public helayers::SaveableBasic#
RecordLinkageConfig class with record field definitions and various tunings of the Record-Linkage algorithm and heuristics.
Public Functions
-
RecordLinkageConfig()#
Construct a new RecordLinkageConfig object.
-
RecordLinkageConfig(const RecordLinkageConfig &src)#
Construct a new RecordLinkageConfig object by copying a previously constructed RecordLinkageConfig object.
- Parameters:
src – The previously constructed RecordLinkageConfig object to copy.
-
RecordLinkageConfig &operator=(const RecordLinkageConfig &src)#
-
~RecordLinkageConfig()#
Destroy the RecordLinkageConfig object and free all attached data.
-
inline void setVerbosity(Verbosity verbosity)#
Set the Verbosity level.
- Parameters:
verbosity – the desired verbosity level
-
void setNumBandsAndSizeBands(int numBands, int sizeBands)#
Set the number of bands and the number of hashes per band, used by the min-hash algorithm.
- Parameters:
numBands – the number of bands to use
sizeBands – the number of hashes per band
-
inline int getNumBands() const#
Get the number of bands used by the min-hash algorithm.
-
inline int getSizeBands() const#
Get the number of hashes per band used by the min-hash algorithm.
-
void setRecordsFields(const std::vector<std::string> &fieldsNames, const std::string &titleOfNameField)#
- Parameters:
fieldsNames – Both players CSV files contain these fields by the order given here.
titleOfNameField – The name of the name field used by some specific name related heuristics.
-
inline const std::vector<std::string> &getFieldsNames() const#
Get the fields names in order.
-
inline const std::string &gettitleOfNameField() const#
Get the name of the name field (used by some specific name related heuristics).
-
bool isFullyInitialized() const#
returns true if all required fields are set
-
virtual std::streamoff save(std::ostream &stream) const override#
Saves this object to a stream in binary form.
Returns the number of bytes written to the output stream.
- Parameters:
stream – [in] output stream to write to
-
virtual std::streamoff load(std::istream &stream) override#
Loads this object from the given stream.
Returns the number of bytes read from the input stream.
- Parameters:
stream – [in] input stream to read from
-
virtual void debugPrint(const std::string &title = "", Verbosity verbosity = VERBOSITY_REGULAR, std::ostream &out = std::cout) const override#
Prints the content of this object.
- Parameters:
title – Text to add to the print
verbosity – Verbosity level
out – Output stream
Friends
-
friend bool operator==(const RecordLinkageConfig &c1, const RecordLinkageConfig &c2)#
-
RecordLinkageConfig()#