polyfuzz.models.BaseMatcher

The abstract BaseMatching to be modelled after for string matching

match(self, from_list, to_list=None, **kwargs)

Show source code in models\_base.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    @abstractmethod
    def match(self,
              from_list: List[str],
              to_list: List[str] = None,
              **kwargs) -> pd.DataFrame:
        """ Make sure you follow the same argument structure:

        Arguments:
            from_list: The list from which you want mappings
            to_list: The list where you want to map to

        Returns:
            matches: The best matches between the lists of strings
                     Columns:
                        * "From"
                        * "To"
                        * "Similarity"
        """
        raise NotImplementedError()

Make sure you follow the same argument structure:

Parameters

Name Type Description Default
from_list List[str] The list from which you want mappings required
to_list List[str] The list where you want to map to None

Returns

Type Description
DataFrame matches: The best matches between the lists of strings Columns: * "From" * "To" * "Similarity"