aboutsummaryrefslogtreecommitdiffstats
path: root/fuzzycat/simple.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/simple.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/simple.py')
-rw-r--r--fuzzycat/simple.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/fuzzycat/simple.py b/fuzzycat/simple.py
index ff59ba2..c92b5ae 100644
--- a/fuzzycat/simple.py
+++ b/fuzzycat/simple.py
@@ -24,7 +24,7 @@ from fatcat_openapi_client import ReleaseContrib, ReleaseEntity, ReleaseExtIds
from fuzzycat.common import Reason, Status
from fuzzycat.entities import entity_to_dict
from fuzzycat.grobid_unstructured import grobid_parse_unstructured
-from fuzzycat.matching import match_release_fuzzy
+from fuzzycat.matching import FuzzyReleaseMatcher
from fuzzycat.utils import clean_doi
from fuzzycat.verify import verify
@@ -84,7 +84,8 @@ def close_fuzzy_release_matches(release: ReleaseEntity,
result is only returned if all the candidate matches were ambiguous.
"""
- candidates = match_release_fuzzy(release, size=match_limit, es=es_client)
+ matcher = FuzzyReleaseMatcher(es=es_client, size=match_limit)
+ candidates = matcher.match(release)
if not candidates:
return None