Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in PresidioAnalyzerWrapper: 'ORGANIZATION' is not removed by default #84

Open
ebotiab opened this issue Oct 26, 2023 · 1 comment
Open

Comments

@ebotiab
Copy link

ebotiab commented Oct 26, 2023

The method _update_recognizers_based_on_entities_to_keep add "ORGANIZATION" entity:

Add ORGANIZATION as it is removed by default
"""
supported_entities = analyzer_engine.get_supported_entities(
language=self.language
)

if "ORGANIZATION" in self.entities and "ORGANIZATION" not in supported_entities:

But it is actually not removed by default, which could be checked just by running:

ORGANIZATION" in AnalyzerEngine().get_supported_entities("en")
True  # output
@ebotiab ebotiab changed the title Fix PresidioAnalyzerWrapper: 'ORGANIZATION' is not removed by default Bug in PresidioAnalyzerWrapper: 'ORGANIZATION' is not removed by default Oct 26, 2023
@omri374
Copy link
Contributor

omri374 commented Dec 31, 2023

If I understand correctly, this depends on your Presidio analyzer version and configuration. This logic adds ORGANIZATION in case it was removed in the Presidio Analyzer logic. It could be that the Analyzer version actually has ORGANIZATION inside, therefore this logic is not needed.

Is that the case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants