opencc-wasm 0.8.2 → 0.10.0

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.
Files changed (75) hide show
  1. package/README.md +50 -5
  2. package/README.zh.md +51 -6
  3. package/dist/cjs/index.cjs +9 -3
  4. package/dist/cjs/opencc-wasm.cjs +1 -1
  5. package/dist/cjs/opencc-wasm.wasm +0 -0
  6. package/dist/data/config/hk2s.json +30 -26
  7. package/dist/data/config/hk2sp.json +38 -0
  8. package/dist/data/config/hk2sp_jieba.json +61 -0
  9. package/dist/data/config/hk2t.json +14 -18
  10. package/dist/data/config/jp2t.json +15 -22
  11. package/dist/data/config/opencc_config.schema.json +45 -94
  12. package/dist/data/config/s2hk.json +37 -18
  13. package/dist/data/config/s2hk_jieba.json +51 -16
  14. package/dist/data/config/s2hkp.json +47 -0
  15. package/dist/data/config/s2hkp_jieba.json +66 -0
  16. package/dist/data/config/s2t.json +22 -19
  17. package/dist/data/config/s2t_cngov.json +16 -18
  18. package/dist/data/config/s2t_jieba.json +35 -11
  19. package/dist/data/config/s2tw.json +38 -19
  20. package/dist/data/config/s2tw_jieba.json +51 -16
  21. package/dist/data/config/s2twp.json +39 -24
  22. package/dist/data/config/s2twp_jieba.json +55 -21
  23. package/dist/data/config/t2cngov.json +16 -18
  24. package/dist/data/config/t2cngov_keep_simp.json +16 -18
  25. package/dist/data/config/t2hk.json +15 -13
  26. package/dist/data/config/t2jp.json +7 -14
  27. package/dist/data/config/t2s.json +20 -19
  28. package/dist/data/config/t2s_cngov.json +16 -18
  29. package/dist/data/config/t2tw.json +15 -13
  30. package/dist/data/config/tw2s.json +31 -27
  31. package/dist/data/config/tw2sp.json +32 -30
  32. package/dist/data/config/tw2sp_jieba.json +50 -25
  33. package/dist/data/config/tw2t.json +14 -18
  34. package/dist/data/dict/CJK_Compatibility_Ideographs.ocd2 +0 -0
  35. package/dist/data/dict/HKPhrases.ocd2 +0 -0
  36. package/dist/data/dict/HKPhrasesRev.ocd2 +0 -0
  37. package/dist/data/dict/HKVariants.ocd2 +0 -0
  38. package/dist/data/dict/HKVariantsPhrases.ocd2 +0 -0
  39. package/dist/data/dict/HKVariantsRev.ocd2 +0 -0
  40. package/dist/data/dict/HKVariantsRevPhrases.ocd2 +0 -0
  41. package/dist/data/dict/JPShinjitaiCharacters.ocd2 +0 -0
  42. package/dist/data/dict/JPShinjitaiCharactersRev.ocd2 +0 -0
  43. package/dist/data/dict/JPShinjitaiPhrases.ocd2 +0 -0
  44. package/dist/data/dict/STCharacters.ocd2 +0 -0
  45. package/dist/data/dict/STPhrases.ocd2 +0 -0
  46. package/dist/data/dict/STPhrases_GeneratedFromRegionalPhrases.ocd2 +0 -0
  47. package/dist/data/dict/TSCharacters.ocd2 +0 -0
  48. package/dist/data/dict/TSCharactersExt.ocd2 +0 -0
  49. package/dist/data/dict/TSPhrases.ocd2 +0 -0
  50. package/dist/data/dict/TWPhrases.ocd2 +0 -0
  51. package/dist/data/dict/TWPhrasesRev.ocd2 +0 -0
  52. package/dist/data/dict/TWVariants.ocd2 +0 -0
  53. package/dist/data/dict/TWVariantsPhrases.ocd2 +0 -0
  54. package/dist/data/dict/TWVariantsRev.ocd2 +0 -0
  55. package/dist/data/dict/TWVariantsRevPhrases.ocd2 +0 -0
  56. package/dist/data/dict/cngov/STCharacters.ocd2 +0 -0
  57. package/dist/data/dict/cngov/STPhrases.ocd2 +0 -0
  58. package/dist/data/dict/cngov/TGCharacters.ocd2 +0 -0
  59. package/dist/data/dict/cngov/TGCharacters_keep_simp.ocd2 +0 -0
  60. package/dist/data/dict/cngov/TGPhrases.ocd2 +0 -0
  61. package/dist/data/dict/cngov/TSCharacters.ocd2 +0 -0
  62. package/dist/data/dict/cngov/TSPhrases.ocd2 +0 -0
  63. package/dist/data/jieba_dict/jieba.dict.utf8 +1 -1
  64. package/dist/data/jieba_dict/jieba_merged.ocd2 +0 -0
  65. package/dist/data/jieba_dict/user.dict.utf8 +2 -1
  66. package/dist/esm/index.js +8 -0
  67. package/dist/esm/opencc-wasm.js +1 -1
  68. package/dist/esm/opencc-wasm.wasm +0 -0
  69. package/dist/opencc-wasm.wasm +0 -0
  70. package/index.d.ts +1 -0
  71. package/package.json +1 -1
  72. package/dist/data/dict/JPVariants.ocd2 +0 -0
  73. package/dist/data/dict/JPVariantsRev.ocd2 +0 -0
  74. package/dist/data/dict/cngov/GovVariants.ocd2 +0 -0
  75. package/dist/data/dict/cngov/GovVariants_keep_simp.ocd2 +0 -0
