Skip to content
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

word2vec2tensor with python 3 #1127

Merged
merged 1 commit into from
Jan 31, 2017
Merged

word2vec2tensor with python 3 #1127

merged 1 commit into from
Jan 31, 2017

Conversation

lucianosb
Copy link
Contributor

As discussed with @tmylk in issue 1126, python 3 does not support word.encode('utf-8'). Changing to gensim.utils.to_unicode(word) worked. Tested with Python 3.5 in Ubuntu 16.04.

As discussed with @tmylk in issue 1126, python 3 does not support word.encode('utf-8'). Changing to gensim.utils.to_unicode(word) worked. Tested with Python 3.5 in Ubuntu 16.04.
@tmylk tmylk merged commit 0083fe5 into piskvorky:develop Jan 31, 2017
@tmylk
Copy link
Contributor

tmylk commented Jan 31, 2017

Thank you for the quick fix!

@piskvorky
Copy link
Owner

piskvorky commented Feb 2, 2017

That's not a good idea, please revert @tmylk .

Never write unicode strings to output (or concatenate unicode and bytestrings with + like this). That's just asking for trouble.

Always encode explicitly (here, to utf8) when serializing text data.

@tmylk
Copy link
Contributor

tmylk commented Feb 14, 2017

Reverted in #1144

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants