Я использую обучающую программу NER для извлечения информации о навыках из резюме. Но ошибка
Не удалось найти переход с именем 'U-SKILL' в модели NER
ДАННЫЕ ОБУЧЕНИЯ:
[(u "У меня 2 года опыта работы с Python", {"entity": [(30, 35, "SKILL")]})]
КОД:
other_pipes = [pipe for pipe in nlp.pipe_names if pipe != "ner"]
with nlp.disable_pipes(*other_pipes):
optimizer = nlp.begin_training()
for i in range(10):
random.shuffle(train_data)
for text, annotations in train_data:
nlp.update([text], [annotations], sgd=optimizer)```
Error Traceback:
```Traceback (most recent call last):
File "<ipython-input-1-b5f869eaaf43>", line 1, in <module>
runfile('/home/abhishek/Desktop/Monster/Resume_Parser/MI_Resume/skills_ner.py', wdir='/home/abhishek/Desktop/Monster/Resume_Parser/MI_Resume')
File "/usr/lib/python3/dist-packages/spyder/utils/site/sitecustomize.py", line 705, in runfile
execfile(filename, namespace)
File "/usr/lib/python3/dist-packages/spyder/utils/site/sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "/home/abhishek/Desktop/Monster/Resume_Parser/MI_Resume/skills_ner.py", line 234, in <module>
nlp.update([text], [annotations], sgd=optimizer)
File "/home/abhishek/.local/lib/python3.6/site-packages/spacy/language.py", line 452, in update
proc.update(docs, golds, sgd=get_grads, losses=losses, **kwargs)
File "nn_parser.pyx", line 413, in spacy.syntax.nn_parser.Parser.update
File "nn_parser.pyx", line 516, in spacy.syntax.nn_parser.Parser._init_gold_batch
File "ner.pyx", line 106, in spacy.syntax.ner.BiluoPushDown.preprocess_gold
File "ner.pyx", line 165, in spacy.syntax.ner.BiluoPushDown.lookup_transition
KeyError: "[E022] Could not find a transition with the name 'U-SKILL' in the NER model."```