stanfordnlp/sst2
Viewer • Updated • 70k • 59.4k • 176
LexiBERT fine-tuned on English SST-2 for 2,000 steps (seed 1), with a linear layer on the average of the outputs. It has never seen Uralic training data for this task.
from lexibert import SentimentClassifier
clf = SentimentClassifier.from_pretrained("khalidmokha/lexibert-sentiment-sst2")
clf.predict(["..."]) # ['positive'] or ['negative']
Accuracy of this model on the SST-2 development data and on the aligned test data of Alnajjar et al. (2023):
| SST-2 dev | Finnish | Komi-Zyrian | Moksha | Erzya | Udmurt |
|---|---|---|---|---|---|
| 91.6 | 76.5 | 76.5 | 66.2 | 67.6 | 64.7 |
The paper reports the mean of three seeds (the other two are in the Zenodo record). For Erzya, Moksha, Komi-Zyrian and Udmurt, the results
improve clearly when the sentences are first glossed into English word by word with the dictionary (scripts/26_sentiment_gloss.py
in the code).
@inproceedings{alnajjar-etal-2026-grounding,
title = {Grounding Encoders and Word Embeddings in {FST}s and Dictionaries for {U}ralic Languages},
author = {Alnajjar, Khalid and H{\"a}m{\"a}l{\"a}inen, Mika and Rueter, Jack and Partanen, Niko},
booktitle = {Proceedings of the International Workshop on Computational Linguistics for Uralic Languages (IWCLUL 2026)},
year = {2026}
}
Code: https://github.com/mokha/lexibert · All models and seeds: https://doi.org/10.5281/zenodo.23545486.