gensim.models.Phrases.export_phrases¶
-
Phrases.
export_phrases
(sentences)[source]¶ Generate an iterator that contains all phrases in given ‘sentences’
Example:
>>> sentences = Text8Corpus(path_to_corpus) >>> bigram = Phrases(sentences, min_count=5, threshold=100) >>> for phrase, score in bigram.export_phrases(sentences): ... print(u'{0} {1}'.format(phrase, score)) then you can debug the threshold with generated tsv