diff options
Diffstat (limited to 'fuzzycat/__main__.py')
-rw-r--r-- | fuzzycat/__main__.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fuzzycat/__main__.py b/fuzzycat/__main__.py index 7792df6..d616efc 100644 --- a/fuzzycat/__main__.py +++ b/fuzzycat/__main__.py @@ -60,7 +60,7 @@ from fatcat_openapi_client import ReleaseEntity from fuzzycat.entities import entity_to_dict from fuzzycat.grobid_unstructured import grobid_parse_unstructured -from fuzzycat.matching import anything_to_entity, match_release_fuzzy +from fuzzycat.matching import FuzzyReleaseMatcher, anything_to_entity from fuzzycat.refs import RefsGroupVerifier from fuzzycat.simple import closest_fuzzy_release_match from fuzzycat.utils import random_idents_from_query, random_word @@ -143,7 +143,8 @@ def run_release_match(args): """ try: entity = anything_to_entity(args.value, ReleaseEntity) - result = match_release_fuzzy(entity, size=args.size, es=args.es_url) + matcher = FuzzyReleaseMatcher(es=args.es_url, size=args.size) + result = matcher.match(entity) except Exception as err: print("fuzzy match failed: {}".format(err), file=sys.stderr) else: |