Files
Radixor/docs/benchmarks/languages/russian.md
Leo Galambos b29699b763 Refresh multilingual benchmarks and fix overlapping gold evaluation
Recompute published benchmark results for all default language models,
exclude Polish Polimorf, add Hebrew documentation, and record the current
benchmark environment. Evaluate repeated surface forms as an overlapping
gold cover and publish only applicable metrics for candidate policies.
2026-07-23 17:06:41 +02:00

22 KiB
Raw Blame History

Russian Stemmer Benchmarks

This page reports same-language stemming benchmarks for Russian. Accuracy is listed first because speed without root agreement is not enough to interpret stemmer quality.

All speed values are environment-specific and were measured on the hardware and JVM listed in the benchmark overview. Speed benchmark operations process changed dictionary tokens only. Accuracy uses the complete Radixor dictionary for the language.

Radixor must not be read as simply "slower" when a narrow competitor has a lower timing row. In these tables Radixor is the quality-oriented baseline: its exact-root accuracy is typically close to 100%, while many faster rule-based, light, minimal, or possessive filters reach that speed by doing much less linguistic work and often score far lower in All exact and Changed exact. The Radixor rows in this benchmark refresh use the contracted compiled patch trie: compilation collapses uniform patch-command subtrees into accepting leaves, reducing hot lookup depth while preserving the preferred stemming result measured by the accuracy pass. The EnglishRadixorDictionaryCoverageBenchmark table shows the resulting quality/speed envelope explicitly. The same interpretation applies to this language page: speed rows must be read together with the accuracy table above them.

Dictionary Corpus

Model ID Model version Language Dictionary rows Complete quality tokens Already-root tokens Changed speed tokens
ru-ru-default 1.0.0 RU_RU 37,410 806,279 74,808 731,471

Radixor Patch Command Distribution

Radixor stores the preferred transformation for each normalized dictionary word form as a compiled patch command. This distribution shows which runtime command class is selected by the trained trie for the complete default-model dictionary. The total number of preferred patch commands analyzed for this language is 806,279.

Command class Meaning Word forms Share
AppendCharacterCommand Appends one character to the end of the word form. 9,287 1.152%
BackwardCompoundCommand Applies a multi-step backward patch made from skip, delete, insert, and replace operations. 580,915 72.049%
DeleteSuffixCommand Deletes one or more trailing characters from the word form. 82,956 10.289%
PreserveCommand Returns the word form unchanged because it already matches the preferred root. 75,527 9.367%
ReplaceLastCharacterCommand Replaces the final character of the word form. 57,594 7.143%

Accuracy

Accuracy is computed from JMH auxiliary counters in the current report. The counters are deterministic for a fixed corpus and stemmer; percentages divide matching counters by evaluated counters from the same report and are not timing metrics.

Stemmer All exact Changed exact Root preserved Note
Radixor 98.807% 98.696% 99.896% Full Radixor dictionary patch-command stemmer.
Lucene RussianLightStemFilter 9.658% 8.452% 21.447% Light suffix stemmer; intentionally narrower than a dictionary-derived stemmer.
Lucene SnowballFilter 9.162% 8.162% 18.936% Lucene TokenFilter integration path around the Snowball algorithm.
Official Snowball direct 9.162% 8.162% 18.936% Official Snowball generated Java stemmer; rule-based suffix algorithm.

Speed

Speed uses JMH average time, 5 warmup iterations, 10 measurement iterations, 3 independent forks, and 1 thread. Relative factor is computed against the single Radixor row on this language page. Values below 1.000 are faster than that Radixor baseline; values above 1.000 are slower.

Stemmer Benchmark method Score ms/op Error ms ns/token Relative vs Radixor Note
Radixor russianRadixor 90.151 1.796 123.2 1.000 Full Radixor dictionary patch-command stemmer.
Lucene RussianLightStemFilter russianLuceneRussianLightStemFilter 59.456 2.102 81.3 0.660 Light Russian suffix stemmer.
Official Snowball direct snowballDirect[RUSSIAN] 102.353 1.669 139.9 1.135 Official Snowball generated Java stemmer; direct API.
Lucene SnowballFilter luceneSnowballFilter[RUSSIAN] 138.597 4.727 189.5 1.537 Lucene TokenFilter path around Snowball; includes TokenStream overhead.

