Skip to main content

Crate gaze_recognizers

Crate gaze_recognizers 

Source
Expand description

Built-in recognizer backends for the Gaze pseudonymization pipeline.

§Feature flags

FeatureDefaultWhat it enables
phone-parseryesParser-backed E.164 and national phone validation via phonenumber
safety-netnoNerSafetyNet observer pass
safety-net-openainoOpenAI-filter safety net subprocess; also enables safety-net
test-supportnoFixture helpers for safety-net tests; not for production use

With phone-parser disabled, parser-backed phone validators fail closed. There is no silent regex-only fallback, so phone spans that require parser validation are not detected.

Modules§

safety_netsafety-net
validators
Deterministic checksum validators re-exported for recognizer tests and adopters.

Structs§

AnchoredMatchRecognizer
Recognizes person names near literal locale cues.
DictionaryRecognizer
Lookup-based Recognizer for tenant-specific PII.
LabelMap
Labels file format.
LocaleAwareModelRegistry
Registry that resolves locale-aware model backends by locale fallback tier.
ModelHints
Execution hints supplied by the caller.
ModelInput
Input passed to a locale-aware model.
ModelSpan
Span emitted by a locale-aware model.
NerDetector
NER detector backed by a pinned local model artifact set. Multiple NerDetector instances with different backends may be stacked in the same Pipeline; span-conflict resolution picks winners across detectors.
NerOptions
NerRecognizer
RegexDetector
Regex-backed Recognizer implementation.
VerifiedArtifacts
Verified artifact handles. Produced by verify_artifacts, consumed by NerDetector::load. Split out so the load contract can be exercised by unit tests without initializing a backend runtime.

Enums§

AnchoredBoundary
CuePosition
ModelError
Closed error set for locale-aware model routing and inference.
ModelStage
Pipeline stage requesting model inference.
NameShape
NerBackendKind
Driver-style enum for NER backends. Backends are swappable under a common NerBackend trait; each owns its own model-specific state. Multiple NerDetector instances (e.g. a BERT token-classifier plus a GLiNER zero-shot model) can be stacked in the same Pipeline — span-conflict resolution picks winners across all detectors.
NerLoadError
NormalizerKind
RecognizerError
Error type for recognizer construction and rulepack field validation.
Regionphone-parser
Regions supported by national phone validators.
SafetyTier
Rulepack recognizer activation tier.
ValidatorKind
Closed set of validator implementations used by validator-backed recognizers.

Traits§

LocaleAwareModel
Locale-aware model backend for Pass-2 NER and Pass-3 safety-net inference.

Functions§

embedded
is_person_name_candidate

Type Aliases§

Result
Result alias for recognizer-local operations.