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

function "preprocess" in file "convert_corpus.py" #8

Open
youngornever opened this issue Apr 7, 2018 · 1 comment
Open

function "preprocess" in file "convert_corpus.py" #8

youngornever opened this issue Apr 7, 2018 · 1 comment

Comments

@youngornever
Copy link

youngornever commented Apr 7, 2018

after "text=preprocess(text)"; some Chinese character change to garbled. such as "充满" to "?满", “?” for garbled. Is there something wrong? I think this function is to normalize all num to the number "0" and all English word to "X" and delet space "".

@hankcs
Copy link
Owner

hankcs commented Apr 7, 2018

Hi, maybe your system encoding is not correct. It works fine on my mac.

Python 3.6.4 (default, Mar 22 2018, 13:54:22) 
from convert_corpus import preprocess
preprocess('充满')
Out[3]: 
['充满']

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

No branches or pull requests

2 participants