File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 7575
7676NEGATIVE_INFINITY = float ('-inf' )
7777
78- #: Set of common English prepositions and articles. Tokens from this set
79- # are "ignored" during phrase detection:
78+ # Set of common English words. Tokens from this set are "ignored" during phrase detection:
8079# 1) Phrases may not start with these words.
8180# 2) Phrases may include any number of these words inside.
8281ENGLISH_COMMON_TERMS = frozenset (
@@ -649,7 +648,7 @@ def add_vocab(self, sentences):
649648 >>>
650649 >>> # Train a phrase detector from a text corpus.
651650 >>> sentences = Text8Corpus(datapath('testcorpus.txt'))
652- >>> phrases = Phrases(sentences, common_words =ENGLISH_COMMON_TERMS) # train model
651+ >>> phrases = Phrases(sentences, common_terms =ENGLISH_COMMON_TERMS) # train model
653652 >>> assert len(phrases.vocab) == 37
654653 >>>
655654 >>> more_sentences = [
You can’t perform that action at this time.
0 commit comments