honghanhh / ner-combining-contextual-and-global-features

[ICADL] Named entity recognition architecture combining contextual and global features
12 stars 3 forks source link

spacy parser error #7

Open karimmahalian opened 2 years ago

karimmahalian commented 2 years ago

Hi,

Thank you for sharing ur code with us. I tried to run prepare_dataset.py but I got this error

AttributeError: 'English' object has no attribute 'parser'

Any idea plz thank you

honghanhh commented 2 years ago

Hi @karimmahalian,

Make sure you download the right spacy models. You can also try adding a further parameter to set parser=True when loading the spacy model, e.g.,

nlp = spacy.load('en_core_web_sm', parser=True)

Hope this will help you well.

karimmahalian commented 2 years ago

Hi,

Thank u for ur reply. However spacy.load('en_core_web_sm', parser=True) didn t work it gave me this error

TypeError: load() got an unexpected keyword argument 'parser'

The version of spacy is 3.4.0

Thank u

honghanhh commented 2 years ago

@karimmahalian The original version I used for GCN is 2.0.11. Maybe you can downgrade SpaCy version (preferable to install necessary libraries with suggested version requirements.txt) to avoid version conflicting bugs. Best regards,