-
-
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.
Phrases and Phraser allow a generator corpus (#1099)
* Phrases and Phraser allow a generator corpus Allow Phrases and Phraser models to take a generator function/expression as input to the transformation method. Previously, only indexable iterables could be used which is problematic for large corpora. Add additional tests to test_phrases using a generator as input. * Update and simplify _is_single predicate The _is_single function in phrases.py is now simpler and has the same contract as the is_corpus function in utils. * Fixes use of next in phrases, and adds tests for empty input to phrases models
- Loading branch information
Showing
2 changed files
with
65 additions
and
10 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