From 5fc2cd4d73f38931071fd196e0c02addf4acd959 Mon Sep 17 00:00:00 2001 From: XingkaiLiu <44836941+XingkaiLiu@users.noreply.github.com> Date: Sun, 5 Apr 2020 00:09:22 +0200 Subject: [PATCH] Switch to original fasttext package The official "fasttext"package has been well maintained. The "fasttextmirror" package might cause installation issues on Windows. --- deepmatcher/data/field.py | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deepmatcher/data/field.py b/deepmatcher/data/field.py index b4bd6f5..b7fc1a7 100644 --- a/deepmatcher/data/field.py +++ b/deepmatcher/data/field.py @@ -6,7 +6,7 @@ import nltk import six -import fastText +import fasttext import torch from torchtext import data, vocab from torchtext.utils import download_from_url @@ -77,7 +77,7 @@ def cache(self, name, cache, url=None): if not os.path.isfile(path): raise RuntimeError('no vectors found at {}'.format(path)) - self.model = fastText.load_model(path) + self.model = fasttext.load_model(path) self.dim = len(self['a']) diff --git a/setup.py b/setup.py index b8eaac8..9c7fd97 100644 --- a/setup.py +++ b/setup.py @@ -38,5 +38,5 @@ def find_version(*file_paths): python_requires='>=3.5', install_requires=[ 'torch>=1.0', 'tqdm', 'pyprind', 'six', 'Cython', 'torchtext', 'nltk>=3.2.5', - 'fasttextmirror', 'pandas', 'dill', 'scikit-learn' + 'fasttext', 'pandas', 'dill', 'scikit-learn' ])