-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix poincate viz incompatibility with plotly>=3.0.0
#2226
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for PR @jenishah, please make suggested fixes
gensim/models/phrases.py
Outdated
@@ -805,7 +805,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] = score |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not relevant to the original issue, please revert all phrases.py
file
@@ -59,7 +59,7 @@ def poincare_2d_visualization(model, tree, figure_title, num_nodes=50, show_node | |||
mode='markers', | |||
marker=dict(color='rgb(30, 100, 200)'), | |||
text=node_labels, | |||
textposition='bottom' | |||
textposition='bottom center' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's about older plotly version? I think PR changes works only for new. This should be compatible with new & old plotly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked - it works for 2.7.0 too, great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! :)
plotly>=3.0.0
Thanks for contribution @jenishah 👍 |
Fix #2123.