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

IndexError: string index out of range #24

Open
Paul-hengChen opened this issue May 31, 2017 · 7 comments
Open

IndexError: string index out of range #24

Paul-hengChen opened this issue May 31, 2017 · 7 comments

Comments

@Paul-hengChen
Copy link

Paul-hengChen commented May 31, 2017

I'm a python beginner . I'm so sorry to ask this question , but I followed your Example usage of Science Concierge and got the error as following

' IndexError: string index out of range '

I tried many ways to fix it, but still can't solve it, could you give me some direction?, please !

@titipata
Copy link
Owner

titipata commented May 31, 2017

Hi @Paul-hengChen, thanks for the report! I have the same error too. I'm fixing it now and will let you know when it's done.

@titipata
Copy link
Owner

titipata commented May 31, 2017

Wow, this is a problem of the stemmer that we use from nltk. The issue can be see on this Stack Overflow post: https://stackoverflow.com/questions/41517595/nltk-stemmer-string-index-out-of-range.

So this will be the bug for nltk version 3.2.2. You can fix this by upgrading the library pip install nltk --upgrade. This will solve the problem of PorterStemmer bug that they have.

@titipata
Copy link
Owner

@Paul-hengChen, let me know if it fixes the issue. I upgraded my nltk version and the issue is resolved.

@Paul-hengChen
Copy link
Author

Paul-hengChen commented Jun 1, 2017

I'm very thanks for your help!!!! The problem was resolved !!!!! but I got another error

RuntimeWarning: Surrogate character u'\ud880' will be ignored. 

You might be using a narrow Python build. Just like this. Where I can improve? Thank you again for your help!

@titipata
Copy link
Owner

titipata commented Jun 1, 2017

Ah, I didn't get that error. Can you check is it just a RuntimeWarning or is it an error? It might be just warning from unidecode library.

@Paul-hengChen
Copy link
Author

Yeah , you are right , just warning not error ! thanks for your help !!! you are so kind :) 👍

@titipata
Copy link
Owner

titipata commented Jun 1, 2017

No problem @Paul-hengChen! Glad to help.

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