@laisuk/opencc-fmmseg-wasm 0.3.6 → 0.3.7
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.
- package/README.md +8 -6
- package/bin/opencc.js +2 -2
- package/opencc_fmmseg_wasm.d.ts +2 -0
- package/opencc_fmmseg_wasm.js +3 -1
- package/opencc_fmmseg_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -96,6 +96,7 @@ console.log(cc.convert("别随便录影侵犯个人隐私权", false));
|
|
|
96
96
|
| `t2tw` | `OpenccConfigWasm.T2tw` | Traditional Chinese → Taiwan Traditional |
|
|
97
97
|
| `t2twp` | `OpenccConfigWasm.T2twp` | Traditional Chinese → Taiwan Traditional (phrases) |
|
|
98
98
|
| `t2hk` | `OpenccConfigWasm.T2hk` | Traditional Chinese → Hong Kong Traditional |
|
|
99
|
+
| `t2hkp` | `OpenccConfigWasm.T2hkp` | Traditional Chinese → Hong Kong Traditional (phrases)|
|
|
99
100
|
| `tw2s` | `OpenccConfigWasm.Tw2s` | Taiwan Traditional → Simplified Chinese |
|
|
100
101
|
| `tw2sp` | `OpenccConfigWasm.Tw2sp` | Taiwan Traditional → Simplified Chinese (phrases) |
|
|
101
102
|
| `tw2t` | `OpenccConfigWasm.Tw2t` | Taiwan Traditional → Traditional Chinese |
|
|
@@ -103,10 +104,11 @@ console.log(cc.convert("别随便录影侵犯个人隐私权", false));
|
|
|
103
104
|
| `hk2s` | `OpenccConfigWasm.Hk2s` | Hong Kong Traditional → Simplified Chinese |
|
|
104
105
|
| `hk2sp` | `OpenccConfigWasm.Hk2sp` | Hong Kong Traditional → Simplified Chinese (phrases) |
|
|
105
106
|
| `hk2t` | `OpenccConfigWasm.Hk2t` | Hong Kong Traditional → Traditional Chinese |
|
|
107
|
+
| `hk2tp` | `OpenccConfigWasm.Hk2tp` | Hong Kong Traditional → Traditional Chinese (phrases)|
|
|
106
108
|
| `jp2t` | `OpenccConfigWasm.Jp2t` | Japanese Shinjitai → Traditional Chinese |
|
|
107
109
|
| `t2jp` | `OpenccConfigWasm.T2jp` | Traditional Chinese → Japanese Shinjitai |
|
|
108
110
|
|
|
109
|
-
The numeric enum values match the vendored Rust backend. Existing values are unchanged; `S2hkp = 17` and `
|
|
111
|
+
The numeric enum values match the vendored Rust backend. Existing values are unchanged; `S2hkp = 17`, `Hk2sp = 18`, `T2hkp = 19`, and `Hk2tp = 20`.
|
|
110
112
|
|
|
111
113
|
---
|
|
112
114
|
|
|
@@ -316,7 +318,7 @@ OpenccWasm.getSupportedConfigs();
|
|
|
316
318
|
|
|
317
319
|
Returns all supported config strings.
|
|
318
320
|
|
|
319
|
-
Includes `s2hkp` and `
|
|
321
|
+
Includes `s2hkp`, `hk2sp`, `t2hkp`, and `hk2tp`.
|
|
320
322
|
|
|
321
323
|
---
|
|
322
324
|
|
|
@@ -663,8 +665,8 @@ opencc-fmmseg office -i input.docx -o output.docx -c s2t -p --keep-font
|
|
|
663
665
|
Supported conversion configs:
|
|
664
666
|
|
|
665
667
|
```text
|
|
666
|
-
s2t, s2tw, s2twp, s2hk, s2hkp, t2s, t2tw, t2twp, t2hk,
|
|
667
|
-
tw2s, tw2sp, tw2t, tw2tp, hk2s, hk2sp, hk2t, jp2t, t2jp
|
|
668
|
+
s2t, s2tw, s2twp, s2hk, s2hkp, t2s, t2tw, t2twp, t2hk, t2hkp,
|
|
669
|
+
tw2s, tw2sp, tw2t, tw2tp, hk2s, hk2sp, hk2t, hk2tp, jp2t, t2jp
|
|
668
670
|
```
|
|
669
671
|
|
|
670
672
|
### Office / EPUB Options
|
|
@@ -702,8 +704,8 @@ The package includes generated TypeScript definitions from `wasm-bindgen`.
|
|
|
702
704
|
|
|
703
705
|
The WASM-facing enum is exported as `OpenccConfigWasm`, alongside `OpenccWasm`.
|
|
704
706
|
|
|
705
|
-
`OpenccConfigWasm.S2hkp
|
|
706
|
-
config IDs `17`
|
|
707
|
+
`OpenccConfigWasm.S2hkp`, `OpenccConfigWasm.Hk2sp`, `OpenccConfigWasm.T2hkp`, and
|
|
708
|
+
`OpenccConfigWasm.Hk2tp` are available for Hong Kong phrase conversions and map to backend config IDs `17` through `20`.
|
|
707
709
|
|
|
708
710
|
---
|
|
709
711
|
|
package/bin/opencc.js
CHANGED
|
@@ -68,8 +68,8 @@ Convert options:
|
|
|
68
68
|
--out-enc <encoding> Output encoding (default: utf8)
|
|
69
69
|
|
|
70
70
|
Supported configs:
|
|
71
|
-
s2t, s2tw, s2twp, s2hk, s2hkp, t2s, t2tw, t2twp, t2hk,
|
|
72
|
-
tw2s, tw2sp, tw2t, tw2tp, hk2s, hk2sp, hk2t, jp2t, t2jp
|
|
71
|
+
s2t, s2tw, s2twp, s2hk, s2hkp, t2s, t2tw, t2twp, t2hk, t2hkp,
|
|
72
|
+
tw2s, tw2sp, tw2t, tw2tp, hk2s, hk2sp, hk2t, hk2tp, jp2t, t2jp
|
|
73
73
|
|
|
74
74
|
Office options:
|
|
75
75
|
-i, --input <file> Input Office / EPUB file
|
package/opencc_fmmseg_wasm.d.ts
CHANGED
package/opencc_fmmseg_wasm.js
CHANGED
|
@@ -15,7 +15,7 @@ export const DetofuLevelWasm = Object.freeze({
|
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* @enum {1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18}
|
|
18
|
+
* @enum {1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20}
|
|
19
19
|
*/
|
|
20
20
|
export const OpenccConfigWasm = Object.freeze({
|
|
21
21
|
S2t: 1, "1": "S2t",
|
|
@@ -36,6 +36,8 @@ export const OpenccConfigWasm = Object.freeze({
|
|
|
36
36
|
T2jp: 16, "16": "T2jp",
|
|
37
37
|
S2hkp: 17, "17": "S2hkp",
|
|
38
38
|
Hk2sp: 18, "18": "Hk2sp",
|
|
39
|
+
T2hkp: 19, "19": "T2hkp",
|
|
40
|
+
Hk2tp: 20, "20": "Hk2tp",
|
|
39
41
|
});
|
|
40
42
|
|
|
41
43
|
export class OpenccWasm {
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@laisuk/opencc-fmmseg-wasm",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "WebAssembly bindings for opencc-fmmseg, a high-performance OpenCC-compatible Simplified/Traditional Chinese converter.",
|
|
5
|
-
"version": "0.3.
|
|
5
|
+
"version": "0.3.7",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|