Skip to content

Commit

Permalink
Update relation extraction log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
lairgiyassir committed Jul 9, 2024
1 parent 2eed441 commit 4cee17c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions itext2kg/graph_integration/itext2kg.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ def extract_entities_for_all_sections(self, sections:List[str], ent_threshold =


def extract_relations_for_all_sections(self, sections:List[str], entities, rel_threshold = 0.8):
print("[INFO] Extracting Entities from the Document", 1)
print("[INFO] Extracting Relations from the Document", 1)

global_relationships = self.irelations_extractor.extract_relations(context=sections[0], entities = entities)

for i in range(1, len(sections)):
print("[INFO] Extracting Entities from the Document", i+1)
print("[INFO] Extracting Relations from the Document", i+1)
entities = self.irelations_extractor.extract_relations(context= sections[i], entities=entities)
processed_relationships, global_relationships_ = self.matcher.process_lists(list1 = entities, list2=global_relationships, for_entity_or_relation="relation", threshold = rel_threshold)

Expand Down

0 comments on commit 4cee17c

Please sign in to comment.