metadata
license: apache-2.0
base_model: answerdotai/ModernBERT-base
tags:
- token-classification
- named-entity-recognition
- pii
- modernbert
language:
- en
pipeline_tag: token-classification
modernbert-pii
ModernBERT fine-tuned for token classification (NER) to detect PII in Australian clinical notes. Labels use the BIO scheme over these entity types:
ACDADDRESSAGEATTENDING_NURSECOUNTRY_OF_BIRTHDATE_OF_BIRTHDVA_NUMBEREMAILFULL_NAMEGUARDIANSHIPIHIMEDICARE_NUMBERMRNNEXT_OF_KINOCCUPATIONOTHER_CLINICAL_STAFFPHONE_NUMBERPREFERRED_NAMEPRIVATE_HEALTH_NUMBERREFERRING_GPSEX_GENDERTREATING_CLINICIANWORKCOVER
Usage
from transformers import pipeline
ner = pipeline("token-classification", model="Cbezz/modernbert-pii", aggregation_strategy="simple")
ner("Patient John Smith, DOB 12/03/1980, MRN 4456219.")