Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ def anonymize_text_including_proper_nouns_and_addresses(text):
|
|
52 |
# For recognized named entities
|
53 |
label = ent_or_token.label_
|
54 |
|
55 |
-
if label in ['ORG', 'PERSON', 'GPE', 'LOC', 'FAC']: # Optionally include'PROPN' for more restriction
|
56 |
original = ent_or_token.text
|
57 |
counters[label] += 1
|
58 |
placeholder_with_counter = f"{label}__{counters[label]}"
|
|
|
52 |
# For recognized named entities
|
53 |
label = ent_or_token.label_
|
54 |
|
55 |
+
if label in ['ORG', 'PERSON', 'GPE', 'LOC', 'FAC', 'PROPN']: # Optionally include'PROPN' for more restriction
|
56 |
original = ent_or_token.text
|
57 |
counters[label] += 1
|
58 |
placeholder_with_counter = f"{label}__{counters[label]}"
|