Yoctol Natural Language Text Normalizer
Project description
# text-normalizer
[![travis][travis-image]][travis-url]
[![pypi][pypi-image]][pypi-url]
[travis-image]: https://img.shields.io/travis/Yoctol/text-normalizer.svg?style=flat
[travis-url]: https://travis-ci.org/Yoctol/text-normalizer
[pypi-image]: https://img.shields.io/pypi/v/text-normalizer.svg?style=flat
[pypi-url]: https://pypi.python.org/pypi/text-normalizer
Normalize your Text String.
It is a python package that help you normalize your text data and recover it.
## Install
Use Python3
```
> pip install text-normalizer
```
## Usage
```python
from text_normalizer.text_normalizer_collection_library import chinese_charactor_text_normalizer_collection_2
input_sentence = " 我在85.33度C買了一杯900──1000元的咖啡 《ohoh》?? m_m"
nor_sentence, meta = chinese_charactor_text_normalizer_collection_2.normalize(input_sentence)
print(nor_sentence)
> "我在_float_度c買了一杯_int_-_int_元的咖啡 <ohoh>?? m_m"
de_sentence = chinese_charactor_text_normalizer_collection_2.denormalize(nor_sentence, meta)
print(de_sentence)
> "我在85.33度C買了一杯900──1000元的咖啡 《ohoh》?? m_m",
```
[![travis][travis-image]][travis-url]
[![pypi][pypi-image]][pypi-url]
[travis-image]: https://img.shields.io/travis/Yoctol/text-normalizer.svg?style=flat
[travis-url]: https://travis-ci.org/Yoctol/text-normalizer
[pypi-image]: https://img.shields.io/pypi/v/text-normalizer.svg?style=flat
[pypi-url]: https://pypi.python.org/pypi/text-normalizer
Normalize your Text String.
It is a python package that help you normalize your text data and recover it.
## Install
Use Python3
```
> pip install text-normalizer
```
## Usage
```python
from text_normalizer.text_normalizer_collection_library import chinese_charactor_text_normalizer_collection_2
input_sentence = " 我在85.33度C買了一杯900──1000元的咖啡 《ohoh》?? m_m"
nor_sentence, meta = chinese_charactor_text_normalizer_collection_2.normalize(input_sentence)
print(nor_sentence)
> "我在_float_度c買了一杯_int_-_int_元的咖啡 <ohoh>?? m_m"
de_sentence = chinese_charactor_text_normalizer_collection_2.denormalize(nor_sentence, meta)
print(de_sentence)
> "我在85.33度C買了一杯900──1000元的咖啡 《ohoh》?? m_m",
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
text-normalizer-0.0.5.tar.gz
(22.8 kB
view hashes)
Built Distributions
text_normalizer-0.0.5-py3.5.egg
(218.4 kB
view hashes)
Close
Hashes for text_normalizer-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f21762b2ef6188ef9d38e9ed3c893ee44daa83f15802b02dce9cafdd7c8cb3fb |
|
MD5 | 4b1b909778e8ecc8e471bc9eed385a5e |
|
BLAKE2b-256 | 3efd927e5e3bc41b842bcb1f4ef3aa76d50a74770dad1e69fc122480c650f02b |