Skip to content

Commit

Permalink
fix flake8 warnings in docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
piskvorky committed Oct 10, 2020
1 parent 1acb47c commit 2ea2634
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gensim/models/phrases.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down Expand Up @@ -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'))
Expand Down Expand Up @@ -732,22 +732,22 @@ 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
----------
.. sourcecode:: pycon
>>> 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']
Expand Down

0 comments on commit 2ea2634

Please sign in to comment.