Entity-Recognition-In-Resumes-SpaCy
Entity-Recognition-In-Resumes-SpaCy copied to clipboard
Read annotated data with Doccano
Hi, Please how can i read my annotated data with another tool named Doccano. 1) Here is my annotated data's form:
"annotation": [ [ 79, 99, "Nom complet" ],
2) The code that i want to change to read my annotated data:
for line in lines: data = json.loads(line) text = data['content'] entities = [] for annotation in data['annotation']: #only a single point in text annotation. point = annotation['points'][0] labels = annotation['label'] # handle both list of labels or a single label. if not isinstance(labels, list): labels = [labels] for label in labels: #dataturks indices are both inclusive [start, end] but spacy is not [start, end) entities.append((point['start'], point['end'] + 1 ,label))