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

Please upload dependence parsing module #597

Closed
htluandc2 opened this issue Nov 15, 2022 · 3 comments
Closed

Please upload dependence parsing module #597

htluandc2 opened this issue Nov 15, 2022 · 3 comments

Comments

@htluandc2
Copy link

Hi there, when i run:

from underthesea import dependency_parse
text = 'Tối 29/11, Việt Nam thêm 2 ca mắc Covid-19'
dependency_parse(text)

Then dependence file can not download.
Downloading: "https://github.com/undertheseanlp/underthesea/releases/download/v1.3-resources/vi-dp-v1a1.zip" to vi-dp-v1a1.zip

File /opt/homebrew/Caskroom/miniforge/base/envs/env_tf/lib/python3.9/urllib/request.py:641, in HTTPDefaultErrorHandler.http_error_default(self, req, fp, code, msg, hdrs)
640 def http_error_default(self, req, fp, code, msg, hdrs):
--> 641 raise HTTPError(req.full_url, code, msg, hdrs, fp)

HTTPError: HTTP Error 404: Not Found

Please upload this file.
Thank you very much!

@rain1024
Copy link
Contributor

rain1024 commented Nov 15, 2022

@htluandc2 Which version of underthesea are you using?

$ underthesea info 

or use pip

$ pip freeze | grep underthesea

The error you are facing is fixed in underthesea version 1.3.5 (Same as #540). You should update underthesea version

$ pip install underthesea[deep]==1.3.5

>>> from underthesea import dependency_parse
>>> text = 'Tối 29/11, Việt Nam thêm 2 ca mắc Covid-19'
>>> dependency_parse(text)
[('Tối', 5, 'obl:tmod'),
 ('29/11', 1, 'compound'),
  (',', 4, 'punct'),
  ('Việt Nam', 5, 'nsubj'),
  ('thêm', 0, 'root'),
  ('2', 7, 'nummod'),
  ('ca', 5, 'obj'),
  ('mắc', 5, 'obj'),
  ('Covid-19', 5, 'punct')]

This image below is screenshot of my termial

Screen Shot 2022-11-15 at 20 06 43

@htluandc2
Copy link
Author

htluandc2 commented Nov 16, 2022

Thank you for your immediate support.
But when I reinstall underthesea, I faced new error:

% pip install underthesea[deep]==1.3.5       
zsh: no matches found: underthesea[deep]==1.3.5

When I install without [deep]

% pip install underthesea==1.3.5
ERROR: Could not find a version that satisfies the requirement underthesea-core==0.0.5a2 (from underthesea) (from versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4a0, 0.0.4a1, 0.0.4a2, 0.0.4a3, 0.0.4a4, 0.0.4a5, 0.0.4a6, 0.0.4a8)
ERROR: No matching distribution found for underthesea-core==0.0.5a2

My enviroment:

% ipython
Python 3.9.13 (main, Aug 25 2022, 18:24:45)

@rain1024
Copy link
Contributor

rain1024 commented Nov 16, 2022

@htluandc2

zsh: no matches found: underthesea[deep]==1.3.5

I faced the same result when using pip with zsh. I haven't figure out what is the problem here. For installation underthesea[deep], I must run without zsh.

Update: Maybe it's the reason behind this error https://stackoverflow.com/a/30539963/772391

In my zsh environment, Quotation Mark " is the rescure :D

pip install "underthesea[deep]==1.3.5"

% pip install underthesea==1.3.5
My enviroment:
% ipython
Python 3.9.13 (main, Aug 25 2022, 18:24:45)

Please try with older verion of python, such as python 3.8 or 3.7. Then let me known what happens. I will invest this issue further in next release (1.4.0)

Thank you :D

@rain1024 rain1024 closed this as completed Jan 3, 2023
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