cn2an
Convert Chinese numerals and Arabic numerals.
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and solves a specific problem with low install friction. It is well-suited for applications that need bidirectional Chinese-Arabic numeral conversion. The experimental sentence-level transformation feature adds value for text processing but should be tested for your specific use cases.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.7 or later.
- The sentence-level transformation feature is marked experimental and may produce unexpected results in edge cases.
- Low install friction with a pure Python wheel.
License · maintenance · safety
MIT License (permissive) — MIT License permits unrestricted use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2026-04-22 (114 days) · last repo commit 2026-04-23 · 765 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 304,235 downloads/mo, #7,807 on PyPI
Alternatives
Verify before relying
pip install cn2an
import cn2an
# Chinese to Arabic
result = cn2an.cn2an("一百二十三")
print(result) # 123
# Arabic to Chinese
result = cn2an.an2cn("123")
print(result) # 一百二十三- Whether the proces dependency is a required runtime or only used for internal data preprocessing
- Performance characteristics for very large batch conversions or real-time API usage
- Accuracy of the experimental sentence-level transformation feature across edge cases
What it is and what it does
cn2an is a bidirectional converter between Chinese numerals and Arabic numerals. It handles standard conversions across multiple parsing modes: strict mode enforces proper numeral syntax, normal mode accepts informal sequences, smart mode handles mixed notation, and direct mode performs character-by-character translation. Beyond simple numbers, it transforms dates, fractions, percentages, and temperatures within sentences, supporting negative numbers and decimals up to 10**16 magnitude in both directions.
The package offers three output styles for Arabic-to-Chinese conversion: lowercase Chinese numerals, uppercase formal numerals, and RMB currency notation. It includes an HTTP API for non-Python environments. The library depends on proces for data preprocessing and is actively maintained with recent bug fixes for numeral parsing edge cases.
Use it for
- Parse Chinese financial documents or invoices that use written numerals into machine-readable integers
- Generate human-readable Chinese numeral output for financial reports, receipts, or formal RMB amounts
- Extract and normalize dates from Chinese text for data cleaning pipelines
- Convert mixed-notation numbers in Chinese text for standardization
- Build multilingual number handling for applications serving Chinese-speaking users
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and solves a specific problem with low install friction. It is well-suited for applications that need bidirectional Chinese-Arabic numeral conversion. The experimental sentence-level transformation feature adds value for text processing but should be tested for your specific use cases.
Install
cn2an on PyPI
Before you install
Low install friction with a pure Python wheel. The package is actively maintained with recent commits and no known vulnerabilities. Supports Python 3.7 and later versions across Windows, macOS, and Ubuntu.
Requires Python 3.7 or later. The sentence-level transformation feature is marked experimental and may produce unexpected results in edge cases.
License in practice
MIT License permits unrestricted use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install cn2an
import cn2an
# Chinese to Arabic
result = cn2an.cn2an("一百二十三")
print(result) # 123
# Arabic to Chinese
result = cn2an.an2cn("123")
print(result) # 一百二十三
Verify before relying
- Whether the proces dependency is a required runtime or only used for internal data preprocessing
- Performance characteristics for very large batch conversions or real-time API usage
- Accuracy of the experimental sentence-level transformation feature across edge cases
Package facts
| License | MIT License permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageproces |
| Maintenance | Actively maintained 114 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 304,235 / month, #7,807 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: cn2an-0.5.24-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “chinese numerals to arabic”
- cn2anConverts between Chinese numerals and Arabic numerals in multiple…
- uromanConverts text in any script to Latin alphabet romanization,…
- romanConverts between Arabic integers and Roman numerals in both…
Give your agent the search over MCP, or paste the wish link into any chat.
More Linguistic packages
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
tiktoken is a fast BPE tokenizer that converts text into token sequences compatible with OpenAI models, supporting multiple encoding schemes including o200k_base and model-specific encodings.
Install it if you work with OpenAI APIs or need to understand token boundaries in GPT-family models.
Detects character encoding and language in byte sequences with high accuracy, supporting 99 encodings and returning confidence scores, language tags, and MIME types.
Install it if you need to detect character encoding or language in byte data; the rewrite makes it substantially faster and more accurate than its predecessors.
Converts Unicode text to ASCII by transliterating non-ASCII characters into their closest ASCII equivalents, with no runtime dependencies.
However, if transliteration quality or ongoing maintenance matters, consider unidecode instead despite its GPL-only license.
Lark is a parsing library that builds abstract syntax trees from context-free grammars, supporting multiple parsing algorithms (Earley, LALR(1), CYK) with automatic line and column tracking.
Python bindings to the tree-sitter parsing library, enabling incremental parsing and syntax tree analysis for source code.
See also roman · roman-numerals · zhconv · roman-numerals-py · proces · pypinyin · recognizers-text-number · bangla · recognizers-text-number-with-unit · arabic-reshaper