Skip to content

Commit

Permalink
Fix spelling (#1625)
Browse files Browse the repository at this point in the history
  • Loading branch information
jberkel authored and menshikh-iv committed Oct 11, 2017
1 parent c220166 commit b0f80a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/notebooks/FastText_Tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The word vector lookup operation only works if atleast one of the component character ngrams is present in the training corpus. For example -"
"The word vector lookup operation only works if at least one of the component character ngrams is present in the training corpus. For example -"
]
},
{
Expand Down Expand Up @@ -346,7 +346,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Similarity operations work the same way as word2vec. **Out-of-vocabulary words can also be used, provided they have atleast one character ngram present in the training data.**"
"Similarity operations work the same way as word2vec. **Out-of-vocabulary words can also be used, provided they have at least one character ngram present in the training data.**"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/notebooks/Word2Vec_FastText_Comparison.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@
"Both these subtractions would result in a very similar set of remaining ngrams.\n",
"No surprise the fastText embeddings do extremely well on this.\n",
"\n",
"Let's do a small test to validate this hypothesis - fastText differs from word2vec only in that it uses char n-gram embeddings as well as the actual word embedding in the scoring function to calculate scores and then likelihoods for each word, given a context word. In case char n-gram embeddings are not present, this reduces (atleast theoretically) to the original word2vec model. This can be implemented by setting 0 for the max length of char n-grams for fastText.\n"
"Let's do a small test to validate this hypothesis - fastText differs from word2vec only in that it uses char n-gram embeddings as well as the actual word embedding in the scoring function to calculate scores and then likelihoods for each word, given a context word. In case char n-gram embeddings are not present, this reduces (at least theoretically) to the original word2vec model. This can be implemented by setting 0 for the max length of char n-grams for fastText.\n"
]
},
{
Expand Down Expand Up @@ -1081,4 +1081,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
2 changes: 1 addition & 1 deletion gensim/models/keyedvectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ def n_similarity(self, ws1, ws2):
"""
if not(len(ws1) and len(ws2)):
raise ZeroDivisionError('Atleast one of the passed list is empty.')
raise ZeroDivisionError('At least one of the passed list is empty.')
v1 = [self[word] for word in ws1]
v2 = [self[word] for word in ws2]
return dot(matutils.unitvec(array(v1).mean(axis=0)), matutils.unitvec(array(v2).mean(axis=0)))
Expand Down

0 comments on commit b0f80a6

Please sign in to comment.