Skip to content

Danish stemmer benchmarks ★★★★☆

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

Dictionary size: ★★★★☆. The exact count is 27,921 distinct usable word forms after parser-compatible filtering and exact, case-preserved deduplication. Stars rank dictionary size relative to all benchmarked dictionaries in five nearly equal groups; they do not measure linguistic quality or benchmark accuracy.

All speed values are environment-specific and were measured on the hardware and JVM listed in the benchmark overview. The command distribution, exact-root accuracy, and speed tables belong to the published 2026-09-11 Radixor/Java 4.4.0 snapshot. Speed benchmark operations process changed tokens. Accuracy uses the complete Radixor dictionary for the language.

How to read this page

Start with the corpus and patch-command distribution, then compare exact-root agreement with runtime. The dictionary-family experiment, edit-cost experiment, and pairwise linguistic evaluation answer separate questions. Their 10–90% curves use independent frozen protocols and must not be substituted for one another.

Runtime and exact-root agreement measure different properties. Light, minimal, possessive, and other rule-based filters intentionally have different transformation scopes, so a lower runtime can coexist with lower dictionary-root agreement. Read the speed and accuracy tables together. The Radixor rows in this 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 shows the resulting quality/speed envelope explicitly.

Dictionary corpus

Model ID Model version Language Dictionary rows Distinct usable forms Complete quality tokens Already-root tokens Changed tokens Timing workload JMH timing tokens
da-dk-default 1.0.0 DA_DK 4,179 27,921 32,256 8,356 23,900 changed tokens 23,900

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 32,256.

Command class Meaning Word forms Share
AppendCharacterCommand Appends one character to the end of the word form. 179 0.555%
BackwardCompoundCommand Applies a multi-step backward patch made from skip, delete, insert, and replace operations. 1,127 3.494%
DeleteSuffixCommand Deletes one or more trailing characters from the word form. 22,680 70.312%
PreserveCommand Returns the word form unchanged because it already matches the preferred root. 8,269 25.636%
ReplaceLastCharacterCommand Replaces the final character of the word form. 1 0.003%

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 99.371% 99.527% 98.923% Radixor dictionary-trained patch-command stemmer.
Lucene SnowballFilter 55.509% 54.159% 59.371% Lucene TokenFilter integration path around the Snowball algorithm.
Official Snowball direct (Java) 55.971% 54.791% 59.347% Official Snowball generated Java stemmer; rule-based suffix algorithm.

Speed

Speed uses JMH average time, 3 warmup iterations, 5 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 radixor[da-dk-default] 1.418 0.216 59.3 1.000 Radixor dictionary-trained patch-command stemmer.
Official Snowball direct (Java) snowballDirect[DANISH] 2.884 0.313 120.7 2.035 Official Snowball generated Java stemmer; direct API.
Lucene SnowballFilter luceneSnowballFilter[DANISH] 3.425 0.429 143.3 2.416 Lucene TokenFilter path around Snowball; includes TokenStream overhead.

Interpretation notes

  • Radixor is a dictionary-trained patch-command stemmer. Its learned transformations can generalize beyond the word forms listed in the training resource.
  • 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.

Dictionary-family generalization conclusion

This is the language-specific conclusion from the independent radixor-generalization-v1 baseline experiment. It is intentionally separate from the wider edit-cost protocol below; values from the two frozen snapshots are not substituted for one another.

Evidence

Model da-dk-default version 1.0.0 is evaluated over five predeclared nested splits. Unseen metrics remove withheld occurrences whose normalized surface also appeared in training. Parentheses show the observed split minimum–maximum.

Training rows Median unseen occurrences Unseen all exact Unseen changed exact Unseen root preserved
10% 29,022 61.104% (59.899–62.277) 51.055% (49.995–53.218) 88.238% (87.507–89.957)
20% 25,755 65.725% (64.691–66.441) 57.555% (56.445–58.672) 89.232% (88.279–90.082)
30% 22,543 68.316% (67.096–69.463) 60.962% (59.342–62.755) 89.335% (88.687–90.062)
40% 19,316 70.449% (69.207–70.919) 63.495% (61.895–64.640) 90.106% (88.956–90.560)
50% 16,078 71.433% (70.792–72.016) 64.706% (63.871–65.934) 90.561% (89.489–90.758)
60% 12,858 72.406% (72.124–72.935) 65.740% (65.579–67.061) 90.565% (89.988–91.933)
70% 9,622 72.901% (72.673–74.059) 66.648% (65.699–67.713) 91.066% (90.273–92.613)
80% 6,419 74.015% (73.293–74.244) 67.477% (67.434–67.862) 92.377% (90.132–93.494)
90% 3,232 74.192% (73.356–75.186) 67.504% (66.790–69.750) 92.718% (90.865–93.961)

