Skip to content

Feature/es passport recognizer#2011

Merged
SharonHart merged 8 commits into
microsoft:mainfrom
asensionacher:feature/es_passport_recognizer
May 4, 2026
Merged

Feature/es passport recognizer#2011
SharonHart merged 8 commits into
microsoft:mainfrom
asensionacher:feature/es_passport_recognizer

Conversation

@asensionacher
Copy link
Copy Markdown
Contributor

Change Description

  • Adds spanish passport analyzer

Issue reference

Fixes #2010

Checklist

  • I have reviewed the contribution guidelines
  • I have signed the CLA (if required)
  • My code includes unit tests
  • All unit tests and lint checks pass locally
  • My PR contains documentation updates / additions if required

Comment thread e2e-tests/resources/test_ollama_enabled_recognizers.yaml Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new predefined analyzer recognizer for Spanish passport numbers (ES_PASSPORT) to the Presidio Analyzer, wiring it into the predefined recognizer registry, default/e2e configs, tests, and documentation.

Changes:

  • Introduces EsPassportRecognizer (Spain, es) as a PatternRecognizer with regex + context.
  • Adds unit tests for the new recognizer and registers it in the predefined recognizers package exports.
  • Updates default/e2e recognizer configuration plus public docs (supported_entities.md) and CHANGELOG.md.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
presidio-analyzer/presidio_analyzer/predefined_recognizers/country_specific/spain/es_passport_recognizer.py Adds the EsPassportRecognizer implementation (regex + context).
presidio-analyzer/presidio_analyzer/predefined_recognizers/country_specific/spain/init.py Exposes the new Spain recognizer in the country package.
presidio-analyzer/presidio_analyzer/predefined_recognizers/init.py Exports EsPassportRecognizer in the top-level predefined recognizers module.
presidio-analyzer/presidio_analyzer/conf/default_recognizers.yaml Registers EsPassportRecognizer in the default recognizer registry (disabled by default).
presidio-analyzer/tests/test_es_passport_recognizer.py Adds unit tests validating detection, spans, and score ranges.
e2e-tests/resources/test_ollama_enabled_recognizers.yaml Includes EsPassportRecognizer in the e2e-enabled recognizers set.
docs/supported_entities.md Documents the new ES_PASSPORT entity in the public supported-entities list.
CHANGELOG.md Notes the addition of the Spanish passport recognizer.

Comment thread presidio-analyzer/presidio_analyzer/conf/default_recognizers.yaml Outdated
Comment thread docs/supported_entities.md Outdated
@asensionacher
Copy link
Copy Markdown
Contributor Author

Solved comments

@SharonHart SharonHart merged commit 35f95a3 into microsoft:main May 4, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Spanish (es) passport analyzer

3 participants