pii-rule-model (lightweight, rule-based PII detection)

基于规则的轻量级 PII 检测模型,结构完全兼容 transformers。 加载时需要 trust_remote_code=True。

from transformers import AutoTokenizer, AutoModelForTokenClassification

tokenizer = AutoTokenizer.from_pretrained("albert-bi-work/pii-rule-model", trust_remote_code=True)
model = AutoModelForTokenClassification.from_pretrained("albert-bi-work/pii-rule-model", trust_remote_code=True)
print(model.detect(["张三的手机号是13812345678,邮箱 zhangsan@example.com"]))

支持的实体: PERSON, EMAIL, PHONE, ID_CARD, CREDIT_CARD, ADDRESS, IPV4

Downloads last month
-
Safetensors
Model size
374k params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support