wetext
WeTextProcessing Runtime
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 on this page — 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
wetext on PyPI
pip
pip install wetextuv
uv add wetextpoetry
poetry add wetextInstalling 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 the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — contractions, kaldifst |
| Maintenance | actively maintained — 16 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 281,375/month — #8,100 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: wetext-0.1.6-py3-none-any.whl
Tags
More Linguistic packages
Detects and normalizes text encoding from…
permissive · top 100 on PyPI
tiktokentiktoken is a fast BPE tokenizer that converts…
permissive · top 1,000 on PyPI
chardetDetects character encoding and language in byte…
permissive · top 1,000 on PyPI
text-unidecodeConverts Unicode text to ASCII by…
copyleft · top 1,000 on PyPI
larkLark is a parsing library that builds abstract…
permissive · top 1,000 on PyPI
tree-sitterPython bindings to the tree-sitter parsing…
permissive · top 1,000 on PyPI
nemo-text-processingConverts text to normalized form and back…
permissive · top 15,000 on PyPI
procesProces provides text preprocessing functions…
permissive · top 15,000 on PyPI
bnunicodenormalizerNormalizes Bangla Unicode text by fixing…
permissive · top 15,000 on PyPI
whisper-normalizerStandardizes and normalizes text using the…
permissive · top 15,000 on PyPI
pyniniPynini compiles grammar rules into weighted…
permissive · top 15,000 on PyPI
zhconvConverts text between Simplified and…
copyleft · top 15,000 on PyPI
OpenCCConverts text between Traditional Chinese,…
permissive · top 15,000 on PyPI
opencc-python-reimplementedConverts text between Simplified Chinese,…
permissive · top 5,000 on PyPI
sea-g2pConverts text to phonemes for Vietnamese, Thai,…
permissive · top 15,000 on PyPI
nameparserParses human names into seven structured…
copyleft · top 5,000 on PyPI