-
-
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
Properly handle unicode_errors arg parameter when loading a vocab file #2570
Conversation
Looks good, can you please add some tests? The tests should fail without your changes, and pass when your changes are active. |
Thank you for checking that. I'll do that. Please give me a moment. |
I've changed the way to take care of fvocab, which is same as model file is doing. |
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.
I've reverted except "add unicode_errors arg" and confirmed the test codes work.
Your tests fail under Py2.7, can you please take a look? |
Mmm, It's embarrassing to be mentioned such a thing. ^^; I've confirmed the tests passed on Python2.7.15 and 3.7.3 env. |
OK, looks good to merge. Congrats on your first contribution, @wmtzk ! 🥇 Good work! |
Thanks! |
Fix #2569
Simply, added "unicode_errors" option on loading vocab file process.
I've tested and all of them passed with changing numpy version from 1.14.5 to 1.17.0 in tox.ini.
The reason I've changed the version of numpy is to avoid the follwoing error, which also happens the HEAD revision of f97d0e7
Versions
Ubuntu 18.04
Thank you for checking that and your consideration!