[package]
name = "gaze-recognizers"
version = "0.8.0"
edition = "2021"
rust-version = "1.89"
license.workspace = true
repository.workspace = true
homepage.workspace = true
description = "Built-in recognizers for Gaze"
readme = "README.md"
keywords = ["pii", "gaze", "ner", "recognizers"]
categories = ["text-processing"]
exclude = ["assets/ner/*.onnx", "assets/ner/*.bin", "assets/ner/*.safetensors"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[features]
# phone-parser feature gates phonenumber dep; default-on for gaze-cli, default-off for raw lib.
default = ["phone-parser"]
phone-parser = ["dep:phonenumber", "gaze-types/phone-parser"]
safety-net = []
safety-net-openai = ["safety-net"]
safety-net-kiji = ["safety-net"]
test-support = ["safety-net"]

[dependencies]
aho-corasick = "1"
gaze-types = { workspace = true }
hex = "0.4"
ndarray = "0.16"
ort = { version = "=2.0.0-rc.12", default-features = false, features = ["ndarray", "std", "download-binaries", "tls-rustls"] }
phonenumber = { version = "0.3.9", default-features = false, optional = true }
regex = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha2 = "0.10"
sha3 = "0.10"
thiserror = "1"
tokenizers = { version = "0.22", default-features = false, features = ["onig"] }
tracing = "0.1"
unicode-normalization = "0.1"

[dev-dependencies]
criterion = "0.5"
gaze = { path = "../gaze", package = "gaze-pii" }
gaze-assembly = { path = "../gaze-assembly" }
serial_test = "3"
tempfile = "3"

[[test]]
name = "coverage_loop"

[[test]]
name = "context_sensitivity_v0_6"
required-features = ["test-support"]

[[test]]
name = "mock_safety_net"
required-features = ["test-support"]

[[test]]
name = "openai_filter_subprocess"
required-features = ["safety-net-openai"]

[[test]]
name = "kiji_distilbert_subprocess"
required-features = ["safety-net-kiji"]

[[bench]]
name = "dictionary"
harness = false

[[bench]]
name = "restore_pass2"
harness = false