Interpretation Notes

  • Radixor is a dictionary-derived patch-command stemmer. Its quality depends on the language resource used to train the compiled trie.
  • Light, minimal, plural, and possessive filters are narrow baselines. They can be fast because they intentionally perform less linguistic work.
  • Lucene TokenFilter rows include TokenStream, attribute, and required normalization overhead. Direct rows measure exposed direct APIs.
  • Morfologik rows are dictionary-based and can emit multiple terms for one input token. Quality rows use the first returned term when no ranking weight is available.
  • Snowball rows are rule-based generated suffix stemmers; they are useful algorithmic baselines, not dictionary-root equivalence guarantees.

Stemming Quality

Runtime performance and linguistic grouping quality are independent dimensions. This section evaluates language RU_RU using the complete validated stemming-quality result matrix. Every distinct surface form is one evaluated item and can belong to several dictionary groups. Two forms are a positive pair when their group-membership sets intersect and a negative pair when those sets are disjoint. A pair shared through several groups is counted once. Exact equality with a predetermined lemma is not required.

ALL_WORDS includes every valid group and its original forms. LOWERCASE_GROUPS_ONLY excludes an entire group when any Unicode code point is uppercase or titlecase; retained words are not lowercased or otherwise rewritten. This isolates case-handling effects without changing retained inputs. Download the complete machine-readable result snapshot.

Evaluation Scope and Key Findings

The default model is ru-ru-default, loaded from classpath resource org/egothor/stemmer/models/ru-ru-default/stemmer.gz. The following findings compare only deterministic PRIMARY_OUTPUT rows over identical included groups; candidate policies are reported separately as capability analyses.

  • ALL_WORDS: Radixor ranks first by balanced accuracy at 0.990188 among 4 deterministic stemmers. The runner-up is SNOWBALL RUSSIAN LUCENE FILTER at 0.834565, a difference of 0.155624. This rank does not imply leadership in throughput or every secondary metric.
  • LOWERCASE_GROUPS_ONLY: Radixor ranks first by balanced accuracy at 0.990213 among 4 deterministic stemmers. The runner-up is SNOWBALL RUSSIAN DIRECT at 0.834542, a difference of 0.155670. This rank does not imply leadership in throughput or every secondary metric.

ALL_WORDS

This mode contains 6 result rows, 4 evaluated stemmers, and 3 output policies. Applied-row and form counts are shown per row because adapters share the language corpus but policy rows remain independently auditable. PRIMARY_OUTPUT and ALL_CANDIDATES rankings are ordered by unrounded balanced accuracy, followed by MCC, F1, over-stemming rate, over-stemming count, under-stemming rate, and stemmer. ANY_CANDIDATE has no single rank metric and is listed alphabetically. Balanced accuracy is a navigation metric, not a universally authoritative quality score.

PRIMARY_OUTPUT ranking

