Path: csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod From: Edward Betts Newsgroups: linux.debian.bugs.dist,linux.debian.devel,linux.debian.maint.python Subject: Bug#1071500: ITP: unicode-rbnf -- Rule-based number formatting using Unicode CLDR data Date: Mon, 20 May 2024 11:10:01 +0200 Message-ID: X-Original-To: Debian Bug Tracking System X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Mon May 20 09:09:11 2024 Old-Return-Path: X-Spam-Flag: NO X-Spam-Score: 1.2 Reply-To: Edward Betts , 1071500@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: debian-devel@lists.debian.org, debian-python@lists.debian.org, wnpp@debian.org X-Debian-Pr-Message: report 1071500 X-Debian-Pr-Package: wnpp MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Debian-Message: from BTS X-Mailing-List: archive/latest/1838428 List-ID: List-URL: Approved: robomod@news.nic.it Lines: 41 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Mon, 20 May 2024 10:04:05 +0100 X-Original-Message-ID: Xref: csiph.com linux.debian.bugs.dist:1198017 linux.debian.devel:111830 linux.debian.maint.python:15851 Package: wnpp Severity: wishlist Owner: Edward Betts X-Debbugs-Cc: debian-devel@lists.debian.org, debian-python@lists.debian.org * Package name : unicode-rbnf Version : 1.1.0 Upstream Author : Michael Hansen * URL : https://github.com/rhasspy/unicode-rbnf * License : MIT Programming Lang: Python Description : 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. I plan to maintain this package as part of the Python team.