Fix ftfy workaround and remove old import

This commit is contained in:
ines 2018-03-28 12:14:28 +02:00
parent ce6071ca89
commit ac88c72c9a

View File

@ -11,7 +11,6 @@ from preshed.counter import PreshCounter
import tarfile
import gzip
from ..compat import fix_text
from ..vectors import Vectors
from ..util import prints, ensure_path, get_lang_class
@ -152,7 +151,7 @@ def read_clusters(clusters_loc):
try:
cluster, word, freq = line.split()
if ftfy is not None:
word = fix_text(word)
word = ftfy.fix_text(word)
except ValueError:
continue
# If the clusterer has only seen the word a few times, its