Skip to main content

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

Metadata

Release files for chinesenumber 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chinesenumber 0.1.1
File Size Uploaded
chinesenumber-0.1.1.tar.gz 2.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chinesenumber 0.1.1
File Interpreter ABI Platform
chinesenumber-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.4 kB

Release files / chinesenumber-0.1.1.tar.gz

Download URL chinesenumber-0.1.1.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cc00ee93293b5e45c4987aa8cdb78780b7daec5a799f020ddd0d35e86ba8b786
BLAKE2b-256 checksum
How to use checksums
3a5a72101d417f436401b37d0b5d6d6175e2110fde9d43d9e94f99e9cbbb12e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.11.5 CPython/2.7.15 Darwin/17.7.0

Release files / chinesenumber-0.1.1-py3-none-any.whl

Download URL chinesenumber-0.1.1-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce08bd08d4d11ee6ec8fcca6ad8f86e4410753a1c878b018bac88d2c666ae977
BLAKE2b-256 checksum
How to use checksums
b827c60841d95cc472fb09a25868716b7584d5054463668106df3ba594932053
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.11.5 CPython/2.7.15 Darwin/17.7.0

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page