Views
No views yet
tahrirchi/tahrirchi-bert-base using the Hugging Face Transformers library. It predicts one POS label per token (token classification).uz)tahrirchi/tahrirchi-bert-baseADJ, ADP, ADV, AUX, CCONJ, INTJ, MOD, NOUN, NUM, PART, PRON, PROPN, PUNCT, SCONJ, SYM, VERBlabel2id / id2label mappings were created from the sorted unique tag list found in the dataset.word/TAG formMen/PRON bugun/ADV Toshkentga/PROPN bordim/VERB ./PUNCTKFold(n_splits=5, shuffle=True, random_state=42)).metric_for_best_model="f1", load_best_model_at_end=True-100) precision recall f1-score support
ADJ 0.97 0.97 0.97 1075
ADP 0.97 0.97 0.97 465
ADV 0.95 0.95 0.95 398
AUX 1.00 0.98 0.99 177
CCONJ 1.00 0.98 0.99 389
INTJ 0.96 0.97 0.97 114
MOD 0.97 0.99 0.98 138
NOUN 0.98 0.98 0.98 4195
NUM 0.98 0.99 0.98 315
PART 0.97 0.93 0.95 99
PRON 0.99 0.99 0.99 719
PROPN 0.92 0.95 0.93 340
PUNCT 1.00 1.00 1.00 1916
SCONJ 0.98 0.99 0.98 122
SYM 0.97 0.98 0.98 195
VERB 0.99 0.98 0.98 2150
accuracy 0.98 12807
macro avg 0.97 0.98 0.97 12807
weighted avg 0.98 0.98 0.98 12807pipeline1from transformers import pipeline
2
3model_id = "<your-username>/<your-repo-name>"
4tagger = pipeline(
5 "token-classification",
6 model=model_id,
7 tokenizer=model_id,
8 aggregation_strategy="simple"
9)
10
11text = "Men bugun Toshkentga bordim."
12preds = tagger(text)
13
14for p in preds:
15 print(p["word"], p["entity_group"], float(p["score"]))MOD tag may not map 1:1 to Universal Dependencies (UD) conventions depending on dataset annotation guidelines.