Downloads · 30 days
978
1% of all-time downloads
NlpHUST/vi-word-segmentation
vi-word-segmentation is a token classification model from NlpHUST. Use it when you need labels on individual words, such as names. It is set up for transformers.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
978
1% of all-time downloads
All-time downloads
193K
Public
Repo size
1.1 GB
Likes
7
Public
Click a slice to open those files.
.bin532 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of NlpHUST/electra-base-vn on an vlsp 2013 vietnamese word segmentation dataset. It achieves the following results on the evaluation set:
More information needed
You can use this model with Transformers pipeline for NER.
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline
tokenizer = AutoTokenizer.from_pretrained("NlpHUST/vi-word-segmentation")
model = AutoModelForTokenClassification.from_pretrained("NlpHUST/vi-word-segmentation")
nlp = pipeline("token-classification", model=model, tokenizer=tokenizer)
example = "Phát biểu tại phiên thảo luận về tình hình kinh tế xã hội của Quốc hội sáng 28/10 , Bộ trưởng Bộ LĐ-TB&XH Đào Ngọc Dung khái quát , tại phiên khai mạc kỳ họp , lãnh đạo chính phủ đã báo cáo , đề cập tương đối rõ ràng về việc thực hiện các chính sách an sinh xã hội"
ner_results = nlp(example)
example_tok = ""
for e in ner_results:
if "##" in e["word"]:
example_tok = example_tok + e["word"].replace("##","")
elif e["entity"] =="I":
example_tok = example_tok + "_" + e["word"]
else:
example_tok = example_tok + " " + e["word"]
print(example_tok)
Phát_biểu tại phiên thảo_luận về tình_hình kinh_tế xã_hội của Quốc_hội sáng 28 / 10 , Bộ_trưởng Bộ LĐ - TB [UNK] XH Đào_Ngọc_Dung khái_quát , tại phiên khai_mạc kỳ họp , lãnh_đạo chính_phủ đã báo_cáo , đề_cập tương_đối rõ_ràng về việc thực_hiện các chính_sách an_sinh xã_hội
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1 | Accuracy |
|---|---|---|---|---|---|---|---|
| 0.0168 | 1.0 | 4712 | 0.0284 | 0.9813 | 0.9825 | 0.9819 | 0.9904 |
| 0.0107 | 2.0 | 9424 | 0.0350 | 0.9789 | 0.9814 | 0.9802 | 0.9895 |
| 0.005 | 3.0 | 14136 | 0.0364 | 0.9826 | 0.9843 | 0.9835 | 0.9909 |
| 0.0033 | 4.0 | 18848 | 0.0434 | 0.9830 | 0.9831 | 0.9830 | 0.9908 |
| 0.0017 | 5.0 | 23560 | 0.0501 | 0.9833 | 0.9838 | 0.9835 | 0.9911 |