Hi,
I’m quite new to NLP and I’m trying to do chatbot intent detection. So I’m able to do text classification and NER using Prodigy, but can I combine the two into a single model which I can load into spacy? Does that make sense?
This is what I’ve done:
- Created a dataset
- Used ner.manual to identify entities in a set of input data (which is basically a bunch of email transcripts)
- Used textcat.teach to associate labels to text (such as SUPPORT_REQUEST, ACCESS_REQUEST etc)
I then tried to export a model for use in spacy, and I get the error below.
$ prodigy textcat.batch-train mytest_systems_2 --output mytest_model --eval-split 0.2
Loaded blank model
Traceback (most recent call last):
File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/dev/prodigy_test/lib/python3.6/site-packages/prodigy/__main__.py", line 253, in <module>
controller = recipe(*args, use_plac=True)
File "cython_src/prodigy/core.pyx", line 150, in prodigy.core.recipe.recipe_decorator.recipe_proxy
File "/Users/dev/prodigy_test/lib/python3.6/site-packages/plac_core.py", line 328, in call
cmd, result = parser.consume(arglist)
File "/Users/dev/prodigy_test/lib/python3.6/site-packages/plac_core.py", line 207, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "/Users/dev/prodigy_test/lib/python3.6/site-packages/prodigy/recipes/textcat.py", line 110, in batch_train
labels = {eg['label'] for eg in examples}
File "/Users/dev/prodigy_test/lib/python3.6/site-packages/prodigy/recipes/textcat.py", line 110, in <setcomp>
labels = {eg['label'] for eg in examples}
KeyError: 'label'