emanuelaboros commited on
Commit
ba0e518
·
1 Parent(s): 797e71f

add comp back

Browse files
Files changed (1) hide show
  1. generic_ner.py +3 -2
generic_ner.py CHANGED
@@ -513,9 +513,10 @@ def refine_entities_with_coarse(all_entities, coarse_entities):
513
  entity["type"] = coarse_entity[
514
  "type"
515
  ] # Update the type if the confidence is higher
516
- else:
517
- entity["type"] = entity["type"].split('.')[0]
518
  # No need to append to refined_entities, we're modifying in place
 
 
519
  return all_entities
520
 
521
 
 
513
  entity["type"] = coarse_entity[
514
  "type"
515
  ] # Update the type if the confidence is higher
516
+
 
517
  # No need to append to refined_entities, we're modifying in place
518
+ for entity in all_entities:
519
+ entity["type"] = entity["type"].split(".")[0]
520
  return all_entities
521
 
522