Skip to content

Commit a778a71

Browse files
authored
Merge pull request #5 from jftuga/bugfix-save-tokens
bugfix for self.aggregate_pronouns logic
2 parents d4b276f + fec9a2e commit a778a71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deidentification/deidentification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ def deidentify(self, text: str) -> str:
125125
if self.config.debug:
126126
self.__debug_log(f"deidentify(): first iter, persons={len(self.all_persons)}")
127127
self._find_all_pronouns()
128+
self.aggregate_pronouns.extend(self.all_pronouns)
128129

129130
if self.config.debug:
130131
self.__print_entities_table(self.all_persons)
@@ -142,7 +143,6 @@ def deidentify(self, text: str) -> str:
142143
self.__debug_log(f"deidentify(): next iter, persons={len(self.all_persons)}")
143144
if persons_count == 0:
144145
break
145-
self.aggregate_pronouns.extend(self.all_pronouns)
146146
self.all_pronouns = []
147147
merged = self._merge_metadata()
148148
replaced_text = self._replace_merged(replaced_text, merged)

0 commit comments

Comments
 (0)