Giter VIP home page Giter VIP logo

number's Introduction

number

re for Chinese number and quantity detection

basic grammar label(defined by instances or re)

name label example
Arabic digit ad 123 1e-5
Chinese digit cd 一 二 十 玖
Chinese Magnitude mag 十 百 佰
Chinese Fraction Connective cfc 分之 比
Chinese Radix Point crp
Skip Magnitude Connective smc
adv adv 大 小 (五小队士兵)
Ordinal Number Prefix nop
idioms idiom 进一步
comparision prefix cp 大于 多于
comparision suffix cs
estimation prefix ep 大约
estimation suffix es 上下 左右
quantity computational connective qc / * 每
number span connective nc 到 ~
quantity q 本 件 块

combination grammar label

name label example
Ordinal Number ON 第二
number NUM 一百二 1e-5
Chinese Number CN 一百二
Chinese Fraction number CFN 十分之一
Quantity Phrase QP 五米

label definition grammar

  • instance or re
 mag::百
 mag::十
 cd::十
 ad::[-+]?(\d+(\.\d*)?)([eE][-+]?\d+)?([\/:](\d+(\.\d*)?)([eE][-+]?\d+)?)?%?‰?|\d+(,\d{3})+
  • combination of other labels
NUM::$ad$ $mag$
NUM::$ad$
NUM::$CN$ 
QP::$NUM$ $q$ 

Requirements

python >=3.5

Demo

python3 test.py

number's People

Contributors

shichaosun avatar

Stargazers

 avatar

Watchers

 avatar

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.