Skip to content

Commit

Permalink
bugfix for self.aggregate_pronouns logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jftuga committed Jan 3, 2025
1 parent 6700681 commit fec9a2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deidentification/deidentification.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def deidentify(self, text: str) -> str:
if self.config.debug:
self.__debug_log(f"deidentify(): first iter, persons={len(self.all_persons)}")
self._find_all_pronouns()
self.aggregate_pronouns.extend(self.all_pronouns)

if self.config.debug:
self.__print_entities_table(self.all_persons)
Expand All @@ -142,7 +143,6 @@ def deidentify(self, text: str) -> str:
self.__debug_log(f"deidentify(): next iter, persons={len(self.all_persons)}")
if persons_count == 0:
break
self.aggregate_pronouns.extend(self.all_pronouns)
self.all_pronouns = []
merged = self._merge_metadata()
replaced_text = self._replace_merged(replaced_text, merged)
Expand Down

0 comments on commit fec9a2e

Please # to comment.