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

Unable to download from catalog #74

Open
Andrew03 opened this issue Jun 7, 2023 · 1 comment
Open

Unable to download from catalog #74

Andrew03 opened this issue Jun 7, 2023 · 1 comment

Comments

@Andrew03
Copy link

Andrew03 commented Jun 7, 2023

Repro steps:
Install lexnlp pip install lexnlp
Start a python interactive shell and run

from lexnlp.ml.catalog.download import download_github_release

Import fails with error message

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/Andrew.Hoang/.local/share/virtualenvs/binary_contract_classification-0V95ndJZ/lib/python3.8/site-packages/lexnlp/ml/catalog/__init__.py", line 20, in <module>
    CATALOG: Path = Path(nltk.data.find('')) / 'lexpredict-lexnlp'
  File "/Users/Andrew.Hoang/.local/share/virtualenvs/binary_contract_classification-0V95ndJZ/lib/python3.8/site-packages/nltk/data.py", line 560, in find
    resource_zipname = resource_name.split("/")[1]
IndexError: list index out of range
@Andrew03
Copy link
Author

Andrew03 commented Jun 7, 2023

Seems to require downloading something from nltk otherwise import does not work.

import nltk
nltk.download()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant