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
Release history Release notifications | RSS feed
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.1.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for chinesenumber-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce08bd08d4d11ee6ec8fcca6ad8f86e4410753a1c878b018bac88d2c666ae977 |
|
MD5 | e955aecc1823a98df1766fe59b4d9d07 |
|
BLAKE2b-256 | b827c60841d95cc472fb09a25868716b7584d5054463668106df3ba594932053 |