emanuelaboros commited on
Commit
45597c2
·
1 Parent(s): 7966679
Files changed (1) hide show
  1. generic_ner.py +6 -1
generic_ner.py CHANGED
@@ -356,9 +356,14 @@ class MultitaskTokenClassificationPipeline(Pipeline):
356
  entities[task] = get_entities(words_list, preds_list, confidence_list, text)
357
 
358
  # add titles to comp entities
 
 
 
 
359
  postprocessed_entities = self.postprocess_entities(entities, text_sentence)
360
 
361
  # Attach "comp.function" entities to the closest non-"comp.function" entity
362
  postprocessed_entities = attach_comp_to_closest(postprocessed_entities)
363
-
 
364
  return postprocessed_entities
 
356
  entities[task] = get_entities(words_list, preds_list, confidence_list, text)
357
 
358
  # add titles to comp entities
359
+ from pprint import pprint
360
+
361
+ print("Before:")
362
+ pprint(entities)
363
  postprocessed_entities = self.postprocess_entities(entities, text_sentence)
364
 
365
  # Attach "comp.function" entities to the closest non-"comp.function" entity
366
  postprocessed_entities = attach_comp_to_closest(postprocessed_entities)
367
+ print("After:")
368
+ pprint(postprocessed_entities)
369
  return postprocessed_entities