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

how can corenlp handle non-ascii string? #31

Open
wxbks opened this issue Sep 8, 2015 · 2 comments
Open

how can corenlp handle non-ascii string? #31

wxbks opened this issue Sep 8, 2015 · 2 comments

Comments

@wxbks
Copy link

wxbks commented Sep 8, 2015

I put the word 'Víctor' into corenlp.parse. 'Víctor' contains non-ascii character. I would like to get the lemma of 'Víctor'. But when I put corenlp.parse('Víctor'). It gives error:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128).

How can I change corenlp setting, so corenlp can handle non-ascii string?

@cuzzo
Copy link

cuzzo commented Feb 21, 2016

Hey @sicongkuang,

You could try using something like unidecode on your input string firstt. At least, I ran into a similar error and that fixed the problem.

Hope it works for you.

Cheers,

@wxbks
Copy link
Author

wxbks commented Feb 22, 2016

Hey @cuzzo ,
Thank you so much! Yes, that solved my problem. Thank you!

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