mirror of
https://github.com/data-privacy-stack/presidio.git
synced 2026-09-21 13:38:05 -05:00
docs(api): document global_regex_flags and deny_list_score on PatternRecognizer (#2255)
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
This commit is contained in:
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user