Closed pragyakatyayan closed 2 years ago
Hi, requirements says you need spaCy 2.3.x. Can you try to update it from 2.2.4 to 2.3? Let me know if this solves your issue.
Thanks for replying. I downgraded spaCy to version 2.3.0, but I am still getting keyerror-
KeyError: "[E002] Can't find factory for 'tok2vec'. This usually happens when spaCy calls `nlp.create_pipe` with a component name that's not built in - for example, when constructing the pipeline from a model's meta.json. If you're using a custom component, you can write to `Language.factories['tok2vec']` or remove it from the model meta and add it via `nlp.add_pipe` instead."
UPDATE:
However, I downloaded the language model again for 2.3.0 using python -m spacy download en_core_web_sm
and it resolved the error. I got the following output:
{'verbs': [{'verb': 'Did',
'description': '[do.01: Did] Uriah honestly think he could beat the game in under three hours ?',
'tags': ['B-V',
'O',
'O',
'O',
'O',
'O',
'O',
'O',
'O',
'O',
'O',
'O',
'O',
'O'],
'frame': 'do.01',
'frame_score': 0.9999996423721313,
'lemma': 'do'},
{'verb': 'think',
'description': 'Did [ARG0: Uriah] [ARGM-ADV: honestly] [think.01: think] [ARG1: he could beat the game in under three hours] ?',
'tags': ['O',
'B-ARG0',
'B-ARGM-ADV',
'B-V',
'B-ARG1',
'I-ARG1',
'I-ARG1',
'I-ARG1',
'I-ARG1',
'I-ARG1',
'I-ARG1',
'I-ARG1',
'I-ARG1',
'O'],
'frame': 'think.01',
'frame_score': 1.0,
'lemma': 'think'},
{'verb': 'could',
'description': 'Did Uriah honestly think he [go.04: could] beat the game in under three hours ?',
'tags': ['O',
'O',
'O',
'O',
'O',
'B-V',
'O',
'O',
'O',
'O',
'O',
'O',
'O',
'O'],
'frame': 'go.04',
'frame_score': 0.10186543315649033,
'lemma': 'could'},
{'verb': 'beat',
'description': 'Did Uriah honestly think [ARG0: he] [ARGM-MOD: could] [beat.03: beat] [ARG1: the game] [ARGM-TMP: in under three hours] ?',
'tags': ['O',
'O',
'O',
'O',
'B-ARG0',
'B-ARGM-MOD',
'B-V',
'B-ARG1',
'I-ARG1',
'B-ARGM-TMP',
'I-ARGM-TMP',
'I-ARGM-TMP',
'I-ARGM-TMP',
'O'],
'frame': 'beat.03',
'frame_score': 0.9999936819076538,
'lemma': 'beat'}],
'words': ['Did',
'Uriah',
'honestly',
'think',
'he',
'could',
'beat',
'the',
'game',
'in',
'under',
'three',
'hours',
'?']}
Glad it worked :)
I successfully installed transformers-srl library using my Jupyter-notebook terminal. However, I encountered the following error while trying to run the following code. I am using a Windows 10 system with Python- 3.8.
code:
error with spacy version- 2.2.4
I tried to upgrade to spacy-3.1.1, but got the following error:
I am not sure, how to resolve the issue. Kindly help. Any help is deeply appreciated. Thanks in advance.