中文處理工具,包含中文數轉換、中文翻譯、字元切換、民國日期處理、法規自動完成等
Project description
給懂中文的程式設計師
中文數字模組
運用中文文字處理程式庫的程式設計師自然懂中文, 所以本程式庫設計哲學就是函數以中文命名且能簡明表達功能, 另以簡體名稱表示處理簡體中文情形,繁體名稱表示處理繁體中文情形, 如以中文數字處理功能為例:
from zhongwen.number import 中文數字, 中文数字, 大寫中文數字
中文數字(10600)
>>> '一萬零六百'
中文数字(10600)
>>> '一万零六百'
大寫中文數字(23232.00518)
>>> '貳萬參仟貳佰參拾貳點零零伍壹捌'
民國日期處理
處理於臺灣使用之民國日期功能, 示例如次:
from zhongwen.date import 取日期
取日期('111.9.23')
>>> datetime(2022,9,23,0,0)
取日期('110/12/27')
>>> datetime(2021,12,27,0,0)
from zhongwen.date import 民國日期
民國日期(datetime(2021,12,27,0,0), '%Y年%M月%d日')
>>> '110年12月27日'
中文字元判斷
中文字元判斷功能示例如次:
是否為中文字元('繁')
>>> True
是否為中文字元('简')
>>> True
是否為中文字元('a')
>>> False
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
zhongwen-3.14208.tar.gz
(139.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zhongwen-3.14208.tar.gz.
File metadata
- Download URL: zhongwen-3.14208.tar.gz
- Upload date:
- Size: 139.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b8baecd57f177604fe3b7a83524e54c696281785f7821b14215eaed5b00b276
|
|
| MD5 |
c2af963fb7708ad08256457a85f31f95
|
|
| BLAKE2b-256 |
97a372ac879d17da1a9f8b7b6a7bdf9dfa9c704eed4e3f31d3a5591b0a3918c3
|
File details
Details for the file zhongwen-3.14208-py3-none-any.whl.
File metadata
- Download URL: zhongwen-3.14208-py3-none-any.whl
- Upload date:
- Size: 93.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42f52d4c58f114be8d07813e4fedbe27067ea941f3f274f7c139aaee4d6d4a7b
|
|
| MD5 |
2cd12ec22b8ba42fd1048a4f15cddfd6
|
|
| BLAKE2b-256 |
fb408f503ad7a96ac410be5f0cb88cffb922c7d123ac76bafa2489ca97c2b520
|