Custom Ners Training With Spacy 3 Throws Valueerror
I am trying to add custom NER labels using spacy 3. I found tutorials for older versions and made adjustments for spacy 3. Here is the whole code I am using: import random import s
Solution 1:
You need to change the following line in the for
loop
doc = nlp(text)
to
doc = nlp.make_doc(text)
The code should work and produce the following results:
{'ner': 9.60289144264557}
{'ner': 8.875474230820478}
{'ner': 6.370401408220459}
{'ner': 6.687456469517201}
...
{'ner': 1.3796682589133492e-05}
{'ner': 1.7709562613218738e-05}
Entities in'Do you like horses?'
ANIMAL -- horses
Post a Comment for "Custom Ners Training With Spacy 3 Throws Valueerror"