Downloads · 30 days
137
5% of all-time downloads
ParkJunSeong/PIILOT_NER_Model
PIILOT_NER_Model is a token classification model from ParkJunSeong. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of monologg/koelectra-base-v3-discriminator for Personally Identifiable Information (PII) Detection in Korean text.
Downloads · 30 days
137
5% of all-time downloads
All-time downloads
2.8K
Public
Parameters
112M
449 MB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors449 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of monologg/koelectra-base-v3-discriminator for Personally Identifiable Information (PII) Detection in Korean text.
이 모델은 한국어 텍스트 내에서 개인정보(이름, 주민등록번호, 전화번호, 이메일 등)를 식별하기 위해 KoELECTRA를 기반으로 미세조정(Fine-tuning)되었습니다.
이 모델은 다음과 같은 6가지 개인정보 엔티티를 탐지하는 데 사용할 수 있습니다.
| Label | Description | Example |
|---|---|---|
| p_nm | 이름 (Name) | 홍길동 |
| p_rrn | 주민등록번호 (Resident Registration Number) | 900101-1234567 |
| p_ph | 전화번호 (Phone Number) | 010-1234-5678 |
| p_em | 이메일 (Email) | [email protected] |
| p_add | 주소 (Address) | 서울시 강남구 |
| p_ip | IP 주소 (IP Address) | 192.168.0.1 |
| p_acn | 계좌번호 (Account Number) | 123-45-67890 |
| p_pp | 여권번호 (Passport Number) | M12345678 |
| O | 비정형 데이터 (Outside/Non-PII) | 안녕하세요 |
(만약 성능 지표가 있다면 이 부분을 채워주세요, 없다면 생략 가능합니다)
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
# 1. Load Model & Tokenizer
model_name = "ParkJunSeong/PIILOT_NER_Model"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForTokenClassification.from_pretrained(model_name)
# 2. Create Inference Pipeline
# aggregation_strategy="simple" merges tokens (e.g., "홍", "##길동" -> "홍길동")
nlp = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="simple")
# 3. Run Inference
text = "제 이름은 홍길동이고, 전화번호는 010-1234-5678입니다."
results = nlp(text)
# 4. Check Results
for entity in results:
print(f"Entity: {entity['word']}, Label: {entity['entity_group']}, Score: {entity['score']:.4f}")