Generalization conclusion

  • Median exactness on genuinely unseen changed forms moves from 51.055% at 10% training knowledge to 67.504% at 90%, a measured +16.449 percentage-point change.
  • Unseen all-form exactness moves from 61.104% at 10% training knowledge to 74.192% at 90%, a measured +13.087 percentage-point change.
  • Preservation of unseen already-root forms moves from 88.238% at 10% training knowledge to 92.718% at 90%, a measured +4.480 percentage-point change.
  • The evidence establishes within-resource transfer across withheld dictionary families. It does not estimate unrelated domains, misspellings, arbitrary compounds, or external corpora.

The complete ten-level table and split ranges remain in the complete generalization appendix; raw counters and provenance are in active machine-readable snapshot. The frozen methodology defines family-level splitting, unseen-surface leakage control, aggregation, and the limits of the claim.

Edit costs and dictionary-knowledge generalization

This section interprets the edit-cost and held-out-family experiment for DA_DK separately from the cross-language macro summary. Each knowledge point is the median of five frozen, nested splits. The primary exactness outcome covers changed forms in withheld families after excluding normalized surfaces seen in training. Thus the complete dictionary is the evaluation population, while only genuinely unseen surfaces contribute to this outcome.

Cost labels have the fixed form D<delete>I<insert>R<replace>M<match>. D is the cost of deleting a source character, I of inserting a target character, R of replacing a source character, and M of keeping an equal source/target character unchanged (the match or skip step). For example, D2I5R3M0 means delete cost 2, insert cost 5, replace cost 3, and match cost 0. The numbers are relative dynamic-programming costs, not command counts.

Evidence

Dictionary rows Evaluated forms Changed-form share Baseline commands Exact cost classes Grid reduction Largest exact class
4,179 32,256 74.09% 138 5 46.80× 110

The exact classes are based on command-by-command equality over the complete dictionary, not equality of aggregate trie metrics. A higher class count means that this dictionary exposes more cost-dependent encoder decisions; it does not by itself mean better quality.

Knowledge Baseline unseen changed exact Selected-cost exact Δ Baseline F0.5 Selected F0.5 Baseline commands Selected commands
10% 51.619% 51.619% +0.000 pp 0.8187 0.8187 1.000× 0.915×
20% 57.303% 57.303% +0.000 pp 0.8491 0.8491 1.000× 0.937×
30% 61.369% 61.369% +0.000 pp 0.8677 0.8677 1.000× 0.917×
40% 62.778% 62.778% +0.000 pp 0.8708 0.8708 1.000× 0.901×
50% 63.694% 63.694% +0.000 pp 0.8763 0.8763 1.000× 0.885×
60% 65.034% 65.034% +0.000 pp 0.8820 0.8820 1.000× 0.890×
70% 66.083% 66.083% +0.000 pp 0.8887 0.8887 1.000× 0.883×
80% 66.583% 66.583% +0.000 pp 0.8894 0.8894 1.000× 0.883×
90% 68.000% 68.000% +0.000 pp 0.8946 0.8946 1.000× 0.887×

Within-language associations

Spearman coefficients are calculated independently inside each seed × knowledge stratum across the normalized cost grid. The table reports the median and central 95% empirical interval across up to 45 strata. A relationship is called stable only when it is defined in all 45 strata and the interval retains one sign. These intervals are descriptive, not multiplicity-adjusted confidence intervals. Every predictor and outcome label is defined in the methodology glossary.

The strongest structural pairs whose central interval retains one sign are:

Predictor Structural outcome Median Spearman ρ Central 95% Strata
patch_command_ratio trie_nodes +1.000 +0.869…+1.000 45
patch_command_ratio value_references +1.000 +0.869…+1.000 45
replace_to_delete_insert patch_command_ratio -0.794 -0.889…-0.736 45
replace_to_delete_insert trie_nodes -0.881 -0.889…-0.736 45
replace_to_delete_insert value_references -0.881 -0.889…-0.736 45
replace_cost patch_command_ratio -0.633 -0.750…-0.497 45

For each quality outcome, the largest absolute median association is shown even when its interval crosses zero. This prevents a large median in heterogeneous strata from being misreported as a portable language-level effect.

Predictor Quality outcome Median Spearman ρ Central 95% Stable Defined strata

No within-stratum coefficient is defined for unseen_changed_exact, unseen_f05, unseen_over_percent, unseen_under_percent because these outcomes do not vary across cost configurations in the measured language strata. Within this matrix, that is observed cost insensitivity for those outcomes, not missing measurement.

Edit-cost conclusion

  • With baseline costs, median unseen changed-form exactness changes from 51.619% at 10% knowledge to 68.000% at 90%, a +16.381 pp measured knowledge effect.
  • The predeclared selection is D1I1R10M0. Its median unseen changed-form exactness differs from baseline by +0.000 pp and it reduces the median retained-command count by 10.47% (0.895× baseline).
  • Under the selected costs, the 10%–90% knowledge change is +16.381 pp. This quantifies generalization for this dictionary; it is not a claim about unrelated domains or lexical resources.
  • The non-baseline setting is an efficiency candidate, not a production default: it was selected and evaluated on the same matrix and therefore requires external-corpus or external-dictionary validation before adoption.
  • No cost or representation predictor is both defined in all 45 strata and retains one association sign over the central 95% interval for an unseen-form quality outcome. Effects with partial coverage are insufficient for a stable language-level claim; the remaining measured effects are heterogeneous across knowledge levels and splits.

The complete evidence is available in the raw logical matrix, the per-language knowledge curves, and the per-language association table. See the cross-language analysis and frozen methodology for scope and limitations.

Stemming quality

Runtime performance and linguistic grouping quality are independent dimensions. This section evaluates language DA_DK using the complete validated stemming-quality result matrix and the canonical linguistic-quality methodology, including its overlapping-group relation, dictionary modes, output policies, metrics, and ranking rules.

Radixor's model was trained from the same lexical resource that defines this benchmark's dictionary-reference relation. The result therefore measures same-resource agreement, not independent external linguistic validity. Third-party adapters receive the same evaluated forms but were not trained by this benchmark.

The tables retain both canonical dictionary-processing modes and every applicable output policy without redefining them on each language page. Download the complete machine-readable result snapshot.

Evaluation scope and key findings

The default model is da-dk-default, loaded from classpath resource org/egothor/stemmer/models/da-dk-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.996243 among 3 deterministic stemmers. The runner-up is SNOWBALL DANISH DIRECT at 0.942482, a difference of 0.053761. This rank does not imply leadership in throughput or every secondary metric.
  • LOWERCASE_GROUPS_ONLY: Radixor ranks first by balanced accuracy at 0.996482 among 3 deterministic stemmers. The runner-up is SNOWBALL DANISH DIRECT at 0.942383, a difference of 0.054099. This rank does not imply leadership in throughput or every secondary metric.

ALL_WORDS

This mode contains 5 result rows, 3 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. Where at least two deterministic rows are available, 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.996243 0.000000% 0.751435%
2 SNOWBALL DANISH DIRECT 0.942482 0.001236% 11.502313%
3 SNOWBALL DANISH LUCENE FILTER 0.937905 0.001273% 12.417638%
Classification metrics
Rank Stemmer Output policy Precision Recall Specificity Balanced accuracy Pairwise accuracy Error rate
1 Radixor PRIMARY_OUTPUT 1.000000 0.992486 1.000000 0.996243 0.999998 0.000002
2 SNOWBALL DANISH DIRECT PRIMARY_OUTPUT 0.942799 0.884977 0.999988 0.942482 0.999961 0.000039
3 SNOWBALL DANISH LUCENE FILTER PRIMARY_OUTPUT 0.940600 0.875824 0.999987 0.937905 0.999959 0.000041
Pair-relation metrics
Rank Stemmer Output policy F0.5 F1 F2 Jaccard Fowlkes–Mallows MCC
1 Radixor PRIMARY_OUTPUT 0.998488 0.996229 0.993979 0.992486 0.996236 0.996235
2 SNOWBALL DANISH DIRECT PRIMARY_OUTPUT 0.930638 0.912973 0.895967 0.839881 0.913430 0.913411
3 SNOWBALL DANISH LUCENE FILTER PRIMARY_OUTPUT 0.926889 0.907057 0.888055 0.829921 0.907634 0.907614
Raw pair counts
Rank Stemmer Output policy TP FP FN TN Over error / possible Under error / possible
1 Radixor PRIMARY_OUTPUT 89021 0 674 389687465 0 / 389687465 674 / 89695
2 SNOWBALL DANISH DIRECT PRIMARY_OUTPUT 79378 4816 10317 389682649 4816 / 389687465 10317 / 89695
3 SNOWBALL DANISH LUCENE FILTER PRIMARY_OUTPUT 78557 4961 11138 389682504 4961 / 389687465 11138 / 89695

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, Fowlkes–Mallows, 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 / 389687465 0 / 89695

ALL_CANDIDATES result (no same-language comparator)

Rank Stemmer Balanced accuracy Over-stemming (OI) Under-stemming (UI)
n/a Radixor 1.000000 0.000000% 0.000000%
Classification metrics
Rank Stemmer Output policy Precision Recall Specificity Balanced accuracy Pairwise accuracy Error rate
n/a 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 Fowlkes–Mallows MCC
n/a 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
n/a Radixor ALL_CANDIDATES 89695 0 0 389687465 0 / 389687465 0 / 89695

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 674 0 0 165 0.590953% 3 28087

LOWERCASE_GROUPS_ONLY

This mode contains 5 result rows, 3 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. Where at least two deterministic rows are available, 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.996482 0.000000% 0.703596%
2 SNOWBALL DANISH DIRECT 0.942383 0.001240% 11.522225%
3 SNOWBALL DANISH LUCENE FILTER 0.938010 0.001235% 12.396694%
Classification metrics
Rank Stemmer Output policy Precision Recall Specificity Balanced accuracy Pairwise accuracy Error rate
1 Radixor PRIMARY_OUTPUT 1.000000 0.992964 1.000000 0.996482 0.999998 0.000002
2 SNOWBALL DANISH DIRECT PRIMARY_OUTPUT 0.942693 0.884778 0.999988 0.942383 0.999961 0.000039
3 SNOWBALL DANISH LUCENE FILTER PRIMARY_OUTPUT 0.942392 0.876033 0.999988 0.938010 0.999959 0.000041
Pair-relation metrics
Rank Stemmer Output policy F0.5 F1 F2 Jaccard Fowlkes–Mallows MCC
1 Radixor PRIMARY_OUTPUT 0.998585 0.996470 0.994363 0.992964 0.996476 0.996475
2 SNOWBALL DANISH DIRECT PRIMARY_OUTPUT 0.930511 0.912818 0.895784 0.839618 0.913277 0.913257
3 SNOWBALL DANISH LUCENE FILTER PRIMARY_OUTPUT 0.928328 0.908002 0.888547 0.831505 0.908607 0.908587
Raw pair counts
Rank Stemmer Output policy TP FP FN TN Over error / possible Under error / possible
1 Radixor PRIMARY_OUTPUT 88910 0 630 388404335 0 / 388404335 630 / 89540
2 SNOWBALL DANISH DIRECT PRIMARY_OUTPUT 79223 4816 10317 388399519 4816 / 388404335 10317 / 89540
3 SNOWBALL DANISH LUCENE FILTER PRIMARY_OUTPUT 78440 4795 11100 388399540 4795 / 388404335 11100 / 89540

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, Fowlkes–Mallows, 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 / 388404335 0 / 89540

ALL_CANDIDATES result (no same-language comparator)

Rank Stemmer Balanced accuracy Over-stemming (OI) Under-stemming (UI)
n/a Radixor 1.000000 0.000000% 0.000000%
Classification metrics
Rank Stemmer Output policy Precision Recall Specificity Balanced accuracy Pairwise accuracy Error rate
n/a 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 Fowlkes–Mallows MCC
n/a 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
n/a Radixor ALL_CANDIDATES 89540 0 0 388404335 0 / 388404335 0 / 89540

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 630 0 0 157 0.563229% 3 28033

Method and interpretation boundaries

The linguistic-quality methodology defines the overlapping gold relation, both dictionary-processing modes, all three output policies, confusion counts, formulas, undefined denominators, aggregation, ranking, and inapplicable partition metrics. The candidate-policy reference explains why ANY_CANDIDATE is an oracle-assisted capability bound rather than deterministic runtime behavior.

This page preserves the language-specific raw counts, metrics, candidate distributions, comparison availability, and caveats. The machine-readable CSV remains authoritative for every field.

Provenance

  • Authoritative source: docs/benchmarks/data/stemming-quality-2026-09-13.csv
  • Source SHA-256: d41e00160cda44758e806c37d210f2d9b90b1ebad22eebe5ece89a40f4ed9ab0
  • Evaluation command: ./gradlew stemmingQuality --no-daemon
  • Dictionary language: DA_DK
  • 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