pii 0.1.0

PII detection and anonymization with deterministic, capability-aware NLP pipelines.
Documentation
//! PII detection and anonymization interfaces.
//!
//! This crate provides a deterministic pipeline for detecting and redacting
//! personally identifiable information (PII). It is designed for CPU-only
//! execution, explicit auditability, and controlled degradation when certain
//! language features (lemma, POS, NER) are unavailable.
//!
//! Typical usage:
//! - Build an `Analyzer` with an `NlpEngine`, recognizers, and policy.
//! - Run `analyze` to get detections with stable byte offsets.
//! - Pass detections to the `Anonymizer` with an operator configuration.
//!
//! The pipeline is modular: you can swap in a custom `NlpEngine`, add custom
//! recognizers, or augment the system with Candle-based NER when needed.
//!
//! Specification: `docs/rfc-1200-pii.md`.

pub mod analyzer;
pub mod anonymize;
pub mod capabilities;
pub mod config;
pub mod context;
pub mod decision;
pub mod error;
pub mod nlp;
pub mod presets;
pub mod profile;
pub mod recognizers;
pub mod types;

pub use analyzer::Analyzer;
pub use anonymize::{AnonymizeConfig, Anonymizer, Operator};
pub use capabilities::Capabilities;
pub use config::PolicyConfig;
pub use error::{PiiError, PiiResult};
pub use presets::default_recognizers;
pub use profile::{ContextTerms, LanguageProfile, LanguageRegistry};
pub use types::{
    AnalyzeResult, AnonymizeResult, AnonymizedItem, Detection, DetectionExplanation, EntityType,
    Language, NerSpan, NlpArtifacts, Token, LANGUAGE_DE, LANGUAGE_EN, LANGUAGE_ES,
};

/// Relative path to the RFC specification document.
pub const SPEC_PATH: &str = "docs/rfc-1200-pii.md";