From 2a36a714a224b9b3310ed4898d103c208bd3a347 Mon Sep 17 00:00:00 2001 From: Mohammed Alkindi Date: Mon, 14 Sep 2026 18:13:12 +0400 Subject: [PATCH] docs(api): document global_regex_flags and deny_list_score on PatternRecognizer PatternRecognizer.from_dict passes every ad_hoc_recognizers key straight to the constructor, so both reach the REST API, but neither appeared in the documented schema. global_regex_flags matters most: it defaults to 26 (DOTALL|MULTILINE|IGNORECASE), which makes every ad-hoc pattern case-insensitive unless a caller overrides it. Closes #1603 --- docs/api-docs/api-docs.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/api-docs/api-docs.yml b/docs/api-docs/api-docs.yml index 6561e31e53..16b91920f7 100644 --- a/docs/api-docs/api-docs.yml +++ b/docs/api-docs/api-docs.yml @@ -592,6 +592,10 @@ components: description: "List of words to be returned as PII if found." items: type: string + deny_list_score: + type: number + format: double + description: "Confidence score for a term identified using a deny-list. Defaults to 1.0." context: description: "List of words to be used to increase confidence if found in the vicinity of detected entities." type: array @@ -600,6 +604,9 @@ components: supported_entity: type: string description: "The name of entity this ad hoc recognizer detects" + global_regex_flags: + type: integer + description: "Regex flags used when matching the patterns and the deny-list, as a bitmask of Python `re` flags. Defaults to 26 (re.DOTALL | re.MULTILINE | re.IGNORECASE), so matching is case-insensitive unless this is overridden." EntityTypes: description: "The supported PII entity types."