pii 0.1.0

PII detection and anonymization with deterministic, capability-aware NLP pipelines.
Documentation
//! Recognizer traits and implementations.
//!
//! Recognizers emit candidate detections based on text and NLP artifacts.
//! They should not mutate input or depend on global state. This enables
//! deterministic behavior and makes the pipeline composable.
//!
//! Use built-in recognizers as a baseline, or implement your own to encode
//! domain-specific identifiers and business rules.

use crate::types::{Detection, EntityType, NlpArtifacts};

/// A detector that emits candidate spans for one or more entity types.
pub trait Recognizer: Send + Sync {
    /// Returns the recognizer name used for auditing.
    fn name(&self) -> &str;
    /// Returns the entity types emitted by this recognizer.
    fn supported_entities(&self) -> &[EntityType];
    /// Executes detection against the provided text and artifacts.
    fn analyze(&self, text: &str, artifacts: &NlpArtifacts) -> Vec<Detection>;
}

pub mod dictionary;
pub mod ner;
pub mod regex;
pub mod validator;