We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have use the following piece of code to convert json to spacy while validationg using spacy --debug i get whitespace error:
please help me how to resolve this
for text, annot in tqdm(TRAIN_DATA['annotations']): doc = nlp.make_doc(text) ents = [] for start, end, label in annot["entities"]: span = doc.char_span(start, end, label=label, alignment_mode="contract") if span is None: print("Skipping entity") else: ents.append(span) doc.ents = ents db.add(doc) db.to_disk("train_data.spacy")
The text was updated successfully, but these errors were encountered:
{"classes":["SOFTWARE_NAME","JOB_TYPE","EDUCATION","UNIVERSITY","DEGREE","YEARS_OF_EXPERIENCE","STATE","CITY","COUNTRY","PROGRAMING_CONCEPT","COMPANY_NAME","PROGRAMMING_LANGUAGE","FRAMEWORKS","SOFT_SKILLS","JOB_TITLE","NAME","EMAIL","PH.NO"],"annotations":[["Zixuan Wu zixwu@ucdavis.edu",{"entities":[[0,9,"NAME"],[10,27,"EMAIL"]]}],["1363 Briones Ct | Pleasanton, CA 94588 | (510) 676-7461",{"entities":[[41,55,"PH.NO"]]}]]}
Sorry, something went wrong.
No branches or pull requests
How to reproduce the behaviour
I have use the following piece of code to convert json to spacy while validationg using spacy --debug i get whitespace error:
please help me how to resolve this
for text, annot in tqdm(TRAIN_DATA['annotations']):
doc = nlp.make_doc(text)
ents = []
for start, end, label in annot["entities"]:
span = doc.char_span(start, end, label=label, alignment_mode="contract")
if span is None:
print("Skipping entity")
else:
ents.append(span)
doc.ents = ents
db.add(doc)
db.to_disk("train_data.spacy")
Info about spaCy
The text was updated successfully, but these errors were encountered: