most_similar_among functionality added with tests #1255
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #148. After @gojomo's comprehensive review from #1229
I have split PR's for all drive-by bug fixes as suggested. Some follow ups from previous comments :
Done. I have also added a method to class
Word2Vec
in order to solve the original "people might not find index2word" problem.Actually, calculating difference in sets (which is needed to generate this warning) can be an unnecessary overhead for people using this code in production environment. I have added a
logging.info
call to inform users of the same.Sometimes it is not possible to remove all non-vocabulary words from the
words-list
, for example, ifwords-list
is generated during runtime. Here usingsuppress_warnings
would be ideal.Done. Yes, you're right. The module uses logging throughout, unnecessary import and use of warnings was not a good choice.
Ok sure, removing extra tests.
Quoted here to keep track.