jakubmach/cs-sentiment-small-e-czech-v2
018
Czech Sentiment Classifier — Small-E-Czech (ELECTRA)
A 3-class sentiment classifier for Czech movie reviews, fine-tuned from Seznam/small-e-czech (13.5M params, Czech ELECTRA).
Quick Start
from transformers import pipeline
classifier = pipeline("text-classification", model="jakubmach/cs-sentiment-small-e-czech-v2")
result = classifier("Tento film byl naprosto úžasný, skvělí herci a výborný příběh!")
print(result) # [{'label': 'positive', 'score': 0.87}]Training Details
Label Mapping
Ratings from CSFD (0-5 stars) mapped to sentiment:
- negative: ratings 0, 1, 2
- neutral: rating 3
- positive: ratings 4, 5
Results
Test Set Performance (2,500 samples)
Per-Class Breakdown
Confusion Matrix
Key Observations
- Strong binary sentiment detection: The model reliably distinguishes positive from negative reviews (positive F1=0.68, negative F1=0.79).
- Neutral class not learned: With only ~320 neutral examples in training and the class being inherently ambiguous (3/5 rating), the model never predicts "neutral." This is the main area for improvement.
- Data efficiency: Even with just 2,000 training samples (8% of the full dataset), the model achieves 67.7% accuracy — significantly above all baselines.
- Improvement path: Training on the full 25K dataset with GPU, or using a larger encoder (e.g.,
ufal/robeczech-baseat 125M params), would likely push accuracy well above 75%.
Limitations
- Does not predict the "neutral" class (3-star reviews are classified as positive or negative)
- Trained on only 2,000 of 25,000 available samples due to CPU training constraints
- Reviews longer than 256 tokens are truncated
- Domain-specific to movie reviews; may not generalize to other Czech text domains
License
CC-BY-4.0 (inherited from base model Seznam/small-e-czech)
