Skip to content

Document enabling country-specific recognizers via registry override - #2310

Closed
bhaskargurram-ai wants to merge 1 commit into
data-privacy-stack:mainfrom
bhaskargurram-ai:docs/recognizer-registry-conf-override
Closed

bhaskargurram-ai wants to merge 1 commit into
data-privacy-stack:mainfrom
bhaskargurram-ai:docs/recognizer-registry-conf-override

Conversation

@bhaskargurram-ai

Copy link
Copy Markdown

Several country-specific pattern recognizers (ItFiscalCodeRecognizer, EsNifRecognizer, PlPeselRecognizer, ...) are registered in default_recognizers.yaml for their native language only. The published presidio-analyzer image ships with supported_languages: [en], so on that image entities such as IT_FISCAL_CODE cannot be detected at all, and a request that mixes them with supported entities returns 200 with the unsupported entity silently missing. There was no documentation of how to enable those recognizers without rebuilding the image.

Add a how-to section to the recognizer registry page describing the RECOGNIZER_REGISTRY_CONF_FILE override: copy default_recognizers.yaml, set supported_languages to en on the recognizer entry, mount the file into the container, and verify via /supportedentities and /analyze. State that the file replaces (does not merge with) the default registry, that adding "it" to the registry alone breaks startup because the analyzer and NLP engine only support "en", and that since #2259 partially unsupported entity requests log a deprecation warning while still returning partial results. Cross-link the section from the supported entities (Italy), installation, languages, filtering by country and analyzer engine provider pages.

Refs #2256. Completes the docs part left open when PR #2271 was closed.

Change Description

Describe your changes

Issue reference

Fixes #XX

Checklist

  • I have reviewed the contribution guidelines
  • I agree to follow this project's Code of Conduct
  • I confirm that I have the right to submit this contribution and that it does not knowingly contain proprietary or confidential code.
  • My code includes unit tests
  • All unit tests and lint checks pass locally
  • My PR contains documentation updates / additions if required

Several country-specific pattern recognizers (ItFiscalCodeRecognizer,
EsNifRecognizer, PlPeselRecognizer, ...) are registered in
default_recognizers.yaml for their native language only. The published
presidio-analyzer image ships with supported_languages: [en], so on that
image entities such as IT_FISCAL_CODE cannot be detected at all, and a
request that mixes them with supported entities returns 200 with the
unsupported entity silently missing. There was no documentation of how
to enable those recognizers without rebuilding the image.

Add a how-to section to the recognizer registry page describing the
RECOGNIZER_REGISTRY_CONF_FILE override: copy default_recognizers.yaml,
set supported_languages to en on the recognizer entry, mount the file
into the container, and verify via /supportedentities and /analyze.
State that the file replaces (does not merge with) the default registry,
that adding "it" to the registry alone breaks startup because the
analyzer and NLP engine only support "en", and that since data-privacy-stack#2259
partially unsupported entity requests log a deprecation warning while
still returning partial results. Cross-link the section from the
supported entities (Italy), installation, languages, filtering by
country and analyzer engine provider pages.

Refs data-privacy-stack#2256. Completes the docs part left open when PR data-privacy-stack#2271 was closed.
@bhaskargurram-ai

Copy link
Copy Markdown
Author

Closing this since #2311 already documents the RECOGNIZER_REGISTRY_CONF_FILE override for #2256. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant