edithram23/PII-redaction-bert
Viewer • Updated • 27.7k • 26
Unified_Clinical_PII_NER is a fine-tuned version of Bio_ClinicalBERT that has been adapted to perform Named Entity Recognition (NER) for both clinical and personally identifiable information (PII) extraction. The model is designed for use in healthcare NLP tasks, enabling the extraction of clinical entities (e.g., diseases, medications) as well as key PII attributes (e.g., first name, last name, DOB, email, etc.) from clinical texts.
To load the model and tokenizer using the Hugging Face Transformers library, use the following code:
from transformers import AutoTokenizer, AutoModelForTokenClassification
model_name = "ku1ithdev/unified-clinical-pii-ner"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForTokenClassification.from_pretrained(model_name)