|
|
1 anno fa | |
|---|---|---|
| .. | ||
| .gitignore | 1 anno fa | |
| README.md | 1 anno fa | |
| __init__.py | 1 anno fa | |
| basic_class.py | 1 anno fa | |
| basic_constant.py | 1 anno fa | |
| basic_util.py | 1 anno fa | |
| cardinal.py | 1 anno fa | |
| date.py | 1 anno fa | |
| digit.py | 1 anno fa | |
| fraction.py | 1 anno fa | |
| money.py | 1 anno fa | |
| percentage.py | 1 anno fa | |
| telephone.py | 1 anno fa | |
| text.py | 1 anno fa | |
this is a repository for chinese text normalization (no longer maintained).
git clone this repo to the root directory of your project which need to use it.
cd /path/to/proj
git clone https://github.com/Joee1995/chn-text-norm.git
after that, your doc tree should be:
proj # root of your project
|--- chn_text_norm # this chn-text-norm tool
|--- text.py
|--- ...
|--- text_normalize.py # your text normalization code
|--- ...
# text_normalize.py
from chn_text_norm.text import *
raw_text = 'your raw text'
text = Text(raw_text=raw_text).normalize()
打开test.py,然后你就知道怎么做了。