Cn2An.jl
Convert Chinese Numerals To Arabic Numerals With Julia Language.
Install / Use
/learn @Ailln/Cn2An.jlREADME
Cn2An.jl
🚀 Convert Chinese Numerals To Arabic Numerals With Julia Language.
You can learn by referring to the functions of this libray: cn2an.
Install
## In Julia REPL
julia> ]
pkg> add Cn2An
# or
pkg> add https://github.com/Ailln/Cn2An.jl
## In Julia file and REPL
using Pkg
Pkg.add("Cn2An")
# or
Pkg.add(PackageSpec(url="https://github.com/Ailln/Cn2An.jl"))
Usage
import Cn2An:cn2an
import Cn2An:an2cn
println(cn2an("一百二十三"))
# 123
println(an2cn(123))
# 一百二十三
Performance
Compare the performance of cn2an function running one million times on Python and Julia respectively.
| NO. | language | function | times | cost(s) | code | | :-: | :-: | :-: | :-: | :-: | :-: | | 1 | Python | an2cn core | 1000000 | 7.379 | an2cn | | 2 | Julia | an2cn core | 1000000 | 2.822 | an2cn |
From the results, we can see that Julia is almost three times faster!
License
Reference
Related Skills
node-connect
348.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
348.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
348.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
