-
Notifications
You must be signed in to change notification settings - Fork 290
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
KeyError: 'hinglish' #200
Comments
I'm getting the same error...does anyone know what's wrong? |
Reason for KeyError: Pke library requires nltk library for the language codes. In pke's "langcodes.py" there is absence of language code for 'hinglish'. Solution: In the home location, the "nltk_data" folder will be present. Inside nltk_data/corpora/stopwords there will be |
where to get "nltk_data" folder in colab? |
you can simply do btw removing did not worked for me btw i did not face the issue with latest version |
I had issue because I will installing on commit hash but since I switched to full git, it is working fine. no more error
|
As said earlier in the thread, please update to the latest version. shadok_stoplist = ['ga', 'zo']
preprocessed_document = [ # Obtained via custom pos tagging tool or manual annotation
[('ga', 'DET'), ('bu', 'NOUN'), ('zo', 'AUX'), ('meu', 'ADJ'), ('.', 'PUNCT')]
]
e = pke.unsupervised.MultipartiteRank()
e.load_document(
preprocessed_document, language='shadok',
stoplist=shadok_stoplist, normalization=None) |
I am getting this error while importing pke
get_alpha_2 = lambda l: LANGUAGE_CODE_BY_NAME[l] KeyError: 'hinglish'
The text was updated successfully, but these errors were encountered: