aboutsummaryrefslogtreecommitdiffstats
path: root/fuzzycat/__main__.py
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-11-16 21:13:46 +0100
committerMartin Czygan <martin.czygan@gmail.com>2021-11-16 21:13:46 +0100
commitd104f8d0ba8eef5563555de82be66bbf17f961db (patch)
tree47ebb2ee3816b5d65bea0c184b8f8d733ea91681 /fuzzycat/__main__.py
parente90bc43b2052b70d86875f289115a0876be230cc (diff)
downloadfuzzycat-d104f8d0ba8eef5563555de82be66bbf17f961db.tar.gz
fuzzycat-d104f8d0ba8eef5563555de82be66bbf17f961db.zip
complete migration from away from match_release_fuzzy
Instead, use `FuzzyReleaseMatcher.match`, which has approximately the same behavior.
Diffstat (limited to 'fuzzycat/__main__.py')
-rw-r--r--fuzzycat/__main__.py5
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: