aboutsummaryrefslogtreecommitdiffstats
path: root/fuzzycat/verify.py
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2020-12-12 02:50:31 +0100
committerMartin Czygan <martin.czygan@gmail.com>2020-12-12 02:50:31 +0100
commit19536f390aa9d2e5809a4fe4defc6746b15b8be6 (patch)
tree2c804f36c2eadaff0e8d96f9b0b7e2df7bdeb702 /fuzzycat/verify.py
parent03ebd6e237629fc82a1acdeefdbc70bf294f313e (diff)
downloadfuzzycat-19536f390aa9d2e5809a4fe4defc6746b15b8be6.tar.gz
fuzzycat-19536f390aa9d2e5809a4fe4defc6746b15b8be6.zip
move helper function into method
Diffstat (limited to 'fuzzycat/verify.py')
-rw-r--r--fuzzycat/verify.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/fuzzycat/verify.py b/fuzzycat/verify.py
index 4f5f97f..b76d215 100644
--- a/fuzzycat/verify.py
+++ b/fuzzycat/verify.py
@@ -81,10 +81,6 @@ from fuzzycat.data import (CONTAINER_NAME_BLACKLIST, PUBLISHER_BLACKLIST, TITLE_
from fuzzycat.utils import (author_similarity_score, contains_chemical_formula, dict_key_exists,
has_doi_prefix, jaccard, num_project, slugify_string)
-# The result of clustering are documents that have a key k and a list of values
-# (of the cluster) v.
-get_key_values = operator.itemgetter("k", "v")
-
class GroupVerifier:
"""
@@ -107,6 +103,9 @@ class GroupVerifier:
self.counter = collections.Counter()
def run(self):
+ # The result of clustering are documents that have a key k and a list of values
+ # (of the cluster) v.
+ get_key_values = operator.itemgetter("k", "v")
for i, line in enumerate(self.iterable):
if i % 20000 == 0 and self.verbose:
print(i, file=sys.stderr)