diff --git a/gensim/models/phrases.py b/gensim/models/phrases.py index 8bf4b57ea4..92e187197c 100644 --- a/gensim/models/phrases.py +++ b/gensim/models/phrases.py @@ -21,7 +21,7 @@ >>> from gensim.test.utils import datapath >>> from gensim.models.word2vec import Text8Corpus - >>> from gensim.models.phrases import Phrases, FrozenPhrases + >>> from gensim.models.phrases import Phrases >>> >>> # Create training corpus. Must be a sequence of sentences (e.g. an iterable or a generator). >>> sentences = Text8Corpus(datapath('testcorpus.txt')) @@ -475,7 +475,7 @@ def __init__( >>> from gensim.test.utils import datapath >>> from gensim.models.word2vec import Text8Corpus - >>> from gensim.models.phrases import Phrases, FrozenPhrases + >>> from gensim.models.phrases import Phrases >>> >>> # Load corpus and train a model. >>> sentences = Text8Corpus(datapath('testcorpus.txt')) @@ -732,8 +732,8 @@ def __init__(self, phrases_model): Notes ----- - After the one-time initialization, a :class:`~gensim.models.phrases.FrozenPhrases` will be much smaller and - faster than using the full :class:`~gensim.models.phrases.Phrases` model. + After the one-time initialization, a :class:`~gensim.models.phrases.FrozenPhrases` will be much + smaller and faster than using the full :class:`~gensim.models.phrases.Phrases` model. Examples ---------- @@ -741,13 +741,13 @@ def __init__(self, phrases_model): >>> from gensim.test.utils import datapath >>> from gensim.models.word2vec import Text8Corpus - >>> from gensim.models.phrases import Phrases, FrozenPhrases + >>> from gensim.models.phrases import Phrases >>> >>> # Load corpus and train a model. >>> sentences = Text8Corpus(datapath('testcorpus.txt')) >>> phrases = Phrases(sentences, min_count=1, threshold=1) >>> - >>> # Export FrozenPhrases that is more efficient but doesn't allow any more training. + >>> # Export a FrozenPhrases object that is more efficient but doesn't allow further training. >>> frozen_phrases = phrases.freeze() >>> print(frozen_phrases[sent]) [u'trees_graph', u'minors']