-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
error when trying to import panlex_swadesh #117
Comments
TL;DR To access the from nltk.corpus import swadesh110, swadesh207
for lang in swadesh110.fileids():
for concept in swadesh110.words(lang):
lemmas = concept.split('\t') The usage is similar for @stevenbird maybe it'll be good have a better panlex swadesh list API given that now the
@lingdoc because there are many swadesh lists and they are basically a list of words the common, I think it was by design that the multiple swadesh lists have different names. From https://github.com/nltk/nltk/blob/develop/nltk/corpus/__init__.py#L199:
The |
aha - thanks! now that you point this out it makes sense, but it's not clear from the documentation. I spent an hour or so googling, and never came across this line in "wordlist.py". |
When I try to import the Panlex Swadesh word lists like this:
I get the following error:
I can access the data files in my
nltk_data
folder, and the corpus downloader says they exist and are up to date, but I can't figure out how to read them using nltk in Python. If the access method is different from other corpora, or has somehow changed, this should probably be documented somewhere.The text was updated successfully, but these errors were encountered: