Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
piskvorky committed Jul 30, 2020
1 parent d40f685 commit 872c8ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions gensim/models/fasttext.py
Original file line number Diff line number Diff line change
Expand Up @@ -1269,9 +1269,9 @@ def get_vector(self, word, norm=False):
Parameters
----------
word : str
Input word
Input word.
norm : bool, optional
If True - resulting vector will be L2-normalized (unit euclidean length).
If True, resulting vector will be L2-normalized (unit Euclidean length).
Returns
-------
Expand All @@ -1281,7 +1281,7 @@ def get_vector(self, word, norm=False):
Raises
------
KeyError
If word and all ngrams not in vocabulary.
If word and all its ngrams not in vocabulary.
"""
if word in self.key_to_index:
Expand Down
6 changes: 3 additions & 3 deletions gensim/models/keyedvectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,10 @@ def get_vector(self, key, norm=False):
Parameters
----------
key : str or int
Key for vector to return, or int slot
key : str
Key for vector to return.
norm : bool, optional
If True - resulting vector will be L2-normalized (unit euclidean length).
If True, the resulting vector will be L2-normalized (unit Euclidean length).
Returns
-------
Expand Down
2 changes: 1 addition & 1 deletion gensim/test/test_word2vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ def testTrainingSgNegative(self):
# self.assertTrue(sims[0][0] == 'trees', sims) # most similar

# test querying for "most similar" by vector
graph_vector = model.wv.get_vectors('graph', norm=True)
graph_vector = model.wv.get_vector('graph', norm=True)
sims2 = model.wv.most_similar(positive=[graph_vector], topn=11)
sims2 = [(w, sim) for w, sim in sims2 if w != 'graph'] # ignore 'graph' itself
self.assertEqual(sims, sims2)
Expand Down

0 comments on commit 872c8ed

Please sign in to comment.