Views
No views yet
| Metric | Score |
|---|---|
| BPR F1 (boundary precision-recall) | 87.78% |
| Accuracy (exact word match) | 53.61% |
| Evaluated using a holdout test set (10% split) with systematic hyperparameter optimization. |
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3# Load model
4tokenizer = AutoTokenizer.from_pretrained("sharpsy/slovene-morphological-segmentation-sloberta")
5model = AutoModelForSequenceClassification.from_pretrained("sharpsy/slovene-morphological-segmentation-sloberta")
6model.eval()
7# Segment a word
8word = "nepozidan" # "not built-up"
9candidates = [f"{word} <__word-separator> {word[:i]}<__morph-boundary>{word[i:]}"
10 for i in range(1, len(word))]
11inputs = tokenizer(candidates, return_tensors="pt", padding=True)
12predictions = model(**inputs).logits.argmax(1).tolist()
13# Reconstruct segmentation
14segmented = word[0]
15for i, boundary in enumerate(predictions):
16 segmented += ("-" if boundary else "") + word[i+1]
17print(segmented) # Output: ne-po-zid-a-n@inproceedings{pranjic-etal-2026-dataset,
author = {Pranjić, Marko and Kern, Boris and Voršič, Ines and Pollak, Senja},
title = {Slovene Morphological and Word Formation Segmentation: A Novel Dataset and Evaluation},
booktitle = {Proceedings of the 15th Language Resources and Evaluation Conference (LREC 2026)},
month = {May},
year = {2026},
address = {Palma de Mallorca, Spain},
publisher = {European Language Resources Association (ELRA)},
}