Skip to content

Commit

Permalink
Fix typos in gensim/models/keyedvectors.py (#2290)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsdel2007 authored and menshikh-iv committed Dec 16, 2018
1 parent 5f6b28c commit b8219ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gensim/models/keyedvectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
and *vectors*. Each entity is identified by its string id, so this is a mapping between {str => 1D numpy array}.
The entity typically corresponds to a word (so the mapping maps words to 1D vectors),
but for some models, they key can also correspond to a document, a graph node etc. To generalize
but for some models, the key can also correspond to a document, a graph node etc. To generalize
over different use-cases, this module calls the keys **entities**. Each entity is
always represented by its string id, no matter whether the entity is a word, a document or a graph node.
Expand Down Expand Up @@ -767,7 +767,7 @@ def wmdistance(self, document1, document2):

if len(document1) == 0 or len(document2) == 0:
logger.info(
"At least one of the documents had no words that werein the vocabulary. "
"At least one of the documents had no words that were in the vocabulary. "
"Aborting (returning inf)."
)
return float('inf')
Expand Down Expand Up @@ -1401,7 +1401,7 @@ def save_word2vec_format(self, fname, fvocab=None, binary=False, total_vec=None)
fvocab : str, optional
Optional file path used to save the vocabulary
binary : bool, optional
If True, the data wil be saved in binary word2vec format, else it will be saved in plain text.
If True, the data will be saved in binary word2vec format, else it will be saved in plain text.
total_vec : int, optional
Optional parameter to explicitly specify total no. of vectors
(in case word vectors are appended with document vectors afterwards).
Expand Down Expand Up @@ -1839,7 +1839,7 @@ def save_word2vec_format(self, fname, prefix='*dt_', fvocab=None,
Explicitly specify total no. of vectors
(in case word vectors are appended with document vectors afterwards)
binary : bool, optional
If True, the data wil be saved in binary word2vec format, else it will be saved in plain text.
If True, the data will be saved in binary word2vec format, else it will be saved in plain text.
write_first_line : bool, optional
Whether to print the first line in the file. Useful when saving doc-vectors after word-vectors.
Expand Down

0 comments on commit b8219ac

Please sign in to comment.