Commit
·
f74635c
1
Parent(s):
75edbea
debug
Browse files- generic_ner.py +5 -7
generic_ner.py
CHANGED
|
@@ -367,7 +367,7 @@ class MultitaskTokenClassificationPipeline(Pipeline):
|
|
| 367 |
entities[task] = get_entities(words_list, preds_list, confidence_list, text)
|
| 368 |
|
| 369 |
# add titles to comp entities
|
| 370 |
-
from pprint import pprint
|
| 371 |
|
| 372 |
# print("Before:")
|
| 373 |
# pprint(entities)
|
|
@@ -381,16 +381,14 @@ class MultitaskTokenClassificationPipeline(Pipeline):
|
|
| 381 |
all_entities = remove_included_entities(all_entities)
|
| 382 |
# pprint(all_entities)
|
| 383 |
|
| 384 |
-
# pprint(all_entities)
|
| 385 |
-
|
| 386 |
all_entities = remove_trailing_stopwords(all_entities)
|
| 387 |
-
print("After remove_trailing_stopwords:")
|
| 388 |
-
pprint(all_entities)
|
| 389 |
# Attach "comp.function" entities to the closest non-"comp.function" entity
|
| 390 |
# print("After postprocess_entities")
|
| 391 |
all_entities = postprocess_entities(all_entities)
|
| 392 |
|
| 393 |
-
print("After attach_comp_to_closest:")
|
| 394 |
-
pprint(all_entities)
|
| 395 |
# print("\n")
|
| 396 |
return all_entities
|
|
|
|
| 367 |
entities[task] = get_entities(words_list, preds_list, confidence_list, text)
|
| 368 |
|
| 369 |
# add titles to comp entities
|
| 370 |
+
# from pprint import pprint
|
| 371 |
|
| 372 |
# print("Before:")
|
| 373 |
# pprint(entities)
|
|
|
|
| 381 |
all_entities = remove_included_entities(all_entities)
|
| 382 |
# pprint(all_entities)
|
| 383 |
|
|
|
|
|
|
|
| 384 |
all_entities = remove_trailing_stopwords(all_entities)
|
| 385 |
+
# print("After remove_trailing_stopwords:")
|
| 386 |
+
# pprint(all_entities)
|
| 387 |
# Attach "comp.function" entities to the closest non-"comp.function" entity
|
| 388 |
# print("After postprocess_entities")
|
| 389 |
all_entities = postprocess_entities(all_entities)
|
| 390 |
|
| 391 |
+
# print("After attach_comp_to_closest:")
|
| 392 |
+
# pprint(all_entities)
|
| 393 |
# print("\n")
|
| 394 |
return all_entities
|