PhoBERT-based Named Entity Recognition model for Vietnamese
Căn cước công dân (CCCD)
documents.
Model Description
This model is fine-tuned from
vinai/phobert-base
for token-level NER
on Vietnamese administrative/medical documents. It extracts structured fields from OCR text output.
Base model
: vinai/phobert-base
Task
: Token Classification (NER)
Language
: Vietnamese (vi)
Document type
: Căn cước công dân (CCCD)
Number of labels
: 13
Labels
B-date_of_birth
B-date_of_expiry
B-full_name
B-gender
B-id_number
B-nationality
B-place_of_origin
B-place_of_residence
I-full_name
I-nationality
I-place_of_origin
I-place_of_residence
Usage
With VietNerm SDK
from vietnerm import VietNerm
ner = VietNerm(doc_type="cccd", model_path="ngocthanhdoan/phobert-cccd-ner")
result = ner.extract("your document text here")
print(result)
With Transformers
from transformers import AutoTokenizer, AutoModelForTokenClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("ngocthanhdoan/phobert-cccd-ner")
model = AutoModelForTokenClassification.from_pretrained("ngocthanhdoan/phobert-cccd-ner")
text = "your document text here"
inputs = tokenizer(text, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
predictions = torch.argmax(outputs.logits, dim=-1)
Training
Dataset
: Synthetically generated with OCR noise simulation
Framework
: HuggingFace Transformers + Trainer API
Optimizer
: AdamW (lr=2e-5)
Epochs
: 5-7 (with early stopping)
About VietNerm
VietNerm is a Document AI Factory for Vietnamese documents. It provides a complete pipeline
from template-based synthetic data generation to model training and deployment.
phobert-cccd-ner huggingface.co is an AI model on huggingface.co that provides phobert-cccd-ner's model effect (), which can be used instantly with this ngocthanhdoan phobert-cccd-ner model. huggingface.co supports a free trial of the phobert-cccd-ner model, and also provides paid use of the phobert-cccd-ner. Support call phobert-cccd-ner model through api, including Node.js, Python, http.
phobert-cccd-ner huggingface.co is an online trial and call api platform, which integrates phobert-cccd-ner's modeling effects, including api services, and provides a free online trial of phobert-cccd-ner, you can try phobert-cccd-ner online for free by clicking the link below.
ngocthanhdoan phobert-cccd-ner online free url in huggingface.co:
phobert-cccd-ner is an open source model from GitHub that offers a free installation service, and any user can find phobert-cccd-ner on GitHub to install. At the same time, huggingface.co provides the effect of phobert-cccd-ner install, users can directly use phobert-cccd-ner installed effect in huggingface.co for debugging and trial. It also supports api for free installation.