Skip to content

Commit

Permalink
reuse from test.utils
Browse files Browse the repository at this point in the history
  • Loading branch information
gojomo committed Sep 12, 2020
1 parent bb947b3 commit e7ef8da
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions gensim/test/test_fasttext.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
from gensim.models.word2vec import LineSentence
from gensim.models.fasttext import FastText as FT_gensim, FastTextKeyedVectors, _unpack
from gensim.models.keyedvectors import KeyedVectors
from gensim.test.utils import datapath, get_tmpfile, temporary_file, common_texts as sentences
from gensim.test.utils import datapath, get_tmpfile, temporary_file, common_texts as sentences, \
lee_corpus_list as list_corpus
from gensim.test.test_word2vec import TestWord2VecModel
import gensim.models._fasttext_bin
from gensim.models.fasttext_inner import compute_ngrams, compute_ngrams_bytes, ft_hash_bytes
Expand All @@ -44,15 +45,6 @@
FT_CMD = os.path.join(FT_HOME, "fasttext") if FT_HOME else None


class LeeCorpus(object):
def __iter__(self):
with open(datapath('lee_background.cor')) as f:
for line in f:
yield utils.simple_preprocess(line)


list_corpus = list(LeeCorpus())

new_sentences = [
['computer', 'artificial', 'intelligence'],
['artificial', 'trees'],
Expand Down

0 comments on commit e7ef8da

Please sign in to comment.