全部搜索项
trixie  ] [  forky  ] [  sid  ]
[ 源代码: unicode-rbnf  ]

软件包:python3-unicode-rbnf(2.3.0-1)

python3-unicode-rbnf 的相关链接

Screenshot

Debian 的资源:

下载源码包 unicode-rbnf

维护小组:

外部的资源:

相似软件包:

Rule-based number formatting using Unicode CLDR data

Provides a pure Python implementation of rule-based number formatting (RBNF) using the Unicode Common Locale Data Repository (CLDR). This library allows for the spelling out of numbers for a wide range of locales, supporting various rulesets depending on the locale.

The library supports literal text, quotient and remainder substitution, optional substitution, rule substitution, and special rules for negative numbers, improper fractions, NaN, and infinity.

Example usage:

 >>> from unicode_rbnf import RbnfEngine
 >>> engine = RbnfEngine.for_language("en")
 >>> engine.format_number(1234)
 'one thousand two hundred thirty-four'

 >>> from unicode_rbnf import RbnfEngine, RulesetName
 >>> engine = RbnfEngine.for_language("en")
 >>> engine.format_number(1999, RulesetName.YEAR)
 'nineteen ninety-nine'
 >>> engine.format_number(11, RulesetName.ORDINAL)
 'eleventh'

This package is particularly useful for applications requiring accurate and locale-aware number spelling, such as text-to-speech systems, financial applications, and other linguistic tools.

其他与 python3-unicode-rbnf 有关的软件包

  • 依赖
  • 推荐
  • 建议
  • 增强

下载 python3-unicode-rbnf

下载可用于所有硬件架构的
硬件架构 软件包大小 安装后大小 文件
all 63.3 kB1,263.0 kB [文件列表]