zhconv-rs 0.3.2.post2__cp39-abi3-win32.whl → 0.3.3__cp39-abi3-win32.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
zhconv_rs/zhconv_rs.pyd
CHANGED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: zhconv-rs
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
@@ -27,13 +27,19 @@ zhconv-rs converts Chinese text among traditional/simplified scripts or regional
|
|
|
27
27
|
|
|
28
28
|
It leverages the [Aho-Corasick](https://github.com/daac-tools/daachorse) algorithm for linear time complexity with respect to the length of input text and conversion rules (`O(n+m)`), processing dozens of MiBs text per second.
|
|
29
29
|
|
|
30
|
-
🔗 **Web app
|
|
30
|
+
🔗 **Web app (Wasm):** https://zhconv.pages.dev (w/ OpenCC dicts)
|
|
31
31
|
|
|
32
32
|
⚙️ **Cli**: `cargo install zhconv-cli` or check [releases](https://github.com/Gowee/zhconv-rs/releases).
|
|
33
33
|
|
|
34
34
|
🦀 **Rust crate**: `cargo add zhconv` (check [docs](https://docs.rs/zhconv/latest/zhconv/) for examples)
|
|
35
35
|
|
|
36
|
-
🐍 **Python package w/ wheels
|
|
36
|
+
🐍 **Python package w/ wheels**: `pip install zhconv-rs` or `pip install zhconv-rs-opencc` (w/ OpenCC dicts)
|
|
37
|
+
|
|
38
|
+
<a href="https://deploy.workers.cloudflare.com/?url=https://github.com/gowee/zhconv-rs">
|
|
39
|
+
<img src="https://deploy.workers.cloudflare.com/button" align="right" alt="Deploy to Cloudflare Workers">
|
|
40
|
+
</a>
|
|
41
|
+
|
|
42
|
+
🧩 **API demo**: https://zhconv.bamboo.workers.dev
|
|
37
43
|
|
|
38
44
|
<details open>
|
|
39
45
|
<summary>Python snippet</summary>
|
|
@@ -58,9 +64,9 @@ assert convert("秀州西去湖州近 幾䖏樓臺罨畫間") == "秀州西去
|
|
|
58
64
|
|
|
59
65
|
</details>
|
|
60
66
|
|
|
61
|
-
**JS (Webpack)**: `npm install zhconv` or `yarn add zhconv` (
|
|
67
|
+
**JS (Webpack)**: `npm install zhconv` or `yarn add zhconv` (Wasm, [instructions](https://rustwasm.github.io/wasm-pack/book/tutorials/npm-browser-packages/using-your-library.html))
|
|
62
68
|
|
|
63
|
-
**JS in browser**: https://cdn.jsdelivr.net/npm/zhconv-web@latest (
|
|
69
|
+
**JS in browser**: https://cdn.jsdelivr.net/npm/zhconv-web@latest (Wasm)
|
|
64
70
|
|
|
65
71
|
<details>
|
|
66
72
|
<summary>HTML snippet</summary>
|
|
@@ -171,9 +177,14 @@ infer_variant data3185k time: [74.878 ms 76.262 ms 77.818 ms]
|
|
|
171
177
|
```
|
|
172
178
|
|
|
173
179
|
</details>
|
|
180
|
+
<!--
|
|
181
|
+
## Upstream rulesets
|
|
174
182
|
|
|
175
|
-
|
|
176
|
-
|
|
183
|
+
zhconv-rs does not maintain any conversion rulesets/dicts. Instead, it relies on two upstream sources: MediaWiki and OpenCC. These rulesets are merged and compiled into an automaton at compile-time for optimal performance, which means rulesets cannot be dynamically selected at runtime. However, it is possible to load custom rulesets manually.
|
|
184
|
+
|
|
185
|
+
By default, only MediaWiki rulesets are used. For a Rust project, to enable additional OpenCC rulesets, activate the `opencc` feature: `zhconv = { version = "...", features = [ "opencc" ] }`. For a Python project, there are two standalone packages `zhconv-rs` (w/ MediaWiki rulesets only) and `zhconv-rs-opencc` (w/ additional OpenCC rulesets) to be installed as needed. For the API on Workers, check [worker.yml](.github/workflows/worker.yml) for instructions on configuring OpenCC rulesets. The web app is always shiped with additional OpenCC rulesets for now.-->
|
|
186
|
+
|
|
187
|
+
**Note:** Enabling OpenCC rulesets increases the build size by several MiBs and noticeably impacts performance, even though it still outperforms other implementations.
|
|
177
188
|
|
|
178
189
|
<!--
|
|
179
190
|
## Differences with other converters
|
|
@@ -208,4 +219,5 @@ References:
|
|
|
208
219
|
- https://zh.wikipedia.org/wiki/Help:高级字词转换语法
|
|
209
220
|
- https://github.com/wikimedia/mediawiki/blob/master/includes/language/LanguageConverter.php
|
|
210
221
|
<!--- https://www.hankcs.com/nlp/simplified-traditional-chinese-conversion.html-->
|
|
222
|
+
|
|
211
223
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
zhconv_rs-0.3.3.dist-info/METADATA,sha256=L41h5cH2NXg5m7FPHe3ozXZYHZ8ww0g6FcPkTZcW0cY,14430
|
|
2
|
+
zhconv_rs-0.3.3.dist-info/WHEEL,sha256=3v_mPEJI8eYP9g-6GI3qMKke7f44IisvaaA6YMblZRI,90
|
|
3
|
+
zhconv_rs/__init__.py,sha256=sEUd2raL1aXivmIoU49Anqoo61OtzDu1eZirNbDLEps,119
|
|
4
|
+
zhconv_rs/__init__.pyi,sha256=Fo543s5ekz962VOn_ecAACwYBFy9Ta7SD1mqucEuFls,1037
|
|
5
|
+
zhconv_rs/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
zhconv_rs/zhconv_rs.pyd,sha256=TKI7Db2WB2MfxVXUQrRfE1KUTMlAGYqJfVMlapjwlK4,2589184
|
|
7
|
+
zhconv_rs-0.3.3.dist-info/RECORD,,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
zhconv_rs-0.3.2.post2.dist-info/METADATA,sha256=4mAlOt8eXg5MUdPjJuOF946Hj6uDqwRHIAZD2tRj_Nk,13322
|
|
2
|
-
zhconv_rs-0.3.2.post2.dist-info/WHEEL,sha256=M0Ic6pAGuWT2rFmFPpb-SpFKB1PqNMLrguwJiCZANxw,90
|
|
3
|
-
zhconv_rs/__init__.py,sha256=sEUd2raL1aXivmIoU49Anqoo61OtzDu1eZirNbDLEps,119
|
|
4
|
-
zhconv_rs/__init__.pyi,sha256=Fo543s5ekz962VOn_ecAACwYBFy9Ta7SD1mqucEuFls,1037
|
|
5
|
-
zhconv_rs/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
zhconv_rs/zhconv_rs.pyd,sha256=BwYnmbFiyyZ1oqNquP5bAgsjwn2IORF_Nvy5whNXSsk,2599936
|
|
7
|
-
zhconv_rs-0.3.2.post2.dist-info/RECORD,,
|