aboutsummaryrefslogtreecommitdiffstats
path: root/fuzzycat
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2020-11-12 00:19:30 +0100
committerMartin Czygan <martin.czygan@gmail.com>2020-11-12 00:19:30 +0100
commitf0b5857b45b0982cb587fce6b847d1d039794636 (patch)
treeed55bee41027df04e04a9ffeecef6e3b1c92ec2f /fuzzycat
parent001e1b99a126d67a9c65b2995bb2f3873721a36b (diff)
downloadfuzzycat-f0b5857b45b0982cb587fce6b847d1d039794636.tar.gz
fuzzycat-f0b5857b45b0982cb587fce6b847d1d039794636.zip
update deps
Diffstat (limited to 'fuzzycat')
-rw-r--r--fuzzycat/build.py2
-rw-r--r--fuzzycat/cluster.py4
-rw-r--r--fuzzycat/main.py11
3 files changed, 10 insertions, 7 deletions
diff --git a/fuzzycat/build.py b/fuzzycat/build.py
index e49e7d7..49a061f 100644
--- a/fuzzycat/build.py
+++ b/fuzzycat/build.py
@@ -3,13 +3,13 @@ WIP: Build auxiliary data structures for lookup.
"""
import fileinput
+import json
import operator
import sqlite3
import string
import sys
import tempfile
-import orjson as json
from nltk import word_tokenize
from nltk.corpus import stopwords
diff --git a/fuzzycat/cluster.py b/fuzzycat/cluster.py
index 2005c2f..dd55a24 100644
--- a/fuzzycat/cluster.py
+++ b/fuzzycat/cluster.py
@@ -69,10 +69,10 @@ import string
import subprocess
import sys
import tempfile
+from dataclasses import dataclass, field
from typing import Any, Callable, Dict, Generator, List, Optional, Tuple
import fuzzy
-from dataclasses import dataclass, field
__all__ = [
"release_key_title",
@@ -95,6 +95,7 @@ class Contrib:
surname: Optional[str]
role: Optional[str]
+
@dataclass
class KeyDoc:
"""
@@ -104,6 +105,7 @@ class KeyDoc:
title: str
contribs: List[Contrib] = field(default_factory=list)
+
@dataclass
class ClusterResult:
"""
diff --git a/fuzzycat/main.py b/fuzzycat/main.py
index 6086798..900d5c0 100644
--- a/fuzzycat/main.py
+++ b/fuzzycat/main.py
@@ -12,16 +12,18 @@ Run, e.g. fuzzycat cluster --help for more options. Example:
import argparse
import cProfile as profile
+import fileinput
+import json
import io
import logging
import pstats
import sys
import tempfile
-import fileinput
from fuzzycat.build import NgramLookup, TitleTokenList
-from fuzzycat.cluster import (Cluster, release_key_title, release_key_title_normalized,
- release_key_title_nysiis, release_key_title_ngram)
+from fuzzycat.cluster import (Cluster, release_key_title, release_key_title_ngram,
+ release_key_title_normalized, release_key_title_nysiis)
+
def run_cluster(args):
logger = logging.getLogger('main.run_cluster')
@@ -44,8 +46,7 @@ def run_verify(args):
TODO. Ok, we should not fetch data we have on disk (at the clustering
step).
"""
- for line in fileinput.input(files=args.files):
- pass
+ pass
def run_build(args):