Skip to main content

Convert Chinese (or Japanese) numbers to numeric digits (21)

Project description

ChineseNumber

Convert Chinese (or Japanese) numbers (e.g. 二十一) to numeric digits (21).

Similar in idea to https://github.com/akshaynagpal/w2n

The resulting numbers can be sorted using https://github.com/SethMMorton/natsort

Usage

>>> from chinesenumber import NumberParser
>>> parser = NumberParser()
>>> parser.numberify('第二十二课')
'第22课'
>>> parser.simple_parse('百六十五')
165

Installation

pip install chinesenumber

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chinesenumber-0.1.0.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distribution

chinesenumber-0.1.0-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page