From 7aa3a7107404ce0c953d81c878b51e0ac7b49242 Mon Sep 17 00:00:00 2001 From: Sourav Singh <4314261+souravsingh@users.noreply.github.com> Date: Sat, 22 Sep 2018 23:25:20 +0530 Subject: [PATCH] Rename vocab attribute to bigram_counts --- gensim/models/phrases.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gensim/models/phrases.py b/gensim/models/phrases.py index 09d709b193..7eb7052670 100644 --- a/gensim/models/phrases.py +++ b/gensim/models/phrases.py @@ -772,7 +772,7 @@ def __init__(self, phrases_model): for bigram, score in phrases_model.export_phrases(corpus, self.delimiter, as_tuples=True): if bigram in self.phrasegrams: logger.info('Phraser repeat %s', bigram) - self.phrasegrams[bigram] = (phrases_model.vocab[self.delimiter.join(bigram)], score) + self.phrasegrams[bigram] = (phrases_model.bigram_count[self.delimiter.join(bigram)], score) count += 1 if not count % 50000: logger.info('Phraser added %i phrasegrams', count)