1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (c) 2026 Censgate LLC.
// Licensed under the Business Source License 1.1 (BUSL-1.1).
// See the LICENSE file in the project root for license details,
// including the Additional Use Grant, Change Date, and Change License.
//! NER-based PII Recognition using ONNX Runtime
//!
//! This crate provides Named Entity Recognition (NER) capabilities for PII detection
//! using quantized ONNX models for efficient inference.
//!
//! # Features
//!
//! - ONNX Runtime integration for model inference
//! - Support for quantized int8 models
//! - Token-based NER with entity span detection
//! - Compatible with various NER model architectures (BERT, RoBERTa, etc.)
//!
//! # Example
//!
//! ```no_run
//! use redact_ner::NerRecognizer;
//! use redact_core::recognizers::Recognizer;
//!
//! // Load model
//! let recognizer = NerRecognizer::from_file("model.onnx").unwrap();
//!
//! // Analyze text
//! let text = "John Doe works at Acme Corp in New York";
//! let results = recognizer.analyze(text, "en").unwrap();
//!
//! for result in results {
//! println!("{:?}: {}", result.entity_type, result.text.unwrap());
//! }
//! ```
pub use ;