ncbi / GNorm2

16 stars 6 forks source link

package versions need to be specified in requirements.txt #3

Open DSLituiev opened 10 months ago

DSLituiev commented 10 months ago

The README says that stanza version must be 1.4.0, but this is not reflected in requirements.txt, which leads to the latest version installed (1.7.0 as of today), and an error:

Traceback (most recent call last):
  File "/home/dlituiev/GNorm2/GeneNER_SpeAss_run.py", line 25, in <module>
    nlp_token = stanza.Pipeline(model_dir='gnorm_trained_models/stanza', lang='en', processors={'tokenize': 'spacy'},package='None', download_method=None) #package='craft' ;./gnorm_trained_models/stanza
  File "/home/dlituiev/GNorm2/gnorm2/lib64/python3.9/site-packages/stanza/pipeline/core.py", line 237, in __init__
    self.load_list = maintain_processor_list(resources, lang, package, processors, maybe_add_mwt=(not kwargs.get("tokenize_pretokenized")))
  File "/home/dlituiev/GNorm2/gnorm2/lib64/python3.9/site-packages/stanza/resources/common.py", line 208, in maintain_processor_list
    add_mwt(processors, resources, lang)
  File "/home/dlituiev/GNorm2/gnorm2/lib64/python3.9/site-packages/stanza/resources/common.py", line 184, in add_mwt
    if value in resources[lang][PACKAGES] and MWT in resources[lang][PACKAGES][value]:
KeyError: 'packages'

There may be a simple fix to this, but I am not familiar with stanza

DSLituiev commented 10 months ago

similarly with the latest transformers (unconstrained in requirements)

ChihHsuanWei commented 9 months ago

Hi, GNorm2 somehow has a difficultly within Python 3.9. we prepared the requirments.txt for python 3.8 and 3.10. Could you please reinstall the appropriate lib? Let me know if any further issue?

requirements-py38.txt requirements-py310.txt

Thanks. Wei