Metrics are mean ± sample standard deviation over seeds [42, 22, 202].
1{
2 "0": "chinh_tri_xa_hoi",
3 "1": "doi_song",
4 "2": "khoa_hoc",
5 "3": "kinh_doanh",
6 "4": "phap_luat",
7 "5": "suc_khoe",
8 "6": "the_gioi",
9 "7": "the_thao",
10 "8": "van_hoa",
11 "9": "vi_tinh"
12}
1import torch
2from transformers import AutoModelForSequenceClassification, AutoTokenizer
3
4model_id = "BaoNhan/wikibert-VNTC-10"
5tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=False)
6model = AutoModelForSequenceClassification.from_pretrained(model_id)
7
8text = "Đội tuyển Việt Nam giành chiến thắng trong trận đấu bóng đá quốc tế."
9inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=256)
10with torch.no_grad():
11 probabilities = model(**inputs).logits.softmax(dim=-1)[0]
12predicted_id = int(probabilities.argmax())
13print(model.config.id2label[predicted_id], probabilities.tolist())
VNTC is an early news corpus whose topics and lexical distribution may not reflect current Vietnamese media. Right truncation may omit decisive information near the end of long articles. Topic labels may also correlate with publisher-specific editorial style. This model is intended for research and should not be treated as a general-purpose factuality or content-quality system.
1@inproceedings{vu2007comparative,
2 title={A Comparative Study on Vietnamese Text Classification Methods},
3 author={Vu, Hoang Cong Duy and Dien, Dinh and Nguyen, Le Nguyen and Ngo, Quoc Hung},
4 booktitle={2007 IEEE International Conference on Research, Innovation and Vision for the Future},
5 pages={267--273},
6 year={2007},
7 organization={IEEE}
8}