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

English language model throws error. Is there a dependency on a specific version of spacy? #71

Open
nikhilkmr300 opened this issue Apr 28, 2021 · 1 comment

Comments

@nikhilkmr300
Copy link

nikhilkmr300 commented Apr 28, 2021

The predict_next_words function throws the following error with English:

self.tok = spacy.blank(lang, disable=["parser","tagger","ner"])
TypeError: blank() got an unexpected keyword argument 'disable'

I also tried using the model directly by running predict on the pretrained LanguageLearner that iNLTK downloads at en/export.pkl, but that throws the same error. Looking at the spacy docs, spacy.blank currently does not have a parameter called disable.

The Hindi language model works fine. I'm guessing the error with English is because, as the docs mention, the model has been taken directly from fastai which probably uses spacy somewhere.

Would appreciate any help. Thanks!

@chiragjn
Copy link

chiragjn commented May 5, 2021

You are correct, spacy 3.x removed disable argument on spacy.blank. Downgrading to spacy 2.x should fix it

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