From 19536f390aa9d2e5809a4fe4defc6746b15b8be6 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Sat, 12 Dec 2020 02:50:31 +0100 Subject: move helper function into method --- fuzzycat/verify.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'fuzzycat') 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) -- cgit v1.2.3