Views
No views yet
| Metric | Score |
|---|---|
| BPR F1 (boundary precision-recall) | 83.05% |
| Accuracy (exact word match) | 52.58% |
| 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-word-formation-segmentation-sloberta")
5model = AutoModelForSequenceClassification.from_pretrained("sharpsy/slovene-word-formation-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-zida-n1@inproceedings{pranjic-etal-2026-dataset,
2 author = {Pranjić, Marko and Kern, Boris and Voršič, Ines and Pollak, Senja},
3 title = {Slovene Morphological and Word Formation Segmentation: A Novel Dataset and Evaluation},
4 booktitle = {Proceedings of the 15th Language Resources and Evaluation Conference (LREC 2026)},
5 month = {May},
6 year = {2026},
7 address = {Palma de Mallorca, Spain},
8 publisher = {European Language Resources Association (ELRA)},
9}