This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding unicode error handling on the python interface
Summary: The issue was reported here : #715 Now, we can replace the line : ``` words = f.get_words() ``` by ``` words = f.get_words(on_unicode_error='replace') ``` in bin_to_vec.py The behaviour is similar to python's `decode` function : if there is an encoding issue, `strict`: it fails with an error, `replace`: replaces silently the malformed characters by the replacement character. Reviewed By: EdouardGrave Differential Revision: D14133996 fbshipit-source-id: 9c82fef69b6d5223e4e5d60516a53467d8786ffc
- Loading branch information
1 parent
82af80f
commit e13484b
Showing
2 changed files
with
83 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters