Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve speed of FastTextKeyedVectors.__contains__ (#1499)
* Improve speed of FastTextKeyedVectors __contains__ The current implementation of __contains__ in FastTextKeyedVectors is `O(n*m)` where `n` is the number of character ngrams in the query word and `m` is the size of the vocabulary. This is very slow for large corpora. The new implementation is O(n). * any() was unnecessary. * Update variable name and docstring to improve clarity
- Loading branch information