mirror of
https://github.com/explosion/spaCy.git
synced 2025-06-30 18:03:04 +03:00
Fix ftfy workaround and remove old import
This commit is contained in:
parent
ce6071ca89
commit
ac88c72c9a
|
@ -11,7 +11,6 @@ from preshed.counter import PreshCounter
|
||||||
import tarfile
|
import tarfile
|
||||||
import gzip
|
import gzip
|
||||||
|
|
||||||
from ..compat import fix_text
|
|
||||||
from ..vectors import Vectors
|
from ..vectors import Vectors
|
||||||
from ..util import prints, ensure_path, get_lang_class
|
from ..util import prints, ensure_path, get_lang_class
|
||||||
|
|
||||||
|
@ -152,7 +151,7 @@ def read_clusters(clusters_loc):
|
||||||
try:
|
try:
|
||||||
cluster, word, freq = line.split()
|
cluster, word, freq = line.split()
|
||||||
if ftfy is not None:
|
if ftfy is not None:
|
||||||
word = fix_text(word)
|
word = ftfy.fix_text(word)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
continue
|
continue
|
||||||
# If the clusterer has only seen the word a few times, its
|
# If the clusterer has only seen the word a few times, its
|
||||||
|
|
Loading…
Reference in New Issue
Block a user