emanuelaboros commited on
Commit
88578cc
·
1 Parent(s): 8f04684

update field names

Browse files
Files changed (1) hide show
  1. newsagency_ner.py +3 -3
newsagency_ner.py CHANGED
@@ -133,12 +133,12 @@ def get_entities(tokens, tags, confidences, text):
133
  entity_end_position = indices[1]
134
  entities.append(
135
  {
136
- "entity": original_label,
137
- "score": np.round(
138
  np.average(confidences[idx : idx + len(subtree)]) * 100.0, 2
139
  ),
140
  "index": idx,
141
- "word": original_string,
142
  "start": entity_start_position,
143
  "end": entity_end_position,
144
  }
 
133
  entity_end_position = indices[1]
134
  entities.append(
135
  {
136
+ "type": original_label,
137
+ "confidence": np.round(
138
  np.average(confidences[idx : idx + len(subtree)]) * 100.0, 2
139
  ),
140
  "index": idx,
141
+ "surface": original_string,
142
  "start": entity_start_position,
143
  "end": entity_end_position,
144
  }