Views
No views yet
from transformers import pipeline
pipe = pipeline(task="token-classification", model="uygarkurt/convbert-restore-punctuation-turkish")
sample_text = "Türkiye toprakları üzerindeki ilk yerleşmeler Yontma Taş Devri'nde başlar Doğu Trakya'da Traklar olmak üzere Hititler Frigler Lidyalılar ve Dor istilası sonucu Yunanistan'dan kaçan Akalar tarafından kurulan İyon medeniyeti gibi çeşitli eski Anadolu medeniyetlerinin ardından Makedonya kralı Büyük İskender'in egemenliğiyle ve fetihleriyle birlikte Helenistik Dönem başladı"
out = pipe(sample_text)model argument with one of the other available models we provided.data/ directory as train, validation and test splits.| Split | Total | Period (.) | Comma (,) | Question (?) |
|---|---|---|---|---|
| Train | 1471806 | 124817 | 98194 | 9816 |
| Validation | 180326 | 15306 | 11980 | 1199 |
| Test | 182487 | 15524 | 12242 | 1255 |
Precision and Recall and F1 scores for each model and punctuation mark are summarized below.| Model | PERIOD | COMMA | QUESTION | OVERALL | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Score Type | P | R | F1 | P | R | F1 | P | R | F1 | P | R | F1 |
| BERT | 0.972602 | 0.947504 | 0.959952 | 0.576145 | 0.700010 | 0.632066 | 0.927642 | 0.911342 | 0.919420 | 0.825506 | 0.852952 | 0.837146 |
| ELECTRA | 0.972602 | 0.948689 | 0.960497 | 0.576800 | 0.710208 | 0.636590 | 0.920325 | 0.921074 | 0.920699 | 0.823242 | 0.859990 | 0.839262 |
| ConvBERT | 0.972731 | 0.946791 | 0.959585 | 0.576964 | 0.708124 | 0.635851 | 0.922764 | 0.913849 | 0.918285 | 0.824153 | 0.856254 | 0.837907 |
@INPROCEEDINGS{10286690,
author={Kurt, Uygar and Çayır, Aykut},
booktitle={2023 8th International Conference on Computer Science and Engineering (UBMK)},
title={Transformer Based Punctuation Restoration for Turkish},
year={2023},
volume={},
number={},
pages={169-174},
doi={10.1109/UBMK59864.2023.10286690}
}