Rank Stemmer Balanced accuracy Over-stemming (OI) Under-stemming (UI)
1 Radixor 0.990188 0.000000% 1.962362%
2 SNOWBALL RUSSIAN LUCENE FILTER 0.834565 0.001215% 33.085867%
3 SNOWBALL RUSSIAN DIRECT 0.834556 0.001214% 33.087654%
4 RUSSIAN LUCENE RUSSIAN LIGHT STEM FILTER 0.616440 0.000059% 76.711890%
Classification metrics
Rank Stemmer Output policy Precision Recall Specificity Balanced accuracy Pairwise accuracy Error rate
1 Radixor PRIMARY_OUTPUT 1.000000 0.980376 1.000000 0.990188 0.999999 0.000001
2 SNOWBALL RUSSIAN LUCENE FILTER PRIMARY_OUTPUT 0.713518 0.669141 0.999988 0.834565 0.999973 0.000027
3 SNOWBALL RUSSIAN DIRECT PRIMARY_OUTPUT 0.713680 0.669123 0.999988 0.834556 0.999973 0.000027
4 RUSSIAN LUCENE RUSSIAN LIGHT STEM FILTER PRIMARY_OUTPUT 0.946958 0.232881 0.999999 0.616440 0.999965 0.000035
Pair-relation metrics
Rank Stemmer Output policy F0.5 F1 F2 Jaccard FowlkesMallows MCC
1 Radixor PRIMARY_OUTPUT 0.996013 0.990091 0.984239 0.980376 0.990140 0.990139
2 SNOWBALL RUSSIAN LUCENE FILTER PRIMARY_OUTPUT 0.704178 0.690618 0.677570 0.527438 0.690974 0.690960
3 SNOWBALL RUSSIAN DIRECT PRIMARY_OUTPUT 0.704300 0.690684 0.677584 0.527515 0.691043 0.691029
4 RUSSIAN LUCENE RUSSIAN LIGHT STEM FILTER PRIMARY_OUTPUT 0.586986 0.373828 0.274241 0.229882 0.469605 0.469596
Raw pair counts
Rank Stemmer Output policy TP FP FN TN Over error / possible Under error / possible
1 Radixor PRIMARY_OUTPUT 12781761 0 255845 288279885172 0 / 288279885172 255845 / 13037606
2 SNOWBALL RUSSIAN LUCENE FILTER PRIMARY_OUTPUT 8724001 3502741 4313605 288276382431 3502741 / 288279885172 4313605 / 13037606
3 SNOWBALL RUSSIAN DIRECT PRIMARY_OUTPUT 8723768 3499880 4313838 288276385292 3499880 / 288279885172 4313838 / 13037606
4 RUSSIAN LUCENE RUSSIAN LIGHT STEM FILTER PRIMARY_OUTPUT 3036212 170067 10001394 288279715105 170067 / 288279885172 10001394 / 13037606

ANY_CANDIDATE oracle bounds

These results are measured, not missing. ANY_CANDIDATE answers two separate optimistic questions for each pair: a gold-related pair avoids under-stemming when the candidate sets intersect, while a gold-negative pair avoids over-stemming when some non-colliding candidate selection exists. The oracle may choose a different candidate for the same word in different pairs. Consequently, these decisions do not form one globally realizable predicted relation or one TP/FP/FN/TN confusion matrix. Balanced accuracy, F-scores, Jaccard, FowlkesMallows, and MCC are therefore mathematically not applicable, rather than unknown.

Stemmer Optimistic over-stemming (OI) Optimistic under-stemming (UI)
Radixor 0.000000% 0.000100%
Oracle-bound pair counts
Stemmer Unavoidable over errors / gold-negative pairs Unrepairable under errors / gold-related pairs
Radixor 0 / 288279885172 13 / 13037606

ALL_CANDIDATES ranking

Rank Stemmer Balanced accuracy Over-stemming (OI) Under-stemming (UI)
1 Radixor 1.000000 0.000000% 0.000100%
Classification metrics
Rank Stemmer Output policy Precision Recall Specificity Balanced accuracy Pairwise accuracy Error rate
1 Radixor ALL_CANDIDATES 1.000000 0.999999 1.000000 1.000000 1.000000 0.000000
Pair-relation metrics
Rank Stemmer Output policy F0.5 F1 F2 Jaccard FowlkesMallows MCC
1 Radixor ALL_CANDIDATES 1.000000 1.000000 0.999999 0.999999 1.000000 1.000000
Raw pair counts
Rank Stemmer Output policy TP FP FN TN Over error / possible Under error / possible
1 Radixor ALL_CANDIDATES 13037593 0 13 288279885172 0 / 288279885172 13 / 13037606

Multi-output analysis

Alternative candidates are capability analyses, not replacements for the deterministic comparison.

Stemmer Under pairs repaired Best-case over pairs avoided All-candidate collisions added Multi-candidate forms Multi-candidate share Maximum candidates Total candidate assignments
Radixor 255832 0 0 9613 1.265979% 4 769106

LOWERCASE_GROUPS_ONLY

This mode contains 6 result rows, 4 evaluated stemmers, and 3 output policies. Applied-row and form counts are shown per row because adapters share the language corpus but policy rows remain independently auditable. PRIMARY_OUTPUT and ALL_CANDIDATES rankings are ordered by unrounded balanced accuracy, followed by MCC, F1, over-stemming rate, over-stemming count, under-stemming rate, and stemmer. ANY_CANDIDATE has no single rank metric and is listed alphabetically. Balanced accuracy is a navigation metric, not a universally authoritative quality score.

PRIMARY_OUTPUT ranking

