to_spacy function cannot handle labeled input with skipped result
Closed this issue · 2 comments
caixiaocherry commented
if i clicked 'skip' in annotator.annotate(), the result df_labels gonna have some NAN records. This will cause the error in to_spacy() function with following error:
318 db = DocBin()
319 training_data = (df['annotations']).tolist()
--> 320 for text, annotations in training_data:
322 ents = []
323 doc = self.nlp(text)
ValueError: not enough values to unpack (expected 2, got 0)
ieriii commented
Thank you for this and the clear explanation of hte issue.
I've just a fix to the to_spacy
method which should fix this. Please update spacy-annotator to version 2.1.3.
Let me know if you have any questions. Thanks.
caixiaocherry commented
Thank you for the prompted response!