Hi Everyone,
I was stuck with a problem for a while.When I use
prodigy ner.teach currency_ner en_core_web_lg nytimes_news_articles.txt --label CURRENCY --patterns currency_patterns.jsonl
I get this error
Using 1 labels: CURRENCY
Traceback (most recent call last):
File “/usr/lib64/python3.7/runpy.py”, line 193, in _run_module_as_main
“main”, mod_spec)
File “/usr/lib64/python3.7/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/usr/local/lib64/python3.7/site-packages/prodigy/main.py”, line 259, in
controller = recipe(args, use_plac=True)
File “cython_src/prodigy/core.pyx”, line 253, in prodigy.core.recipe.recipe_decorator.recipe_proxy
File “/home/ec2-user/.local/lib/python3.7/site-packages/plac_core.py”, line 328, in call
cmd, result = parser.consume(arglist)
File “/home/ec2-user/.local/lib/python3.7/site-packages/plac_core.py”, line 207, in consume
return cmd, self.func((args + varargs + extraopts), **kwargs)
File “/usr/local/lib64/python3.7/site-packages/prodigy/recipes/ner.py”, line 111, in teach
matcher = PatternMatcher(model.nlp).from_disk(patterns)
File “cython_src/prodigy/models/matcher.pyx”, line 192, in prodigy.models.matcher.PatternMatcher.from_disk
File “cython_src/prodigy/models/matcher.pyx”, line 133, in prodigy.models.matcher.PatternMatcher.add_patterns
File “nn_parser.pyx”, line 815, in spacy.syntax.nn_parser.Parser.add_label
File “ner.pyx”, line 218, in spacy.syntax.ner.BiluoPushDown.add_action
File “strings.pyx”, line 138, in spacy.strings.StringStore.add
TypeError: [E017] Can only add unicode or bytes. Got type: <class ‘NoneType’>
Can someone help me to work it out?Thanks!!!