-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New KeyedVectors.vectors_for_all method for vectorizing all words in …
…a dictionary (#3157) * Add KeyedVectors.vectors_for_all * Add examples for KeyedVectors.vectors_for_all * Support Dictionary in KeyedVectors.vectors_for_all * Don't sort keys in KeyedVectors.vectors_for_all, just deduplicate * Use docstrings in imperative mode (PEP8) Co-authored-by: Radim Řehůřek <me@radimrehurek.com> * Guard against KeyError in KeyedVectors.vectors_for_all * Unit-test dictionary parameter of KeyedVectors.vectors_for_all * Order dictionary by decreasing cfs in KeyedVectors.vectors_for_all * Add allow_inference parameter to KeyedVectors.vectors_for_all * Add copy_vecattrs parameter to KeyedVectors.vectors_for_all * Move copy_vecattrs tests for KeyedVectors.vectors_for_all * Fix translation of term ids to terms in KeyedVectors.vectors_for_all * Fix a typo in KeyedVectors.vectors_for_all unit test * Do not make assumptions about fake counts in _add_word_to_kv * Document that KeyedVectors.vectors_for_all allows arbitrary keys * Add notes about the behavior of KeyedVectors.vectors_for_all * Properly reference Dictionary in KeyedVectors.vectors_for_all docstring * Make deduplication in KeyedVectors.vectors_for_all a oneliner * Remove an unnecessary temporary variable in KeyedVectors.vectors_for_all * Make deduplication in KeyedVectors.vectors_for_all a oneliner (cont.) * Add Dictionary.most_common * Remove test_vectors_for_all_dictionary unit test * Remove a trailing bracket in an example * Fix unit tests for Dictionary.most_common * Update an example for SparseTermSimilarityMatrix * Remove Gensim downloader from KeyedVectors.vectors_for_all example * Remove include_counts parameter from Dictionary.most_common * Shorten the KeyedVectors.vectors_for_all example * Remove include_counts parameter from Dictionary.most_common (cont.) * Use pytest assertion syntax in unit tests * Remove an unnecessary comment in KeyedVectors.vectors_for_all * Remove an unnecessary comment in KeyedVectors.vectors_for_all Co-authored-by: Michael Penkov <m@penkov.dev> * Remove an unnecessary variable in KeyedVectors.vectors_for_all * Make the creation of new vocab in KeyedVectors.vectors_for_all explicit * Make AnnoyIndexer use the correct word-vectors in example * Apply suggestions from code review * Apply suggestions from code review * Update CHANGELOG.md Co-authored-by: Radim Řehůřek <me@radimrehurek.com> Co-authored-by: Michael Penkov <m@penkov.dev>
- Loading branch information
1 parent
2a41200
commit a93067d
Showing
7 changed files
with
226 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters