skillfed

wetext

WeTextProcessing Runtime

wetext v0.1.6 281.4K downloads/30d#8,100 on PyPI53
Permissive license Apache-2.0 Active released

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 wetext

uv

uv add wetext

poetry

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 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

Operating System :: OS IndependentProgramming Language :: Python :: 3

Tags

text normalization chinese english japaneseinverse text normalization ITNfinite state transducer text processingspoken to written text conversionnumber word conversionmultilingual text preprocessing
multilingual-nlpfst-basedspeech-processing

More Linguistic packages