1.0.7 • Published 7 months ago
@yar.ua/numerals v1.0.7
Yar. Ukrainian Numbers Spellout
The library to convert the numbers into Ukrainian text.
Supported Features
- Number spellout – converting numbers into text (numerals).
- Numeral inflection - modifying grammatical form of numerals to match required grammatical characteristics.
- Agreement - setting grammatical forms of compound numerals to produce grammatically and syntactically correct text.
- Stress.
- Cardinal numbers in range [0...1×1027)1, 2.
- Ordinal numbers in range [0...1×1027)1.
- Fractional numbers with whole, each element in range [0...1×1027).
- Decimal numbers in range (0...1×1027) with precision up to 1×10-27 3.
1 Numbers outside of the range will be spelled out digit-wise and inflected only last digit
2 1×1027 is 1 000 000 000 000 000 000 000 000 000
3 1×10-27 is 0,000 000 000 000 000 000 000 000 001
Future Features
- Negative numbers.
- Contracted ordinal numbers (e.g. "1-й", "1000-на").
- Scientific notation of exponential numbers (e.g. "1e5").
- Roman numbers (e.g. "XIV").
Supported Grammatical Attributes
- cases: nominative, genitive, dative, accusative, instrumental, locative, vocative
- gender: masculine, feminine, neuter
- number: singular, plural
- animacy: inanimate, animate