Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in gensim/models/keyedvectors.py #2290

Merged
merged 2 commits into from
Dec 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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