Rank Stemmer Balanced accuracy Over-stemming (OI) Under-stemming (UI)
1 Radixor 0.990213 0.000000% 1.957434%
2 SNOWBALL RUSSIAN DIRECT 0.834542 0.001216% 33.090302%
3 SNOWBALL RUSSIAN LUCENE FILTER 0.834542 0.001216% 33.090302%
4 RUSSIAN LUCENE RUSSIAN LIGHT STEM FILTER 0.616378 0.000058% 76.724356%
Classification metrics
Rank Stemmer Output policy Precision Recall Specificity Balanced accuracy Pairwise accuracy Error rate
1 Radixor PRIMARY_OUTPUT 1.000000 0.980426 1.000000 0.990213 0.999999 0.000001
2 SNOWBALL RUSSIAN DIRECT PRIMARY_OUTPUT 0.713634 0.669097 0.999988 0.834542 0.999973 0.000027
3 SNOWBALL RUSSIAN LUCENE FILTER PRIMARY_OUTPUT 0.713634 0.669097 0.999988 0.834542 0.999973 0.000027
4 RUSSIAN LUCENE RUSSIAN LIGHT STEM FILTER PRIMARY_OUTPUT 0.947585 0.232756 0.999999 0.616378 0.999965 0.000035
Pair-relation metrics
Rank Stemmer Output policy F0.5 F1 F2 Jaccard FowlkesMallows MCC
1 Radixor PRIMARY_OUTPUT 0.996023 0.990116 0.984279 0.980426 0.990164 0.990164
2 SNOWBALL RUSSIAN DIRECT PRIMARY_OUTPUT 0.704259 0.690648 0.677554 0.527474 0.691007 0.690993
3 SNOWBALL RUSSIAN LUCENE FILTER PRIMARY_OUTPUT 0.704259 0.690648 0.677554 0.527474 0.691007 0.690993
4 RUSSIAN LUCENE RUSSIAN LIGHT STEM FILTER PRIMARY_OUTPUT 0.587020 0.373716 0.274113 0.229798 0.469634 0.469625
Raw pair counts
Rank Stemmer Output policy TP FP FN TN Over error / possible Under error / possible
1 Radixor PRIMARY_OUTPUT 12780071 0 255156 287711428009 0 / 287711428009 255156 / 13035227
2 SNOWBALL RUSSIAN DIRECT PRIMARY_OUTPUT 8721831 3499880 4313396 287707928129 3499880 / 287711428009 4313396 / 13035227
3 SNOWBALL RUSSIAN LUCENE FILTER PRIMARY_OUTPUT 8721831 3499880 4313396 287707928129 3499880 / 287711428009 4313396 / 13035227
4 RUSSIAN LUCENE RUSSIAN LIGHT STEM FILTER PRIMARY_OUTPUT 3034033 167825 10001194 287711260184 167825 / 287711428009 10001194 / 13035227

ANY_CANDIDATE oracle bounds

These results are measured, not missing. ANY_CANDIDATE answers two separate optimistic questions for each pair: a gold-related pair avoids under-stemming when the candidate sets intersect, while a gold-negative pair avoids over-stemming when some non-colliding candidate selection exists. The oracle may choose a different candidate for the same word in different pairs. Consequently, these decisions do not form one globally realizable predicted relation or one TP/FP/FN/TN confusion matrix. Balanced accuracy, F-scores, Jaccard, FowlkesMallows, and MCC are therefore mathematically not applicable, rather than unknown.

Stemmer Optimistic over-stemming (OI) Optimistic under-stemming (UI)
Radixor 0.000000% 0.000000%
Oracle-bound pair counts
Stemmer Unavoidable over errors / gold-negative pairs Unrepairable under errors / gold-related pairs
Radixor 0 / 287711428009 0 / 13035227

ALL_CANDIDATES ranking

Rank Stemmer Balanced accuracy Over-stemming (OI) Under-stemming (UI)
1 Radixor 1.000000 0.000000% 0.000000%
Classification metrics
Rank Stemmer Output policy Precision Recall Specificity Balanced accuracy Pairwise accuracy Error rate
1 Radixor ALL_CANDIDATES 1.000000 1.000000 1.000000 1.000000 1.000000 0.000000
Pair-relation metrics
Rank Stemmer Output policy F0.5 F1 F2 Jaccard FowlkesMallows MCC
1 Radixor ALL_CANDIDATES 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000
Raw pair counts
Rank Stemmer Output policy TP FP FN TN Over error / possible Under error / possible
1 Radixor ALL_CANDIDATES 13035227 0 0 287711428009 0 / 287711428009 0 / 13035227

