Metadata-Version: 2.4
Name: wetext
Version: 0.0.7
Summary: WeTextProcessing Runtime
Author-email: Zhendong Peng <pzd17@tsinghua.org.cn>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/pengzhendong/wetext
Project-URL: Documentation, https://github.com/pengzhendong/wetext#readme
Project-URL: BugTracker, https://github.com/pengzhendong/wetext/issues
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: kaldifst>=1.7.14
Dynamic: license-file

# wetext

Python runtime for WeTextProcessing (does not depend on Pynini).

## Usage

```bash
$ pip install wetext
$ python
```

### TN (Text Normalization)

```python
>>> from wetext import Normalizer
>>> normalizer = Normalizer(lang="zh", operator="tn", remove_erhua=True)
>>> normalizer.normalize("你好 WeTextProcessing 1.0，全新版本儿，简直666")
你好 WeTextProcessing 一点零，全新版本，简直六六六
```

### ITN (Inverse Text Normalization)

```python
>>> from wetext import Normalizer
>>> normalizer = Normalizer(lang="zh", operator="itn", enable_0_to_9=False)
>>> normalizer.normalize("你好 WeTextProcessing 一点零，全新版本儿，简直六六六，九和六")
你好 WeTextProcessing 1.0，全新版本儿，简直666，九和六
```
