Metadata-Version: 2.1
Name: num2chinese
Version: 0.0.2
Summary: A nlp tool to transform numbers to Chinese characters
Home-page: https://github.com/linpershey/num2chinese
Author: kota
Author-email: nicolaskodak@gmail.com
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/linpershey/num2chinese/issues
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE

# num2chinese
## A nlp tool to transform numbers to Chinese

`num2chinese` uses regular expression to parse alphanumeric literals and transform them into readable Chinese charaters.

## Why it matters
- Chinese's pronuncication has lots of exceptions.
- For Chinese numbers, a character is uttered dependent of context.
- Lots of rules are required to handle messy Chinese number pronunciation. Dont' reinvent the wheel!

## Examples
- $120 : 美金一百二十
- 200塊 : 兩百塊
- 12121212個蘋果 : 一千兩百一十二萬一千兩百一十二個蘋果
- 2002002支 : 兩百萬兩千零二支
- 9487 : 九四八七
- 080080123 : 零八零零八零一二

## Usage
```
text = '12121212個蘋果''
normalizer = Normalizer()
text_normalized = normalizer.normalize(text)
print(text_normalized)
# result is '一千兩百萬十二萬一千兩百一十二個蘋果'
```
## Installation

`pip install num2chinese`

## Requirements

`python>=3.6,<4.0`

## License
MIT license



