Helsinki-NLP/tatoeba
Updated • 3.28k • 56
How to use nikitast/lang-segmentation-roberta with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("token-classification", model="nikitast/lang-segmentation-roberta") # Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("nikitast/lang-segmentation-roberta")
model = AutoModelForTokenClassification.from_pretrained("nikitast/lang-segmentation-roberta")RoBERTa fine-tuned on small parts of Open Subtitles, Oscar and Tatoeba datasets (~9k samples per language).
Implemented heuristic algorithm for multilingual training data creation with generation of target masks- https://github.com/n1kstep/lang-classifier
| data source | language |
|---|---|
| open_subtitles | ka, he, en, de |
| oscar | be, kk, az, hu |
| tatoeba | ru, uk |
The metrics obtained from validation on the another part of dataset (~1k samples per language).
| Validation Loss | Precision | Recall | F1-Score | Accuracy |
|---|---|---|---|---|
| 0.029172 | 0.919623 | 0.933586 | 0.926552 | 0.991883 |