Views
No views yet
Model này được train hoàn toàn trên dữ liệu giả lập (synthetic/mockup data), KHÔNG sử dụng dữ liệu cá nhân thật.
vinai/phobert-base for token-level NER on Vietnamese administrative/medical documents. It extracts structured fields from OCR text output.B-NATIONALITYB-addressB-classB-date_of_birthB-expiry_dateB-full_nameB-id_numberB-issue_dateB-nationalityI-NATIONALITYI-addressI-full_nameI-nationality1from vietnerm import VietNerm
2
3ner = VietNerm(doc_type="gplx", model_path="ngocthanhdoan/phobert-gplx-ner")
4result = ner.extract("your document text here")
5print(result)1from transformers import AutoTokenizer, AutoModelForTokenClassification
2import torch
3
4tokenizer = AutoTokenizer.from_pretrained("ngocthanhdoan/phobert-gplx-ner")
5model = AutoModelForTokenClassification.from_pretrained("ngocthanhdoan/phobert-gplx-ner")
6
7text = "your document text here"
8inputs = tokenizer(text, return_tensors="pt")
9
10with torch.no_grad():
11 outputs = model(**inputs)
12 predictions = torch.argmax(outputs.logits, dim=-1)pip install vietnerm