diff --git a/CHANGELOG.md b/CHANGELOG.md index 143f669e96..423ce2b389 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Changes * [#3116](https://github.com/RaRe-Technologies/gensim/pull/3116): Fix bug where saved Phrases model did not load its connector_words, by [@aloknayak29](https://github.com/aloknayak29) * [#3136](https://github.com/RaRe-Technologies/gensim/pull/3136): fix indexing error in word2vec_inner.pyx, by [@bluekura](https://github.com/bluekura) +* [#3174](https://github.com/RaRe-Technologies/gensim/pull/3174): Fix a bug when upgrading phraser from gensim 3.x to 4.0, by [@emgucv](https://github.com/emgucv) ### :+1: Improvements diff --git a/gensim/models/phrases.py b/gensim/models/phrases.py index d07b75adc6..c95682fa5e 100644 --- a/gensim/models/phrases.py +++ b/gensim/models/phrases.py @@ -364,7 +364,7 @@ def load(cls, *args, **kwargs): } elif isinstance(component, tuple): # 3.8 => 4.0: phrasegram keys are strings, not tuples with bytestrings model.phrasegrams = { - str(model.delimiter.join(component), encoding='utf8'): score + str(model.delimiter.join(key), encoding='utf8'): val for key, val in phrasegrams.items() } except StopIteration: