Skip to content

Releases

rutextnorm 2.1.0

Choose a tag to compare

@shigabeev shigabeev released this 13 Jun 18:58

Changelog

All notable changes to rutextnorm. This project follows Semantic Versioning.

2.1.0 — 2026-06-13

No API changes; normalize_russian and flag_uncertain keep their signatures.
Measured against the ru_2026.csv gold (artifact-free Kaggle set), the trusted
(non-escalated) accuracy rose to 98.2% while the escalation rate fell to 9.1%.

Normalization

  • Fractions: a numerator ending in 1 now takes the singular denominator
    (1/2 → «одна вторая», previously the ungrammatical «одна вторых»). Added
    Unicode vulgar fractions (½ ⅓ ⅔ ¼ ¾ ⅛ … → «одна вторая», «две третьих», …).
  • Currency: руб./долл. left after a multiplier now expand
    (24,9 млрд руб. → «… миллиарда рублей»). A currency symbol on a multiplied
    amount reads correctly ($1 млрд → «один миллиард долларов»,
    $10 миллионов → «десять миллионов долларов»), instead of leaving the symbol
    or mis-ordering the words.
  • Measurements: a unit abbreviation's trailing dot is consumed
    (7 км. → «семь километров», previously «… километров.»).
  • Decimals: an all-zero fraction is dropped (938,00 → «девятьсот тридцать восемь»).
  • Time: one o'clock drops «один» (1:15 → «час пятнадцать минут»).

Uncertainty router (flag_uncertain)

  • A multi-sense abbreviation governed by a number is no longer flagged
    (82 т. → «тонны» is the rules' committed reading) — fixes the measurement
    router's false rejections.

  • Only prepositions the rules actually decline count as resolving a number's case;
    a bare number after в/на/за/по/у is now flagged, since the rules leave
    it nominative while the gold may want an oblique case.

  • Added flag_uncertain(): an uncertainty router that returns the spans the rules
    can't resolve from the text, for routing to a stronger method.

  • Feminine currency subunits count in the feminine (… двадцать одна копейка).

  • Package and module renamed to rutextnorm (PyPI name == import name).

1.0.0

  • Initial release: single self-contained file, no dependencies — numbers, dates,
    currency, units, ordinals, decimals, fractions, times, abbreviations, acronyms,
    symbols, and Latin/Cyrillic handling for Russian TTS.

2.0

2.0

Choose a tag to compare

@shigabeev shigabeev released this 13 Jun 15:41
Domain (class) Tokens Original acc. Current acc. Notes
PLAIN 7,360,439 69.9% 92.5% residual: Latin spelled per-letter in gold
PUNCT 2,288,640 100.0% 100.0% passthrough
CARDINAL 272,442 51.2% 77.0% residual: oblique case of bare numbers (no context in token)
LETTERS 189,528 0.8% 0.0% not targeted (gold uses bare letters, worse for TTS)
DATE 185,961 0.0% 86.2% residual: bare years, ambiguous day-case
VERBATIM 157,912 91.1% 95.7% symbol / Greek map
ORDINAL 46,738 0.0% 40.6% residual: bare-number ordinals (need context)
MEASURE 40,537 3.1% 50.8% residual: oblique case agreement
TELEPHONE 10,088 0.3% 1.3% not targeted (irregular ISBN grouping)
DECIMAL 7,299 6.1% 54.3% residual: oblique case agreement
ELECTRONIC 5,832 2.6% 2.8% not targeted (English G2P + markers)
MONEY 2,690 14.4% 34.0% residual: case agreement, "долларов сэ ш а" artifact
FRACTION 2,460 0.0% 66.0% residual: context-dependent case
DIGIT 2,012 0.0% 100.0% leading-zero digit strings
TIME 1,949 0.0% 85.3% residual: oblique case, timezone suffixes
Overall 10,574,570 73.0% 91.4% exact-match token accuracy (incl. eval_extension rows)

1.0

1.0

Choose a tag to compare

@shigabeev shigabeev released this 07 Jun 19:14
3ff92cd

Tested on Google Text Normalization Challenge for Russian Language

Domain (class) Tokens Exact err % CI err % Dominant failure cause
PUNCT 2,288,640 0.00 0.00 — (passed through correctly)
VERBATIM 157,912 8.91 8.20 symbols not mapped: &→и, ²→в квадрате, ї→и
PLAIN 7,360,439 30.07 7.82 Latin words spelled whole-word; gold transliterates letter-by-letter; some ё/case
CARDINAL 272,442 48.80 48.80 emits одна тысяча (gold = тысяча); no case/declension; leaves bare 2
MONEY 2,690 85.65 85.65 млн/тыс./долл./USD not expanded; no case agreement; 10 000 split wrong
DECIMAL 7,297 93.90 93.90 decimal comma not handled: 1,2→один,два (gold одна целая две десятых)
MEASURE 40,534 96.88 96.79 units not expanded: км→километров; no case agreement
ELECTRONIC 5,832 97.38 97.38 URLs/emails not parsed (.com, -, per-letter spelling)
LETTERS 189,528 99.18 99.18 acronyms read phonetically (эр эс…) vs gold per-letter (р с…); lowercase/dotted forms missed
TELEPHONE 10,088 99.66 99.66 different segmentation; gold uses sil; groups read as big numbers
DATE 185,959 100.00 100.00 needs ordinal/genitive year + года; only DD.MM.YYYY handled, years read as cardinals
ORDINAL 46,738 100.00 100.00 Roman numerals not handled (III→иии); years read as cardinal
FRACTION 2,460 100.00 100.00 / not treated as a fraction
DIGIT 2,012 100.00 100.00 strips leading zeros, reads as cardinal instead of digit-by-digit
TIME 1,945 100.00 100.00 not implemented (confirmed in README)
TOTAL 10,574,516 26.97 11.47 overall token accuracy ≈ 73.0% exact / 88.5% case-insensitive