Skip to content

Commit

Permalink
update usages
Browse files Browse the repository at this point in the history
  • Loading branch information
gojomo committed Dec 8, 2019
1 parent 12822f8 commit a0ee1b0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions gensim/test/test_similarities.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def setUp(self):

def testWord2Vec(self):
model = word2vec.Word2Vec(texts, min_count=1)
model.init_sims()
model.wv.init_sims()
index = self.indexer(model, 10)

self.assertVectorIsSimilarToItself(model.wv, index)
Expand Down Expand Up @@ -710,7 +710,7 @@ def setUp(self):

def test_word2vec(self):
model = word2vec.Word2Vec(texts, min_count=1)
model.init_sims()
model.wv.init_sims()
index = self.indexer(model)

self.assertVectorIsSimilarToItself(model.wv, index)
Expand All @@ -729,11 +729,11 @@ def __iter__(self):
yield line.lower().strip().split()

model = FastText(LeeReader(datapath('lee.cor')))
model.init_sims()
model.wv.init_sims()
index = self.indexer(model)

self.assertVectorIsSimilarToItself(model.wv, index)
self.assertApproxNeighborsMatchExact(model, model.wv, index)
self.assertApproxNeighborsMatchExact(model.wv, model.wv, index)
self.assertIndexSaved(index)
self.assertLoadedIndexEqual(index, model)

Expand Down Expand Up @@ -801,7 +801,7 @@ def setUp(self):
from gensim.similarities.nmslib import NmslibIndexer

self.model = doc2vec.Doc2Vec(sentences, min_count=1)
self.model.init_sims()
self.model.docvecs.init_sims()
self.index = NmslibIndexer(self.model)
self.vector = self.model.docvecs.vectors_docs_norm[0]

Expand Down

0 comments on commit a0ee1b0

Please sign in to comment.