Views
No views yet
DeepPavlov/rubert-base-cased encoder → mean pooling over tokens → concat
with two scalar features (z-scored log corpus frequency, has-frequency flag)
→ MLP head (768+2 → 128 → GELU → dropout → 1). Targets are z-scored E values;
the checkpoint stores the de-normalization constants.word_frequency.json, uses-per-million, 14,842 entries)
ships with the model and is required at inference; unknown words fall back to
a learned "no frequency" path.| Metric | This model | Predict-the-mean baseline |
|---|---|---|
| MAE (E units) | 3.31 | 4.76 |
| RMSE | 4.25 | 5.77 |
| Pearson r | 0.68 | — |
| Spearman ρ | 0.67 | — |
| Pairwise "which word is harder" accuracy | 74.2% | 50% |
| … on pairs differing by > 4 E points | 83.1% | 50% |
1from huggingface_hub import snapshot_download
2import sys
3
4path = snapshot_download("nzinov/thehat-word-difficulty")
5sys.path.insert(0, path)
6from modeling import WordDifficultyPredictor
7
8predictor = WordDifficultyPredictor.from_dir(path)
9print(predictor.predict(["кровать", "синоним", "соразмерность"]))
10# [44.2, 57.6, 59.5]torch, transformers, numpy.