openclean.function.matching.tests module
Collection of helper classes and functions for unit tests of different matcher classes.
- class openclean.function.matching.tests.DummyMatcher(matches: List[openclean.data.mapping.StringMatch])
Bases:
openclean.function.matching.base.StringSimilarity
Dummy string similarity that returns a list of matches that is initialized when the object is constructed.
- match(vocabulary: Iterable[str], query: str) List[openclean.data.mapping.StringMatch]
Returns the list of matches that was initialized when the object was constructed.
- Parameters
vocabulary (Iterable[str]) – List of strings to compare with.
query (string) – Second argument for similarity score computation - the query term.
- Return type
list of openclean.data.mapping.StringMatch