Git Product home page Git Product logo

chn_text_norm's Introduction

Chn Text Norm

this is a repository for chinese text normalization (no longer maintained).

Quick Start

Git Clone Repo

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

How to Use ?

# text_normalize.py
from chn_text_norm.text import *

raw_text = 'your raw text'
text = Text(raw_text=raw_text).normalize()

chn_text_norm's People

Contributors

atomicoo avatar joee1995 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

chn_text_norm's Issues

纯数有问题

print(Text(raw_text='纯数:2983.07克或12345.60米。').normalize())
结果是 纯数:二九八三.零七克或一二三四五.六十米。
点没有正确识别

需要把

chn_text_norm/text.py

Lines 114 to 120 in 8210575

# 规范化数字编号
pattern = re.compile(r"(\d{4,32})")
matchers = pattern.findall(text)
if matchers:
# print('digit')
for matcher in matchers:
text = text.replace(matcher, Digit(digit=matcher).digit2chntext(), 1)
规范化数字编号挪到规范化纯数后面

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.