--- id: text2num version: "3.0.2" license: unclear license_treatment: permissive maintenance: active --- # text2num — Parse and convert numbers written in French, Spanish, English, Portuguese, German, Dutch or Italian into their digit representation. License: permissive · Maintenance: active · Downloads: 685.2K/mo ## What it is and what it does text2num is a parser library that recognizes and converts numbers written as natural language words into their integer or decimal digit equivalents. It supports seven languages: Dutch, English, French, German, Italian, Portuguese, and Spanish. The library handles cardinal numbers (e.g., 'ninety-five'), ordinals (e.g., 'fifth'), and decimal numbers (e.g., 'twelve point five'). The implementation is based on a Rust algorithm, providing low resource and energy consumption with small latency, and precompiled wheels are provided so you don't need to compile Rust yourself. The package offers two main functions: direct conversion of word strings to numbers, and finding and transcribing all numbers within larger text passages. It operates in a relaxed parsing mode by default, tolerating punctuation and spacing variations in the input. There are no external runtime dependencies, making it lightweight and suitable for embedded or resource-constrained environments. Use it for: - Convert spoken or transcribed numbers in customer service or voice-to-text workflows into standardized digit format. - Parse invoice or contract text to extract numerical amounts written in words for data entry or validation. - Process multilingual documents to normalize number representations for downstream analysis or database storage. - Build chatbots or voice assistants that need to understand number words in multiple languages. - Validate or clean datasets containing mixed text and number formats across international sources. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts natural language number words into their digit representations across seven languages, and detects ordinal, cardinal, and decimal numbers in text streams. Yes. The package is actively maintained, has no known vulnerabilities, supports current Python versions, and solves a specific multilingual parsing problem with zero runtime dependencies. Install friction is moderate but manageable via precompiled wheels. The permissive license and stable API make it suitable for production use. ## Install pip install text2num uv add text2num poetry add text2num ## Installing text2num Before you install: Medium install friction due to compiled wheels, but precompiled binaries are provided for Linux, macOS, and Windows across multiple architectures and Python versions (3.8–3.13), making installation straightforward on supported platforms. Repository is actively maintained with recent commits. License in practice: Permissive license allows use in commercial and open-source projects without restriction. Quickstart: pip install text2num from text2num import text2num result = text2num('ninety-five', 'en') print(result) # 95 Requires Python 3.8 or later; macOS support begins at Python 3.11. Verify before relying: - Whether the Rust implementation provides measurable performance gains over the retired 2.X pure-Python version. - Whether speech-to-text token stream processing is production-ready or experimental. - Exact license identifier (MIT indicated by classifier but not confirmed in metadata). ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 685.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags text to number conversion, natural language number parsing, words to digits multilingual, ordinal cardinal decimal detection, number word recognition, text number transcription, language number parsing, multilingual-nlp, number-parsing, rust-backed [View on SkillFed](https://skillfed.io/packages/text2num) · [View on PyPI](https://pypi.org/project/text2num/)