Multi-output analysis

Alternative candidates are capability analyses, not replacements for the deterministic comparison.

Stemmer Under pairs repaired Best-case over pairs avoided All-candidate collisions added Multi-candidate forms Multi-candidate share Maximum candidates Total candidate assignments
Radixor 255156 0 0 9442 1.244687% 4 768163

Output Policies and Metric Definitions

Each distinct surface form is one item and may belong to several gold groups. Two forms are gold-related when their membership sets intersect; a relation shared by several groups is counted once. PRIMARY_OUTPUT uses one deterministic stem per form. ANY_CANDIDATE is an optimistic oracle-assisted pairwise upper bound: a gold-related pair succeeds when candidates intersect, while a gold-negative pair succeeds when a non-colliding selection exists. Candidate choices may differ between pairs, so this is not deterministic runtime behaviour and does not define one confusion matrix. ALL_CANDIDATES activates every returned candidate; forms are related when candidate sets intersect.

For PRIMARY_OUTPUT and ALL_CANDIDATES, TP = underPossiblePairs - underErrorPairs, FN = underErrorPairs, FP = overErrorPairs, and TN = overPossiblePairs - overErrorPairs. ANY_CANDIDATE publishes only its separate oracle-assisted under/over bounds; confusion-derived metrics are mathematically inapplicable and are not presented in its language-page section. Their machine-readable CSV fields remain empty. Undefined metric denominators in otherwise applicable policies are rendered as n/a.

  • Under-stemming rate (Paice UI): FN / (TP + FN), the false-negative rate over gold-related pairs.
  • Over-stemming rate (Paice OI): FP / (TN + FP), the false-positive rate over gold-negative pairs.
  • Pairwise precision: TP / (TP + FP), the fraction of predicted conflations that are gold-standard positive pairs.
  • Pairwise recall: TP / (TP + FN), the fraction of gold-standard positive pairs successfully connected.
  • Pairwise specificity: TN / (TN + FP), the fraction of gold-negative pairs correctly separated.
  • Balanced accuracy: (recall + specificity) / 2. It gives equal weight to positive and negative pair classes and is less dominated by the large true-negative class than ordinary accuracy. It does not replace the raw errors or other metrics.
  • Pairwise F-beta: ((1 + betaSquared) * TP) / (((1 + betaSquared) * TP) + (betaSquared * FN) + FP). F0.5 emphasizes precision and penalizes over-stemming more; F1 weights precision and recall equally; F2 emphasizes recall and penalizes under-stemming more.
  • MCC: (TP * TN - FP * FN) / sqrt((TP + FP) * (TP + FN) * (TN + FP) * (TN + FN)). It uses all confusion counts and remains useful under class imbalance, except when its denominator is degenerate.
  • Jaccard index: TP / (TP + FP + FN).
  • FowlkesMallows index: sqrt(precision * recall).
  • Pairwise accuracy: (TP + TN) / (TP + TN + FP + FN). It can be dominated by true-negative cross-group pairs.
  • Pairwise error rate: (FP + FN) / (TP + TN + FP + FN).

Standard ARI, homogeneity, completeness, V-measure, and NMI are not calculated: their usual contingency-table definitions require an exclusive gold partition, while this gold standard is an overlapping cover.

Provenance

  • Authoritative source: docs/benchmarks/data/stemming-quality.csv
  • Source SHA-256: edf16b07be8a535943ddf37caeb8807755c95e9e1fb13244145f28be74b491d8
  • Evaluation command: ./gradlew stemmingQuality --no-daemon
  • Dictionary language: RU_RU
  • Processing modes: ALL_WORDS, LOWERCASE_GROUPS_ONLY
  • Stemmer versions and transitive artifacts: resolved by the repository's JMH Gradle configuration and gradle.lockfile
  • Model ID, version, and SHA-256: recorded in every CSV row
  • Run date, core source state, JDK, operating system, and hardware: recorded on the benchmark environment page