Views
No views yet
dbmdz/bert-base-turkish-cased for morphological analysis of the Tatar language. It was trained on a subset of 80,000 sentences from the Tatar Morphological Corpus. The model predicts fine-grained morphological tags (e.g., N+Sg+Nom, V+PRES(Й)+3SG).| Metric | Value | 95% CI |
|---|---|---|
| Token Accuracy | 0.8769 | [0.8742, 0.8795] |
| Micro F1 | 0.8770 | [0.8744, 0.8797] |
| Macro F1 | 0.4098 | [0.3945, 0.4254] |
| POS | Accuracy |
|---|---|
| PUNCT | 1.0000 |
| NOUN | 0.8297 |
| VERB | 0.7904 |
| ADJ | 0.7770 |
| PRON | 0.7488 |
| PART | 0.9438 |
| PROPN | 0.7899 |
| ADP | 0.8400 |
| CCONJ | 0.9628 |
| ADV | 0.8307 |
1## Usage
2
3```python
4from transformers import AutoTokenizer, AutoModelForTokenClassification
5import torch
6
7model_name = "TatarNLPWorld/turkish-bert-tatar-morph"
8tokenizer = AutoTokenizer.from_pretrained(model_name)
9model = AutoModelForTokenClassification.from_pretrained(model_name)
10
11tokens = ["Татар", "теле", "бик", "бай", "."]
12inputs = tokenizer(tokens, is_split_into_words=True, return_tensors="pt", truncation=True)
13outputs = model(**inputs)
14predictions = torch.argmax(outputs.logits, dim=2)
15
16# Get tag mapping from model config
17id2tag = model.config.id2label
18
19word_ids = inputs.word_ids()
20prev_word = None
21for idx, word_idx in enumerate(word_ids):
22 if word_idx is not None and word_idx != prev_word:
23 tag_id = predictions[0][idx].item()
24 if isinstance(id2tag, dict):
25 tag = id2tag.get(str(tag_id), id2tag.get(tag_id, "UNK"))
26 else:
27 tag = id2tag[tag_id] if tag_id < len(id2tag) else "UNK"
28 print(tokens[word_idx], "->", tag)
29 prev_word = word_idxТатар -> N+Sg+Nom
теле -> N+Sg+POSS_3(СЫ)+Nom
бик -> Adv
бай -> Adj
. -> PUNCT1@misc{arabov-turkish-bert-tatar-morph-2026,
2 title = {Turkish BERT fine-tuned for Tatar Morphological Analysis},
3 author = {Arabov Mullosharaf Kurbonovich},
4 year = {2026},
5 publisher = {Hugging Face},
6 url = {https://huggingface.co/TatarNLPWorld/turkish-bert-tatar-morph}
7}