Downloads · 30 days
54
33% of all-time downloads
rm0013/roberta-pii-ner-en
roberta-pii-ner-en is a token classification model from rm0013. Use it when you need labels on individual words, such as names. The card lists the license as mit.
Fine-tuned roberta-base for detecting Personally Identifiable Information (PII) and Payment Card Industry (PCI) data in English text.
Downloads · 30 days
54
33% of all-time downloads
All-time downloads
163
Public
Parameters
124M
496 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors496 MB · 99%
From the Hugging Face model README
Fine-tuned roberta-base for detecting Personally Identifiable Information (PII) and Payment Card Industry (PCI) data in English text.
GitHub: rakmohan/pii-ner-en
| Metric | Score |
|---|---|
| Micro avg F1 | 0.95 |
| Macro avg F1 | 0.94 |
| Weighted avg F1 | 0.95 |
Per-entity metrics are available in classification_report.txt.
from transformers import pipeline
ner = pipeline(
"token-classification",
model="rm0013/roberta-pii-ner-en",
aggregation_strategy="simple"
)
result = ner("Send the invoice to [email protected], card 4111-1111-1111-1111 CVV 123.")
for entity in result:
print(f"{entity['word']:30s} → {entity['entity_group']} ({entity['score']:.2f})")
PII: PERSON_NAME EMAIL PHONE_NUMBER SSN ADDRESS SECONDARYADDRESS DATE_OF_BIRTH DATE TIME AGE GENDER USERNAME PASSWORD IP_ADDRESS URL API_KEY PASSPORT_NUMBER DRIVER_LICENSE ORGANIZATION COMPANYNAME ACCOUNTNAME JOBAREA JOBTITLE JOBTYPE HEIGHT EYECOLOR ORDINALDIRECTION GPS_COORDINATES NEARBYGPSCOORDINATE USERAGENT DEVICE_ID VEHICLE_ID VEHICLEVIN VEHICLEVRM PHONEIMEI
PCI / Financial: CREDIT_CARD CREDIT_CARD_CVV CREDIT_CARD_EXPIRY PIN BANK_ACCOUNT BANK_ROUTING BIC AMOUNT CURRENCY CURRENCYCODE CURRENCYNAME CURRENCYSYMBOL MASKEDNUMBER BITCOINADDRESS ETHEREUMADDRESS LITECOINADDRESS
| Parameter | Value |
|---|---|
| Base model | roberta-base |
| Epochs | 10 (early stopping patience 3) |
| Batch size | 32 |
| Learning rate | 2e-5 |
| Max sequence length | 256 |
| Mixed precision | FP16 |
MIT