@@ -3,151 +3,102 @@
3
3
  "id": "https://opencc.byvoid.com/schema/opencc_config.schema.json",
4
4
  "title": "OpenCC configuration",
5
5
  "type": "object",
6
- "required": [
7
- "segmentation",
8
- "conversion_chain"
9
- ],
6
+ "required": ["name", "conversion_chain"],
10
7
  "additionalProperties": false,
11
8
  "properties": {
12
- "name": {
13
- "type": "string"
14
- },
15
- "segmentation": {
16
- "$ref": "#/definitions/segmentation"
9
+ "name": { "type": "string" },
10
+ "normalization": {
11
+ "type": "array",
12
+ "minItems": 1,
13
+ "items": { "$ref": "#/definitions/conversion" }
17
14
  },
15
+ "segmentation": { "$ref": "#/definitions/segmentation" },
18
16
  "conversion_chain": {
19
17
  "type": "array",
20
18
  "minItems": 1,
21
- "items": {
22
- "$ref": "#/definitions/conversion"
23
- }
19
+ "items": { "$ref": "#/definitions/conversion" }
24
20
  }
25
21
  },
26
22
  "definitions": {
27
23
  "segmentation": {
28
24
  "anyOf": [
29
- {
30
- "$ref": "#/definitions/mmseg_segmentation"
31
- },
32
- {
33
- "$ref": "#/definitions/plugin_segmentation"
34
- }
25
+ { "$ref": "#/definitions/mmseg_segmentation" },
26
+ { "$ref": "#/definitions/plugin_segmentation" }
35
27
  ]
36
28
  },
37
29
  "mmseg_segmentation": {
38
30
  "type": "object",
39
- "required": [
40
- "type",
41
- "dict"
42
- ],
31
+ "required": ["type", "dict"],
43
32
  "additionalProperties": false,
44
33
  "properties": {
45
- "type": {
46
- "enum": [
47
- "mmseg"
48
- ]
49
- },
50
- "dict": {
51
- "$ref": "#/definitions/dict"
52
- }
34
+ "type": { "enum": ["mmseg"] },
35
+ "dict": { "$ref": "#/definitions/dict" }
53
36
  }
54
37
  },
55
38
  "plugin_segmentation": {
56
39
  "type": "object",
57
- "required": [
58
- "type"
59
- ],
40
+ "required": ["type"],
60
41
  "not": {
61
- "properties": {
62
- "type": {
63
- "enum": [
64
- "mmseg"
65
- ]
66
- }
67
- },
68
- "required": [
69
- "type"
70
- ]
42
+ "properties": { "type": { "enum": ["mmseg"] } },
43
+ "required": ["type"]
71
44
  },
72
45
  "properties": {
73
- "type": {
74
- "type": "string",
75
- "minLength": 1
76
- },
46
+ "type": { "type": "string", "minLength": 1 },
77
47
  "resources": {
78
48
  "type": "object",
79
- "additionalProperties": {
80
- "type": "string"
81
- }
49
+ "additionalProperties": { "type": "string" }
82
50
  }
83
51
  },
84
- "additionalProperties": {
85
- "type": "string"
86
- }
52
+ "additionalProperties": { "type": "string" }
87
53
  },
88
54
  "conversion": {
89
55
  "type": "object",
90
- "required": [
91
- "dict"
92
- ],
56
+ "required": ["dict"],
93
57
  "additionalProperties": false,
94
- "properties": {
95
- "dict": {
96
- "$ref": "#/definitions/dict"
97
- }
98
- }
58
+ "properties": { "dict": { "$ref": "#/definitions/dict" } }
99
59
  },
100
60
  "dict": {
101
61
  "anyOf": [
102
- {
103
- "$ref": "#/definitions/file_dict"
104
- },
105
- {
106
- "$ref": "#/definitions/group_dict"
107
- }
62
+ { "$ref": "#/definitions/file_dict" },
63
+ { "$ref": "#/definitions/inline_dict" },
64
+ { "$ref": "#/definitions/group_dict" }
108
65
  ]
109
66
  },
110
67
  "file_dict": {
111
68
  "type": "object",
112
- "required": [
113
- "type",
114
- "file"
115
- ],
69
+ "required": ["type", "file"],
116
70
  "additionalProperties": false,
117
71
  "properties": {
118
- "type": {
119
- "enum": [
120
- "text",
121
- "ocd",
122
- "ocd2"
123
- ]
124
- },
125
- "file": {
126
- "type": "string",
127
- "minLength": 1
72
+ "type": { "enum": ["text", "ocd", "ocd2"] },
73
+ "file": { "type": "string", "minLength": 1 },
74
+ "may_output_tofu": { "type": "boolean" }
75
+ }
76
+ },
77
+ "inline_dict": {
78
+ "type": "object",
79
+ "required": ["type", "entries"],
80
+ "additionalProperties": false,
81
+ "properties": {
82
+ "type": { "enum": ["inline"] },
83
+ "entries": {
84
+ "type": "object",
85
+ "additionalProperties": { "type": "string", "minLength": 1 }
128
86
  }
129
87
  }
130
88
  },
131
89
  "group_dict": {
132
90
  "type": "object",
133
- "required": [
134
- "type",
135
- "dicts"
136
- ],
91
+ "required": ["type", "dicts", "match_policy"],
137
92
  "additionalProperties": false,
138
93
  "properties": {
139
- "type": {
140
- "enum": [
141
- "group"
142
- ]
143
- },
94
+ "type": { "enum": ["group"] },
95
+ "match_policy": { "enum": ["short_circuit", "union"] },
144
96
  "dicts": {
145
97
  "type": "array",
146
98
  "minItems": 1,
147
- "items": {
148
- "$ref": "#/definitions/dict"
149
- }
150
- }
99
+ "items": { "$ref": "#/definitions/dict" }
100
+ },
101
+ "may_output_tofu": { "type": "boolean" }
151
102
  }
152
103
  }
153
104
  }
@@ -1,27 +1,46 @@
1
1
  {
2
2
  "name": "Simplified Chinese to Traditional Chinese (Hong Kong variant)",
3
+ "normalization": [
4
+ { "dict": { "type": "ocd2", "file": "CJK_Compatibility_Ideographs.ocd2" } }
5
+ ],
3
6
  "segmentation": {
4
7
  "type": "mmseg",
5
- "dict": {
6
- "type": "ocd2",
7
- "file": "STPhrases.ocd2"
8
- }
9
- },
10
- "conversion_chain": [{
11
8
  "dict": {
12
9
  "type": "group",
13
- "dicts": [{
14
- "type": "ocd2",
15
- "file": "STPhrases.ocd2"
16
- }, {
17
- "type": "ocd2",
18
- "file": "STCharacters.ocd2"
19
- }]
10
+ "match_policy": "union",
11
+ "dicts": [
12
+ { "type": "ocd2", "file": "STPhrases.ocd2" },
13
+ { "type": "ocd2", "file": "STPhrases_GeneratedFromRegionalPhrases.ocd2" }
14
+ ]
20
15
  }
21
- }, {
22
- "dict": {
23
- "type": "ocd2",
24
- "file": "HKVariants.ocd2"
16
+ },
17
+ "conversion_chain": [
18
+ {
19
+ "dict": {
20
+ "type": "group",
21
+ "match_policy": "short_circuit",
22
+ "dicts": [
23
+ {
24
+ "type": "group",
25
+ "match_policy": "union",
26
+ "dicts": [
27
+ { "type": "ocd2", "file": "STPhrases.ocd2" },
28
+ { "type": "ocd2", "file": "STPhrases_GeneratedFromRegionalPhrases.ocd2" }
29
+ ]
30
+ },
31
+ { "type": "ocd2", "file": "STCharacters.ocd2" }
32
+ ]
33
+ }
34
+ },
35
+ {
36
+ "dict": {
37
+ "type": "group",
38
+ "match_policy": "short_circuit",
39
+ "dicts": [
40
+ { "type": "ocd2", "file": "HKVariantsPhrases.ocd2" },
41
+ { "type": "ocd2", "file": "HKVariants.ocd2" }
42
+ ]
43
+ }
25
44
  }
26
- }]
45
+ ]
27
46
  }
@@ -1,5 +1,13 @@
1
1
  {
2
2
  "name": "Simplified Chinese to Traditional Chinese (Hong Kong variant, Jieba Segmentation - Experimental)",
3
+ "normalization": [
4
+ {
5
+ "dict": {
6
+ "type": "ocd2",
7
+ "file": "CJK_Compatibility_Ideographs.ocd2"
8
+ }
9
+ }
10
+ ],
3
11
  "segmentation": {
4
12
  "type": "jieba",
5
13
  "resources": {
@@ -7,21 +15,48 @@
7
15
  "model_path": "jieba_dict/hmm_model.utf8"
8
16
  }
9
17
  },
10
- "conversion_chain": [{
11
- "dict": {
12
- "type": "group",
13
- "dicts": [{
14
- "type": "ocd2",
15
- "file": "STPhrases.ocd2"
16
- }, {
17
- "type": "ocd2",
18
- "file": "STCharacters.ocd2"
19
- }]
20
- }
21
- }, {
22
- "dict": {
23
- "type": "ocd2",
24
- "file": "HKVariants.ocd2"
18
+ "conversion_chain": [
19
+ {
20
+ "dict": {
21
+ "type": "group",
22
+ "match_policy": "short_circuit",
23
+ "dicts": [
24
+ {
25
+ "type": "group",
26
+ "match_policy": "union",
27
+ "dicts": [
28
+ {
29
+ "type": "ocd2",
30
+ "file": "STPhrases.ocd2"
31
+ },
32
+ {
33
+ "type": "ocd2",
34
+ "file": "STPhrases_GeneratedFromRegionalPhrases.ocd2"
35
+ }
36
+ ]
37
+ },
38
+ {
39
+ "type": "ocd2",
40
+ "file": "STCharacters.ocd2"
41
+ }
42
+ ]
43
+ }
44
+ },
45
+ {
46
+ "dict": {
47
+ "type": "group",
48
+ "match_policy": "short_circuit",
49
+ "dicts": [
50
+ {
51
+ "type": "ocd2",
52
+ "file": "HKVariantsPhrases.ocd2"
53
+ },
54
+ {
55
+ "type": "ocd2",
56
+ "file": "HKVariants.ocd2"
57
+ }
58
+ ]
59
+ }
25
60
  }
26
- }]
61
+ ]
27
62
  }
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "Simplified Chinese to Traditional Chinese (Hong Kong variant, with phrases)",
3
+ "normalization": [
4
+ { "dict": { "type": "ocd2", "file": "CJK_Compatibility_Ideographs.ocd2" } }
5
+ ],
6
+ "segmentation": {
7
+ "type": "mmseg",
8
+ "dict": {
9
+ "type": "group",
10
+ "match_policy": "union",
11
+ "dicts": [
12
+ { "type": "ocd2", "file": "STPhrases.ocd2" },
13
+ { "type": "ocd2", "file": "STPhrases_GeneratedFromRegionalPhrases.ocd2" }
14
+ ]
15
+ }
16
+ },
17
+ "conversion_chain": [
18
+ {
19
+ "dict": {
20
+ "type": "group",
21
+ "match_policy": "short_circuit",
22
+ "dicts": [
23
+ {
24
+ "type": "group",
25
+ "match_policy": "union",
26
+ "dicts": [
27
+ { "type": "ocd2", "file": "STPhrases.ocd2" },
28
+ { "type": "ocd2", "file": "STPhrases_GeneratedFromRegionalPhrases.ocd2" }
29
+ ]
30
+ },
31
+ { "type": "ocd2", "file": "STCharacters.ocd2" }
32
+ ]
33
+ }
34
+ },
35
+ {
36
+ "dict": {
37
+ "type": "group",
38
+ "match_policy": "short_circuit",
39
+ "dicts": [
40
+ { "type": "ocd2", "file": "HKPhrases.ocd2" },
41
+ { "type": "ocd2", "file": "HKVariantsPhrases.ocd2" },
42
+ { "type": "ocd2", "file": "HKVariants.ocd2" }
43
+ ]
44
+ }
45
+ }
46
+ ]
47
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "Simplified Chinese to Traditional Chinese (Hong Kong variant, with phrases, Jieba Segmentation - Experimental)",
3
+ "normalization": [
4
+ {
5
+ "dict": {
6
+ "type": "ocd2",
7
+ "file": "CJK_Compatibility_Ideographs.ocd2"
8
+ }
9
+ }
10
+ ],
11
+ "segmentation": {
12
+ "type": "jieba",
13
+ "resources": {
14
+ "dict_path": "jieba_dict/jieba_merged.ocd2",
15
+ "model_path": "jieba_dict/hmm_model.utf8"
16
+ }
17
+ },
18
+ "conversion_chain": [
19
+ {
20
+ "dict": {
21
+ "type": "group",
22
+ "match_policy": "short_circuit",
23
+ "dicts": [
24
+ {
25
+ "type": "group",
26
+ "match_policy": "union",
27
+ "dicts": [
28
+ {
29
+ "type": "ocd2",
30
+ "file": "STPhrases.ocd2"
31
+ },
32
+ {
33
+ "type": "ocd2",
34
+ "file": "STPhrases_GeneratedFromRegionalPhrases.ocd2"
35
+ }
36
+ ]
37
+ },
38
+ {
39
+ "type": "ocd2",
40
+ "file": "STCharacters.ocd2"
41
+ }
42
+ ]
43
+ }
44
+ },
45
+ {
46
+ "dict": {
47
+ "type": "group",
48
+ "match_policy": "short_circuit",
49
+ "dicts": [
50
+ {
51
+ "type": "ocd2",
52
+ "file": "HKPhrases.ocd2"
53
+ },
54
+ {
55
+ "type": "ocd2",
56
+ "file": "HKVariantsPhrases.ocd2"
57
+ },
58
+ {
59
+ "type": "ocd2",
60
+ "file": "HKVariants.ocd2"
61
+ }
62
+ ]
63
+ }
64
+ }
65
+ ]
66
+ }
@@ -1,22 +1,25 @@
1
1
  {
2
- "name": "Simplified Chinese to Traditional Chinese",
3
- "segmentation": {
4
- "type": "mmseg",
5
- "dict": {
6
- "type": "ocd2",
7
- "file": "STPhrases.ocd2"
2
+ "name": "Simplified Chinese to Traditional Chinese (OpenCC Standard)",
3
+ "normalization": [
4
+ { "dict": { "type": "ocd2", "file": "CJK_Compatibility_Ideographs.ocd2" } }
5
+ ],
6
+ "conversion_chain": [
7
+ {
8
+ "dict": {
9
+ "type": "group",
10
+ "match_policy": "short_circuit",
11
+ "dicts": [
12
+ {
13
+ "type": "group",
14
+ "match_policy": "union",
15
+ "dicts": [
16
+ { "type": "ocd2", "file": "STPhrases.ocd2" },
17
+ { "type": "ocd2", "file": "STPhrases_GeneratedFromRegionalPhrases.ocd2" }
18
+ ]
19
+ },
20
+ { "type": "ocd2", "file": "STCharacters.ocd2" }
21
+ ]
22
+ }
8
23
  }
9
- },
10
- "conversion_chain": [{
11
- "dict": {
12
- "type": "group",
13
- "dicts": [{
14
- "type": "ocd2",
15
- "file": "STPhrases.ocd2"
16
- }, {
17
- "type": "ocd2",
18
- "file": "STCharacters.ocd2"
19
- }]
20
- }
21
- }]
24
+ ]
22
25
  }
@@ -1,12 +1,5 @@
1
1
  {
2
2
  "name": "Simplified Chinese to Traditional Chinese (The Chinese Government Standard)",
3
- "author": "TerryTian-tech",
4
- "license": "Apache License 2.0",
5
- "source": "https://github.com/TerryTian-tech/OpenCC-Traditional-Chinese-characters-according-to-Chinese-government-standards",
6
- "contributors": ["TerryTian-tech", "Yi Jianpeng", "Hu Xinmei", "Duan Yatong"],
7
- "reference": "《通用规范汉字表》(2013)",
8
- "description": "Conservative conversion that preserves intentional simplified characters in mixed documents while standardizing traditional characters only.",
9
-
10
3
  "segmentation": {
11
4
  "type": "mmseg",
12
5
  "dict": {
@@ -14,16 +7,21 @@
14
7
  "file": "cngov/STPhrases.ocd2"
15
8
  }
16
9
  },
17
- "conversion_chain": [{
18
- "dict": {
19
- "type": "group",
20
- "dicts": [{
21
- "type": "ocd2",
22
- "file": "cngov/STPhrases.ocd2"
23
- }, {
24
- "type": "ocd2",
25
- "file": "cngov/STCharacters.ocd2"
26
- }]
10
+ "conversion_chain": [
11
+ {
12
+ "dict": {
13
+ "type": "group",
14
+ "dicts": [
15
+ {
16
+ "type": "ocd2",
17
+ "file": "cngov/STPhrases.ocd2"
18
+ },
19
+ {
20
+ "type": "ocd2",
21
+ "file": "cngov/STCharacters.ocd2"
22
+ }
23
+ ]
24
+ }
27
25
  }
28
- }]
26
+ ]
29
27
  }
@@ -1,5 +1,13 @@
1
1
  {
2
2
  "name": "Simplified Chinese to Traditional Chinese (Jieba Segmentation - Experimental)",
3
+ "normalization": [
4
+ {
5
+ "dict": {
6
+ "type": "ocd2",
7
+ "file": "CJK_Compatibility_Ideographs.ocd2"
8
+ }
9
+ }
10
+ ],
3
11
  "segmentation": {
4
12
  "type": "jieba",
5
13
  "resources": {
@@ -7,16 +15,32 @@
7
15
  "model_path": "jieba_dict/hmm_model.utf8"
8
16
  }
9
17
  },
10
- "conversion_chain": [{
11
- "dict": {
12
- "type": "group",
13
- "dicts": [{
14
- "type": "ocd2",
15
- "file": "STPhrases.ocd2"
16
- }, {
17
- "type": "ocd2",
18
- "file": "STCharacters.ocd2"
19
- }]
18
+ "conversion_chain": [
19
+ {
20
+ "dict": {
21
+ "type": "group",
22
+ "match_policy": "short_circuit",
23
+ "dicts": [
24
+ {
25
+ "type": "group",
26
+ "match_policy": "union",
27
+ "dicts": [
28
+ {
29
+ "type": "ocd2",
30
+ "file": "STPhrases.ocd2"
31
+ },
32
+ {
33
+ "type": "ocd2",
34
+ "file": "STPhrases_GeneratedFromRegionalPhrases.ocd2"
35
+ }
36
+ ]
37
+ },
38
+ {
39
+ "type": "ocd2",
40
+ "file": "STCharacters.ocd2"
41
+ }
42
+ ]
43
+ }
20
44
  }
21
- }]
45
+ ]
22
46
  }
@@ -1,27 +1,46 @@
1
1
  {
2
- "name": "Simplified Chinese to Traditional Chinese (Taiwan standard)",
2
+ "name": "Simplified Chinese to Traditional Chinese (Taiwan Standard)",
3
+ "normalization": [
4
+ { "dict": { "type": "ocd2", "file": "CJK_Compatibility_Ideographs.ocd2" } }
5
+ ],
3
6
  "segmentation": {
4
7
  "type": "mmseg",
5
- "dict": {
6
- "type": "ocd2",
7
- "file": "STPhrases.ocd2"
8
- }
9
- },
10
- "conversion_chain": [{
11
8
  "dict": {
12
9
  "type": "group",
13
- "dicts": [{
14
- "type": "ocd2",
15
- "file": "STPhrases.ocd2"
16
- }, {
17
- "type": "ocd2",
18
- "file": "STCharacters.ocd2"
19
- }]
10
+ "match_policy": "union",
11
+ "dicts": [
12
+ { "type": "ocd2", "file": "STPhrases.ocd2" },
13
+ { "type": "ocd2", "file": "STPhrases_GeneratedFromRegionalPhrases.ocd2" }
14
+ ]
20
15
  }
21
- }, {
22
- "dict": {
23
- "type": "ocd2",
24
- "file": "TWVariants.ocd2"
16
+ },
17
+ "conversion_chain": [
18
+ {
19
+ "dict": {
20
+ "type": "group",
21
+ "match_policy": "short_circuit",
22
+ "dicts": [
23
+ {
24
+ "type": "group",
25
+ "match_policy": "union",
26
+ "dicts": [
27
+ { "type": "ocd2", "file": "STPhrases.ocd2" },
28
+ { "type": "ocd2", "file": "STPhrases_GeneratedFromRegionalPhrases.ocd2" }
29
+ ]
30
+ },
31
+ { "type": "ocd2", "file": "STCharacters.ocd2" }
32
+ ]
33
+ }
34
+ },
35
+ {
36
+ "dict": {
37
+ "type": "group",
38
+ "match_policy": "short_circuit",
39
+ "dicts": [
40
+ { "type": "ocd2", "file": "TWVariantsPhrases.ocd2" },
41
+ { "type": "ocd2", "file": "TWVariants.ocd2" }
42
+ ]
43
+ }
25
44
  }
26
- }]
45
+ ]
27
46
  }