--- id: wetext version: "0.1.6" license: Apache-2.0 license_treatment: permissive maintenance: active --- # wetext — WeTextProcessing Runtime License: permissive · Maintenance: active · Downloads: 281.4K/mo ## What it is and what it does WeText is a Python runtime for multilingual text normalization and inverse text normalization using finite state transducers. It converts between written and spoken forms of text—for example, turning "$12.50" into "twelve point five dollars" or vice versa—across Chinese, English, and Japanese. The package does not depend on Pynini, instead using kaldifst for FST operations. Beyond basic normalization, it offers character conversions (traditional to simplified Chinese, full-width to half-width), linguistic preprocessing (interjection and punctuation removal, out-of-vocabulary tagging), and language-specific features like erhua removal for Chinese and 0-to-9 conversion for ITN. It exposes both a Python API with support for n-best candidates and exact token mappings, and a command-line interface for quick text processing. Use it for: - Prepare speech recognition output (spoken form) into written text for downstream NLP tasks - Convert written numbers and currency in documents into their spoken equivalents for text-to-speech systems - Preprocess multilingual user input by normalizing punctuation, removing interjections, and converting character widths - Generate multiple candidate normalizations ranked by FST weight for ambiguous text sequences - Build pipelines that require bidirectional text normalization for Chinese, English, or Japanese corpora ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Normalizes and denormalizes text in Chinese, English, and Japanese using finite state transducers, converting between written and spoken forms with support for character conversions and linguistic preprocessing. Yes. The package is actively maintained, has low install friction, carries a permissive license, and fills a specific need for multilingual text normalization with FST-based precision. It is suitable for production use in speech processing, NLP preprocessing, and text-to-speech pipelines. No known vulnerabilities. ## Install pip install wetext uv add wetext poetry add wetext ## Installing wetext Before you install: Low friction: pure Python wheel with only two runtime dependencies (contractions and kaldifst). Active maintenance with a recent release 16 days ago. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most production deployments. Quickstart: pip install wetext from wetext import Normalizer normalizer = Normalizer(lang="en", operator="tn") result = normalizer.normalize("The price is $12.50") print(result) # The price is twelve point five dollars Requires Python 3.7 or later; kaldifst dependency may require a C++ compiler on some platforms. Verify before relying: - Performance characteristics and typical latency per normalization call - Memory footprint of loaded FST models for each language - Accuracy metrics or benchmarks against standard test sets - Whether n-best and mapping features are stable or experimental ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 281.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags text normalization chinese english japanese, inverse text normalization ITN, finite state transducer text processing, spoken to written text conversion, number word conversion, multilingual text preprocessing, multilingual-nlp, fst-based, speech-processing [View on SkillFed](https://skillfed.io/packages/wetext) · [View on PyPI](https://pypi.org/project/wetext/)