santanche commited on
Commit
c4d8c51
·
1 Parent(s): 4c96155

fix (ner): entity type reference

Browse files
Files changed (1) hide show
  1. server.py +1 -1
server.py CHANGED
@@ -139,7 +139,7 @@ def format_ner_result(text: str, entities: List[Dict]) -> str:
139
  for entity in sorted_entities:
140
  start = entity['start']
141
  end = entity['end']
142
- entity_type = entity['entity_group']
143
  original_text = text[start:end]
144
 
145
  # Replace entity with labeled version
 
139
  for entity in sorted_entities:
140
  start = entity['start']
141
  end = entity['end']
142
+ entity_type = entity['entity_type']
143
  original_text = text[start:end]
144
 
145
  # Replace entity with labeled version