OpenCC 1.2.0__cp38-cp38-manylinux2014_x86_64.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.
Files changed (78) hide show
  1. opencc/__init__.py +49 -0
  2. opencc/clib/__init__.py +0 -0
  3. opencc/clib/bin/opencc +0 -0
  4. opencc/clib/bin/opencc_dict +0 -0
  5. opencc/clib/bin/opencc_phrase_extract +0 -0
  6. opencc/clib/include/opencc/BinaryDict.hpp +53 -0
  7. opencc/clib/include/opencc/Common.hpp +82 -0
  8. opencc/clib/include/opencc/Config.hpp +49 -0
  9. opencc/clib/include/opencc/Conversion.hpp +47 -0
  10. opencc/clib/include/opencc/ConversionChain.hpp +43 -0
  11. opencc/clib/include/opencc/Converter.hpp +51 -0
  12. opencc/clib/include/opencc/DartsDict.hpp +60 -0
  13. opencc/clib/include/opencc/Dict.hpp +92 -0
  14. opencc/clib/include/opencc/DictConverter.hpp +32 -0
  15. opencc/clib/include/opencc/DictEntry.hpp +173 -0
  16. opencc/clib/include/opencc/DictGroup.hpp +57 -0
  17. opencc/clib/include/opencc/Exception.hpp +88 -0
  18. opencc/clib/include/opencc/Export.hpp +40 -0
  19. opencc/clib/include/opencc/Lexicon.hpp +70 -0
  20. opencc/clib/include/opencc/MarisaDict.hpp +63 -0
  21. opencc/clib/include/opencc/MaxMatchSegmentation.hpp +43 -0
  22. opencc/clib/include/opencc/Optional.hpp +76 -0
  23. opencc/clib/include/opencc/PhraseExtract.hpp +195 -0
  24. opencc/clib/include/opencc/Segmentation.hpp +32 -0
  25. opencc/clib/include/opencc/Segments.hpp +118 -0
  26. opencc/clib/include/opencc/SerializableDict.hpp +77 -0
  27. opencc/clib/include/opencc/SerializedValues.hpp +52 -0
  28. opencc/clib/include/opencc/SimpleConverter.hpp +113 -0
  29. opencc/clib/include/opencc/TextDict.hpp +60 -0
  30. opencc/clib/include/opencc/UTF8StringSlice.hpp +246 -0
  31. opencc/clib/include/opencc/UTF8Util.hpp +291 -0
  32. opencc/clib/include/opencc/opencc.h +161 -0
  33. opencc/clib/include/opencc/opencc_config.h +21 -0
  34. opencc/clib/lib/cmake/opencc/OpenCCConfig.cmake +31 -0
  35. opencc/clib/lib/cmake/opencc/OpenCCConfigVersion.cmake +65 -0
  36. opencc/clib/lib/cmake/opencc/OpenCCTargets-release.cmake +29 -0
  37. opencc/clib/lib/cmake/opencc/OpenCCTargets.cmake +110 -0
  38. opencc/clib/lib/libmarisa.a +0 -0
  39. opencc/clib/lib/libopencc.a +0 -0
  40. opencc/clib/lib/pkgconfig/opencc.pc +11 -0
  41. opencc/clib/opencc_clib.cpython-38-x86_64-linux-gnu.so +0 -0
  42. opencc/clib/share/opencc/HKVariants.ocd2 +0 -0
  43. opencc/clib/share/opencc/HKVariantsRev.ocd2 +0 -0
  44. opencc/clib/share/opencc/HKVariantsRevPhrases.ocd2 +0 -0
  45. opencc/clib/share/opencc/JPShinjitaiCharacters.ocd2 +0 -0
  46. opencc/clib/share/opencc/JPShinjitaiPhrases.ocd2 +0 -0
  47. opencc/clib/share/opencc/JPVariants.ocd2 +0 -0
  48. opencc/clib/share/opencc/JPVariantsRev.ocd2 +0 -0
  49. opencc/clib/share/opencc/STCharacters.ocd2 +0 -0
  50. opencc/clib/share/opencc/STPhrases.ocd2 +0 -0
  51. opencc/clib/share/opencc/TSCharacters.ocd2 +0 -0
  52. opencc/clib/share/opencc/TSPhrases.ocd2 +0 -0
  53. opencc/clib/share/opencc/TWPhrases.ocd2 +0 -0
  54. opencc/clib/share/opencc/TWPhrasesRev.ocd2 +0 -0
  55. opencc/clib/share/opencc/TWVariants.ocd2 +0 -0
  56. opencc/clib/share/opencc/TWVariantsRev.ocd2 +0 -0
  57. opencc/clib/share/opencc/TWVariantsRevPhrases.ocd2 +0 -0
  58. opencc/clib/share/opencc/hk2s.json +33 -0
  59. opencc/clib/share/opencc/hk2t.json +22 -0
  60. opencc/clib/share/opencc/jp2t.json +25 -0
  61. opencc/clib/share/opencc/s2hk.json +27 -0
  62. opencc/clib/share/opencc/s2t.json +22 -0
  63. opencc/clib/share/opencc/s2tw.json +27 -0
  64. opencc/clib/share/opencc/s2twp.json +32 -0
  65. opencc/clib/share/opencc/t2hk.json +16 -0
  66. opencc/clib/share/opencc/t2jp.json +16 -0
  67. opencc/clib/share/opencc/t2s.json +22 -0
  68. opencc/clib/share/opencc/t2tw.json +16 -0
  69. opencc/clib/share/opencc/tw2s.json +33 -0
  70. opencc/clib/share/opencc/tw2sp.json +36 -0
  71. opencc/clib/share/opencc/tw2t.json +22 -0
  72. opencc/py.typed +0 -0
  73. opencc-1.2.0.dist-info/AUTHORS +12 -0
  74. opencc-1.2.0.dist-info/LICENSE +56 -0
  75. opencc-1.2.0.dist-info/METADATA +347 -0
  76. opencc-1.2.0.dist-info/RECORD +78 -0
  77. opencc-1.2.0.dist-info/WHEEL +5 -0
  78. opencc-1.2.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,12 @@
1
+ Author:
2
+ Carbo Kuo <byvoid@byvoid.com>
3
+
4
+ Contributors:
5
+ Peng Huang <shawn.p.huang@gmail.com>
6
+ Kefu Chai <tchaikov@gmail.com>
7
+ LI Daobing <lidaobing@gmail.com>
8
+ Asias <asias.hejun@gmail.com>
9
+ Peng Wu <alexepico@gmail.com>
10
+ Xiaojun Ma <damage3025@gmail.com>
11
+ 佛振 <chen.sst@gmail.com>
12
+
@@ -0,0 +1,56 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
10
+
11
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12
+
13
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14
+
15
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16
+
17
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18
+
19
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20
+
21
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
22
+
23
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
24
+
25
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26
+
27
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28
+
29
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
30
+
31
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
32
+
33
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
34
+
35
+ 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
36
+
37
+ 2. You must cause any modified files to carry prominent notices stating that You changed the files; and
38
+
39
+ 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
40
+
41
+ 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
42
+
43
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
+
45
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
+
47
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
+
49
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
+
51
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
+
53
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
+
55
+ END OF TERMS AND CONDITIONS
56
+
@@ -0,0 +1,347 @@
1
+ Metadata-Version: 2.1
2
+ Name: OpenCC
3
+ Version: 1.2.0
4
+ Summary: Conversion between Traditional and Simplified Chinese
5
+ Home-page: https://github.com/BYVoid/OpenCC
6
+ Author: Carbo Kuo, Peng Huang, Kefu Chai, LI Daobing, Asias, Peng Wu, Xiaojun Ma, 佛振
7
+ Author-email: byvoid@byvoid.com, shawn.p.huang@gmail.com, tchaikov@gmail.com, lidaobing@gmail.com, asias.hejun@gmail.com, alexepico@gmail.com, damage3025@gmail.com, chen.sst@gmail.com
8
+ License: Apache License 2.0
9
+ Keywords: opencc,convert,chinese
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: Natural Language :: Chinese (Simplified)
14
+ Classifier: Natural Language :: Chinese (Traditional)
15
+ Classifier: Programming Language :: Python
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: License :: OSI Approved :: Apache Software License
18
+ Classifier: Topic :: Scientific/Engineering
19
+ Classifier: Topic :: Software Development
20
+ Classifier: Topic :: Software Development :: Libraries
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Topic :: Software Development :: Localization
23
+ Classifier: Topic :: Text Processing :: Linguistic
24
+ Classifier: Typing :: Typed
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ License-File: AUTHORS
28
+
29
+ # Open Chinese Convert 開放中文轉換
30
+
31
+ [![CMake](https://github.com/BYVoid/OpenCC/actions/workflows/cmake.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/cmake.yml)
32
+ [![Bazel](https://github.com/BYVoid/OpenCC/actions/workflows/bazel.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/bazel.yml)
33
+ [![MSVC](https://github.com/BYVoid/OpenCC/actions/workflows/msvc.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/msvc.yml)
34
+ [![Node.js CI](https://github.com/BYVoid/OpenCC/actions/workflows/nodejs.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/nodejs.yml)
35
+ [![Python CI](https://github.com/BYVoid/OpenCC/actions/workflows/python.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/python.yml)
36
+ [![AppVeyor](https://img.shields.io/appveyor/ci/Carbo/OpenCC.svg)](https://ci.appveyor.com/project/Carbo/OpenCC)
37
+
38
+ ## Introduction 介紹
39
+
40
+ ![OpenCC](https://opencc.byvoid.com/img/opencc.png)
41
+
42
+ Open Chinese Convert (OpenCC, 開放中文轉換) is an opensource project for conversions between Traditional Chinese, Simplified Chinese and Japanese Kanji (Shinjitai). It supports character-level and phrase-level conversion, character variant conversion and regional idioms among Mainland China, Taiwan and Hong Kong. This is not translation tool between Mandarin and Cantonese, etc.
43
+
44
+ 中文簡繁轉換開源項目,支持詞彙級別的轉換、異體字轉換和地區習慣用詞轉換(中國大陸、臺灣、香港、日本新字體)。不提供普通話與粵語的轉換。
45
+
46
+ Discussion (Telegram): https://t.me/open_chinese_convert
47
+
48
+ ### Features 特點
49
+
50
+ * 嚴格區分「一簡對多繁」和「一簡對多異」。
51
+ * 完全兼容異體字,可以實現動態替換。
52
+ * 嚴格審校一簡對多繁詞條,原則爲「能分則不合」。
53
+ * 支持中國大陸、臺灣、香港異體字和地區習慣用詞轉換,如「裏」「裡」、「鼠標」「滑鼠」。
54
+ * 詞庫和函數庫完全分離,可以自由修改、導入、擴展。
55
+
56
+ ## Installation 安裝
57
+
58
+ ### Package Managers 包管理器
59
+
60
+ * [Debian](https://tracker.debian.org/pkg/opencc)
61
+ * [Ubuntu](https://launchpad.net/ubuntu/+source/opencc)
62
+ * [Fedora](https://packages.fedoraproject.org/pkgs/opencc/opencc/)
63
+ * [Arch Linux](https://archlinux.org/packages/extra/x86_64/opencc/)
64
+ * [macOS](https://formulae.brew.sh/formula/opencc)
65
+ * [Bazel](https://registry.bazel.build/modules/opencc)
66
+ * [Node.js](https://npmjs.org/package/opencc)
67
+ * [Python](https://pypi.org/project/OpenCC/)
68
+
69
+ ### Prebuilt 預編譯
70
+
71
+ * Windows (x86_64): [Latest build](https://ci.appveyor.com/api/projects/Carbo/opencc/artifacts/OpenCC.zip?branch=master&job=Environment:%20nodejs_version=none;%20Platform:%20x64)
72
+ * Windows (x86): [Latest build](https://ci.appveyor.com/api/projects/Carbo/opencc/artifacts/OpenCC.zip?branch=master&job=Environment:%20nodejs_version=none;%20Platform:%20x86)
73
+
74
+ ## Usage 使用
75
+
76
+ ### Online demo 線上轉換展示
77
+
78
+ Warning: **This is NOT an API.** You will be banned if you make calls programmatically.
79
+
80
+ https://opencc.byvoid.com/
81
+
82
+ ### Node.js
83
+
84
+ [npm](https://www.npmjs.com/opencc) `npm install opencc`
85
+
86
+ #### JavaScript
87
+ ```js
88
+ const OpenCC = require('opencc');
89
+ const converter = new OpenCC('s2t.json');
90
+ converter.convertPromise("汉字").then(converted => {
91
+ console.log(converted); // 漢字
92
+ });
93
+ ```
94
+
95
+ #### TypeScript
96
+ ```ts
97
+ import { OpenCC } from 'opencc';
98
+ async function main() {
99
+ const converter: OpenCC = new OpenCC('s2t.json');
100
+ const result: string = await converter.convertPromise('汉字');
101
+ console.log(result);
102
+ }
103
+ ```
104
+
105
+ See [demo.js](https://github.com/BYVoid/OpenCC/blob/master/node/demo.js) and [ts-demo.ts](https://github.com/BYVoid/OpenCC/blob/master/node/ts-demo.ts).
106
+
107
+ ### Python
108
+
109
+ `pip install opencc` (Windows, Linux, macOS)
110
+
111
+ ```python
112
+ import opencc
113
+ converter = opencc.OpenCC('s2t.json')
114
+ converter.convert('汉字') # 漢字
115
+ ```
116
+
117
+ ### C++
118
+
119
+ ```c++
120
+ #include "opencc.h"
121
+
122
+ int main() {
123
+ const opencc::SimpleConverter converter("s2t.json");
124
+ converter.Convert("汉字"); // 漢字
125
+ return 0;
126
+ }
127
+ ```
128
+
129
+ [Full example with Bazel](https://github.com/BYVoid/opencc-bazel-example)
130
+
131
+ ### C
132
+
133
+ ```c
134
+ #include "opencc.h"
135
+
136
+ int main() {
137
+ opencc_t opencc = opencc_open("s2t.json");
138
+ const char* input = "汉字";
139
+ char* converted = opencc_convert_utf8(opencc, input, strlen(input)); // 漢字
140
+ opencc_convert_utf8_free(converted);
141
+ opencc_close(opencc);
142
+ return 0;
143
+ }
144
+
145
+ ```
146
+
147
+ Document 文檔: https://byvoid.github.io/OpenCC/
148
+
149
+ ### Command Line
150
+
151
+ * `opencc --help`
152
+ * `opencc_dict --help`
153
+ * `opencc_phrase_extract --help`
154
+
155
+ ### Others (Unofficial)
156
+
157
+ * Swift (iOS): [SwiftyOpenCC](https://github.com/XQS6LB3A/SwiftyOpenCC)
158
+ * iOSOpenCC (pod): [iOSOpenCC](https://github.com/swiftdo/OpenCC)
159
+ * Java: [opencc4j](https://github.com/houbb/opencc4j)
160
+ * Android: [android-opencc](https://github.com/qichuan/android-opencc)
161
+ * PHP: [opencc4php](https://github.com/nauxliu/opencc4php)
162
+ * Pure JavaScript: [opencc-js](https://github.com/nk2028/opencc-js)
163
+ * WebAssembly:
164
+ * [opencc-wasm](https://www.npmjs.com/package/opencc-wasm) ([website](https://opencc.js.org/))
165
+ * [wasm-opencc](https://github.com/oyyd/wasm-opencc)
166
+ * Browser Extension: [opencc-extension](https://github.com/tnychn/opencc-extension)
167
+ * Go (Pure): [OpenCC for Go](https://github.com/longbridge/opencc)
168
+ * Dart (native-assets): [opencc-dart](https://github.com/lindeer/opencc-dart)
169
+
170
+ ### Configurations 配置文件
171
+
172
+ #### 預設配置文件
173
+
174
+ * `s2t.json` Simplified Chinese to Traditional Chinese 簡體到繁體
175
+ * `t2s.json` Traditional Chinese to Simplified Chinese 繁體到簡體
176
+ * `s2tw.json` Simplified Chinese to Traditional Chinese (Taiwan Standard) 簡體到臺灣正體
177
+ * `tw2s.json` Traditional Chinese (Taiwan Standard) to Simplified Chinese 臺灣正體到簡體
178
+ * `s2hk.json` Simplified Chinese to Traditional Chinese (Hong Kong variant) 簡體到香港繁體
179
+ * `hk2s.json` Traditional Chinese (Hong Kong variant) to Simplified Chinese 香港繁體到簡體
180
+ * `s2twp.json` Simplified Chinese to Traditional Chinese (Taiwan Standard) with Taiwanese idiom 簡體到繁體(臺灣正體標準)並轉換爲臺灣常用詞彙
181
+ * `tw2sp.json` Traditional Chinese (Taiwan Standard) to Simplified Chinese with Mainland Chinese idiom 繁體(臺灣正體標準)到簡體並轉換爲中國大陸常用詞彙
182
+ * `t2tw.json` Traditional Chinese (OpenCC Standard) to Taiwan Standard 繁體(OpenCC 標準)到臺灣正體
183
+ * `hk2t.json` Traditional Chinese (Hong Kong variant) to Traditional Chinese 香港繁體到繁體(OpenCC 標準)
184
+ * `t2hk.json` Traditional Chinese (OpenCC Standard) to Hong Kong variant 繁體(OpenCC 標準)到香港繁體
185
+ * `t2jp.json` Traditional Chinese Characters (Kyūjitai) to New Japanese Kanji (Shinjitai) 繁體(OpenCC 標準,舊字體)到日文新字體
186
+ * `jp2t.json` New Japanese Kanji (Shinjitai) to Traditional Chinese Characters (Kyūjitai) 日文新字體到繁體(OpenCC 標準,舊字體)
187
+ * `tw2t.json` Traditional Chinese (Taiwan standard) to Traditional Chinese 臺灣正體到繁體(OpenCC 標準)
188
+
189
+ ## Build 編譯
190
+
191
+ ### Build with CMake
192
+
193
+ #### Linux & macOS
194
+
195
+ g++ 4.6+ or clang 3.2+ is required.
196
+
197
+ ```bash
198
+ make
199
+ ```
200
+
201
+ #### Windows Visual Studio:
202
+
203
+ ```bash
204
+ build.cmd
205
+ ```
206
+
207
+ ### Build with Bazel
208
+
209
+ ```bash
210
+ bazel build //:opencc
211
+ ```
212
+
213
+ ### Test 測試
214
+
215
+ #### Linux & macOS
216
+
217
+ ```
218
+ make test
219
+ ```
220
+
221
+ #### Windows Visual Studio:
222
+
223
+ ```bash
224
+ test.cmd
225
+ ```
226
+
227
+ #### Test with Bazel
228
+
229
+ ```bash
230
+ bazel test --test_output=all //src/... //data/... //python/... //test/...
231
+ ```
232
+
233
+ ### Benchmark 基準測試
234
+
235
+ ```
236
+ make benchmark
237
+ ```
238
+
239
+ Example results (from Github CI):
240
+
241
+ ```
242
+ 1: ------------------------------------------------------------------
243
+ 1: Benchmark Time CPU Iterations
244
+ 1: ------------------------------------------------------------------
245
+ 1: BM_Initialization/hk2s 1.56 ms 1.56 ms 442
246
+ 1: BM_Initialization/hk2t 0.144 ms 0.144 ms 4878
247
+ 1: BM_Initialization/jp2t 0.260 ms 0.260 ms 2604
248
+ 1: BM_Initialization/s2hk 23.8 ms 23.8 ms 29
249
+ 1: BM_Initialization/s2t 25.6 ms 25.6 ms 28
250
+ 1: BM_Initialization/s2tw 24.0 ms 23.9 ms 30
251
+ 1: BM_Initialization/s2twp 24.6 ms 24.6 ms 28
252
+ 1: BM_Initialization/t2hk 0.052 ms 0.052 ms 12897
253
+ 1: BM_Initialization/t2jp 0.141 ms 0.141 ms 5012
254
+ 1: BM_Initialization/t2s 1.30 ms 1.30 ms 540
255
+ 1: BM_Initialization/tw2s 1.39 ms 1.39 ms 529
256
+ 1: BM_Initialization/tw2sp 1.69 ms 1.69 ms 426
257
+ 1: BM_Initialization/tw2t 0.089 ms 0.089 ms 7707
258
+ 1: BM_Convert2M 582 ms 582 ms 1
259
+ 1: BM_Convert/100 1.07 ms 1.07 ms 636
260
+ 1: BM_Convert/1000 11.0 ms 11.0 ms 67
261
+ 1: BM_Convert/10000 113 ms 113 ms 6
262
+ 1: BM_Convert/100000 1176 ms 1176 ms 1
263
+ ```
264
+
265
+ ## Projects using OpenCC 使用 OpenCC 的項目
266
+
267
+ Please update if your project is using OpenCC.
268
+
269
+ * [ibus-pinyin](https://github.com/ibus/ibus-pinyin)
270
+ * [fcitx](https://github.com/fcitx/fcitx)
271
+ * [rimeime](https://rime.im/)
272
+ * [libgooglepinyin](http://code.google.com/p/libgooglepinyin/)
273
+ * [ibus-libpinyin](https://github.com/libpinyin/ibus-libpinyin)
274
+ * [alfred-chinese-converter](https://github.com/amowu/alfred-chinese-converter)
275
+ * [GoldenDict](https://github.com/goldendict/goldendict)
276
+ * [China Biographical Database Project (CBDB)](https://cbdb.hsites.harvard.edu/)
277
+
278
+ ## License 許可協議
279
+
280
+ Apache License 2.0
281
+
282
+ ## Third Party Library 第三方庫
283
+
284
+ * [darts-clone](https://github.com/s-yata/darts-clone) BSD License
285
+ * [marisa-trie](https://github.com/s-yata/marisa-trie) BSD License
286
+ * [tclap](http://tclap.sourceforge.net/) MIT License
287
+ * [rapidjson](https://github.com/Tencent/rapidjson) MIT License
288
+ * [Google Test](https://github.com/google/googletest) BSD License
289
+
290
+ All these libraries are statically linked by default.
291
+
292
+ ## Change History 版本歷史
293
+
294
+ * [NEWS](https://github.com/BYVoid/OpenCC/blob/master/NEWS.md)
295
+
296
+ ### Links 相關鏈接
297
+
298
+ * Introduction 詳細介紹 https://github.com/BYVoid/OpenCC/wiki/%E7%B7%A3%E7%94%B1
299
+ * 現代漢語常用簡繁一對多字義辨析表 http://ytenx.org/byohlyuk/KienxPyan
300
+
301
+ ## Contributors 貢獻者
302
+
303
+ * [BYVoid](http://www.byvoid.com/)
304
+ * [佛振](https://github.com/lotem)
305
+ * [Peng Huang](https://github.com/phuang)
306
+ * [LI Daobing](https://github.com/lidaobing)
307
+ * [Kefu Chai](https://github.com/tchaikov)
308
+ * [Kan-Ru Chen](http://kanru.info/)
309
+ * [Ma Xiaojun](https://twitter.com/damage3025)
310
+ * [Jiang Jiang](http://jjgod.org/)
311
+ * [Ruey-Cheng Chen](https://github.com/rueycheng)
312
+ * [Paul Meng](http://home.mno2.org/)
313
+ * [Lawrence Lau](https://github.com/ktslwy)
314
+ * [瑾昀](https://github.com/kunki)
315
+ * [內木一郎](https://github.com/SyaoranHinata)
316
+ * [Marguerite Su](https://www.marguerite.su/)
317
+ * [Brian White](http://mscdex.net)
318
+ * [Qijiang Fan](https://fqj.me/)
319
+ * [LEOYoon-Tsaw](https://github.com/LEOYoon-Tsaw)
320
+ * [Steven Yao](https://github.com/stevenyao)
321
+ * [Pellaeon Lin](https://github.com/pellaeon)
322
+ * [stony](https://github.com/stony-shixz)
323
+ * [steelywing](https://github.com/steelywing)
324
+ * [吕旭东](https://github.com/lvxudong)
325
+ * [Weng Xuetian](https://github.com/wengxt)
326
+ * [Ma Tao](https://github.com/iwater)
327
+ * [Heinz Wiesinger](https://github.com/pprkut)
328
+ * [J.W](https://github.com/jakwings)
329
+ * [Amo Wu](https://github.com/amowu)
330
+ * [Mark Tsai](https://github.com/mxgit1090)
331
+ * [Zhe Wang](https://github.com/0x1997)
332
+ * [sgqy](https://github.com/sgqy)
333
+ * [Qichuan (Sean) ZHANG](https://github.com/qichuan)
334
+ * [Flandre Scarlet](https://github.com/XadillaX)
335
+ * [宋辰文](https://github.com/songchenwen)
336
+ * [iwater](https://github.com/iwater)
337
+ * [Xpol Wan](https://github.com/xpol)
338
+ * [Weihang Lo](https://github.com/weihanglo)
339
+ * [Cychih](https://github.com/pi314)
340
+ * [kyleskimo](https://github.com/kyleskimo)
341
+ * [Ryuan Choi](https://github.com/bunhere)
342
+ * [Prcuvu](https://github.com/Prcuvu)
343
+ * [Tony Able](https://github.com/TonyAble)
344
+ * [Xiao Liang](https://github.com/yxliang01)
345
+ * [Frank Lin](https://github.com/frankslin)
346
+
347
+ Please feel free to update this list if you have contributed OpenCC.
@@ -0,0 +1,78 @@
1
+ opencc/__init__.py,sha256=b7a4FYN7XbGfui8qKReL6FZKQwnIzEOzCEym2Ry-HiE,1550
2
+ opencc/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ opencc/clib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ opencc/clib/opencc_clib.cpython-38-x86_64-linux-gnu.so,sha256=nTrkaydOnolS66D6kuSmf5zDvZ7csC0L44To8NmcIWM,550696
5
+ opencc/clib/bin/opencc,sha256=P8ImjZJxqxfy4CJ8k91t_8QfwP3byVheCtBSaMXcgDA,540896
6
+ opencc/clib/bin/opencc_dict,sha256=-8Fn3fDEdC3lBOFtJootiFdzm2UkEWhGlvaCFl0CB8Y,440064
7
+ opencc/clib/bin/opencc_phrase_extract,sha256=bw_G4BvUj1SX_XmD8VpWxZUZEug8vbQnCqsKC6000Zo,382128
8
+ opencc/clib/include/opencc/BinaryDict.hpp,sha256=cVpxjRDKKG_aZD3LsK7x1Zdk_Gni3gPL5fGveoTThrg,1540
9
+ opencc/clib/include/opencc/Common.hpp,sha256=urh8q4anmo3x977BEzGcTZgaT9uffoFmhIPK-jbp0Yo,2319
10
+ opencc/clib/include/opencc/Config.hpp,sha256=gjVOuXQvJY-utgnFHbk1Q-VJKcVUP8NKEWGT_vKW9jY,1359
11
+ opencc/clib/include/opencc/Conversion.hpp,sha256=ktU1AYJRlfKaF5j1MlKHAKFbO56YFfZzIMYU5Bh-XFw,1228
12
+ opencc/clib/include/opencc/ConversionChain.hpp,sha256=xvR6WGpRYBTwPG7Pfux1RHN0CqBV0V1U3zpXv2EQxLc,1199
13
+ opencc/clib/include/opencc/Converter.hpp,sha256=dvfhosMuGokvUvhEJm1wL3CfwJhbvjCTEPejWPaFIII,1483
14
+ opencc/clib/include/opencc/DartsDict.hpp,sha256=dB-8SVn-KQybzWk3XzYR6vdsEx9GToIOTFHSW578apE,1554
15
+ opencc/clib/include/opencc/Dict.hpp,sha256=FN8cEHyLbuD3LkmSFFzUSt3JeQfd6cX_BXBXbeuiz0Y,2829
16
+ opencc/clib/include/opencc/DictConverter.hpp,sha256=6VNauW79cWujRYNNvotmyNTajQmafsABTrqgKOP9xAE,1089
17
+ opencc/clib/include/opencc/DictEntry.hpp,sha256=a1Jo99lrRWvlQ_1X3o2VnKf9iCkGzttaSMnpgzJGHE0,4527
18
+ opencc/clib/include/opencc/DictGroup.hpp,sha256=_hj64RHF9LA-ZmdPGC9vnUfj43a4ld7ijEYNdfCJaGw,1591
19
+ opencc/clib/include/opencc/Exception.hpp,sha256=w21BZUsw2it_BP7tR7VGEB9sE8FMk0_bTyu_1mNhvIc,2348
20
+ opencc/clib/include/opencc/Export.hpp,sha256=Cc2hzIhyBEJhPPkiStFUEUtzskPgE6oR9iztpBFnRrg,1280
21
+ opencc/clib/include/opencc/Lexicon.hpp,sha256=OMNHWt-22-Mnc0eFkNKPx73NOHyCo7Boqh-uev0uMKw,1959
22
+ opencc/clib/include/opencc/MarisaDict.hpp,sha256=7RES6je3oDoGTpEIgdKLpwcg1Pot25QnnAM9K8z9v3k,1725
23
+ opencc/clib/include/opencc/MaxMatchSegmentation.hpp,sha256=_LO3Qkzrby7bAwI579MkHd0ZMxkmdXk4QYvXZDm8MjE,1181
24
+ opencc/clib/include/opencc/Optional.hpp,sha256=0YcXdlVh-WgfLhwTL06HVBHc3OtWot4F3K6hocOD1AI,1696
25
+ opencc/clib/include/opencc/PhraseExtract.hpp,sha256=peDfCZz6x_iQxVhsjbsNgxgBhTibs4hQoqwY5uf-hcE,5373
26
+ opencc/clib/include/opencc/Segmentation.hpp,sha256=Seqp7fV5wZcSavEbTAGlR-gOasJLE3EwZQ16kxYjaII,897
27
+ opencc/clib/include/opencc/Segments.hpp,sha256=fe4JL_BJphUVZqWx_fERD0btKgu97En9Gnos4x9efxE,2959
28
+ opencc/clib/include/opencc/SerializableDict.hpp,sha256=EmZ8unEUSLAydCuRmx03BGnziBr9HsiSJ5xJMY-JGns,2097
29
+ opencc/clib/include/opencc/SerializedValues.hpp,sha256=Gr2QIH1-GIWNWN-STxuEt8BLuS3jUKYRWKKsXYby74g,1447
30
+ opencc/clib/include/opencc/SimpleConverter.hpp,sha256=W0u9xWQlXDozmTTajtB6o-ryxcq_83JhH6n0Y_BaCLc,3377
31
+ opencc/clib/include/opencc/TextDict.hpp,sha256=c41MXrVU43vSNIGWQDQEaQh0gvOTGLBWJMBd0vCPwtc,1517
32
+ opencc/clib/include/opencc/UTF8StringSlice.hpp,sha256=icJPm3w326YPmsAKCXbLNj6pgutRfG-NFPkqu_f5DQ4,7077
33
+ opencc/clib/include/opencc/UTF8Util.hpp,sha256=HBV0WhQPwwO53pFgBtdXbLUMKDbCdwPLyWMq26OMI4w,7456
34
+ opencc/clib/include/opencc/opencc.h,sha256=nxQhNUk8iPmSwFij8Ef0eZyhIoG-56Bl0H7VxNrBSRk,4592
35
+ opencc/clib/include/opencc/opencc_config.h,sha256=wow9Zg_0SQWQXhpM_2UTbWjv_bF6n1kStOMGtYXMFmE,684
36
+ opencc/clib/lib/libmarisa.a,sha256=I9RWDykEpViNJxP9ZIU2HjjFElpsBpetmxwwh7v07qA,327050
37
+ opencc/clib/lib/libopencc.a,sha256=zjrHprWOhpN3BdV1SJM1uPAVvK5bHSESyYflwyWPGmM,997076
38
+ opencc/clib/lib/cmake/opencc/OpenCCConfig.cmake,sha256=455q2TWy1QOGMGIbkhXMx3LJR_1MuxAUPVfLLUbTJko,1042
39
+ opencc/clib/lib/cmake/opencc/OpenCCConfigVersion.cmake,sha256=Wd2gG91qG4pilBx5UI9s0Ya7-iPNgsKzH6K4o51Flw0,2762
40
+ opencc/clib/lib/cmake/opencc/OpenCCTargets-release.cmake,sha256=7iG46_yz6tLV0Urf6iacCDDSFmyZGP1fcCE1XHqz3qQ,1308
41
+ opencc/clib/lib/cmake/opencc/OpenCCTargets.cmake,sha256=iXnW7zNHlGJ65qnxPLp4_hM_5DOR68mSrI5uCxeSUEU,4341
42
+ opencc/clib/lib/pkgconfig/opencc.pc,sha256=XNAd7dHQoRPh3DcqUmIa-IfMJG8IWZ8e7xawE0vwKxc,368
43
+ opencc/clib/share/opencc/HKVariants.ocd2,sha256=YnUMt57vGKQHAwsFvUq-DhAr7CJU0EstIxB5L0RRkyE,4893
44
+ opencc/clib/share/opencc/HKVariantsRev.ocd2,sha256=h9RINWWGDclupa8m8HFoZJZsRgDMA9Xd5zuUh9gmAho,4923
45
+ opencc/clib/share/opencc/HKVariantsRevPhrases.ocd2,sha256=D9m8H56SUCJLBzfjIKhQ_GMPN7fEdaHcsQgUFq3hPvo,7030
46
+ opencc/clib/share/opencc/JPShinjitaiCharacters.ocd2,sha256=lw0f9URg7U7zwOfat80XbJF97Qqu70KZ533jLZSZWRQ,4263
47
+ opencc/clib/share/opencc/JPShinjitaiPhrases.ocd2,sha256=49BrYoJxMneX-ldSin7viDD0ofFT4cWliPidd4Mfclk,7462
48
+ opencc/clib/share/opencc/JPVariants.ocd2,sha256=RF0trOi04g2N8Tca67rD6k6ncTvbXLdlrbzs6p7L5-w,8023
49
+ opencc/clib/share/opencc/JPVariantsRev.ocd2,sha256=l0zu4Maj_TndDS22UD3mYaLE3pladlPa5WPrANweZr4,8023
50
+ opencc/clib/share/opencc/STCharacters.ocd2,sha256=HsIpgxDKWpFRpVTqV72Gpils6RfkzdHdCIT3icR3ZBs,45310
51
+ opencc/clib/share/opencc/STPhrases.ocd2,sha256=r5vQd5KPvdA_zIWC2shes55LlAHCsDcLvCWENfgjlCE,927308
52
+ opencc/clib/share/opencc/TSCharacters.ocd2,sha256=hSkeAXPpcrvKWMhI-5Czu0HHlnTLYadWReAb2IStWSc,46126
53
+ opencc/clib/share/opencc/TSPhrases.ocd2,sha256=7qaeUl4BuEdaGxrUX3jyXlqniYYwXxhe9vheEfUyU4c,9782
54
+ opencc/clib/share/opencc/TWPhrases.ocd2,sha256=cywmV4m9H06R_NAQf3w8Er9W564PgH8oT0aG8z1RBzM,15828
55
+ opencc/clib/share/opencc/TWPhrasesRev.ocd2,sha256=AY0_l1BfNY75QUxK_tXeJTT7yW1E4pHF3lJJNrBJtXQ,15865
56
+ opencc/clib/share/opencc/TWVariants.ocd2,sha256=OQ8HoYZ61WqmCnryO25LOsyW6kjYk8Bu3j3_scV2wrw,4595
57
+ opencc/clib/share/opencc/TWVariantsRev.ocd2,sha256=ZjRxOYx5QA20SF316StwmsF0xeOT9P4OPVsCA0Ak1gk,4627
58
+ opencc/clib/share/opencc/TWVariantsRevPhrases.ocd2,sha256=6lHd4-Rf2vk0lHOuGbNWf-XaWbAa7_L06erlDJuvLCQ,5333
59
+ opencc/clib/share/opencc/hk2s.json,sha256=62UUSNi1NtYTHlPiVOjKLBWMnO1Q_VXuiKduYG3TLvo,644
60
+ opencc/clib/share/opencc/hk2t.json,sha256=Hl31OBXUKp_1ocYzOzmHwHLieic3bTPxhk3HswJ1G7E,451
61
+ opencc/clib/share/opencc/jp2t.json,sha256=P5sJFSC6DVXs_m_KcZpnK7JpGx65sMCkOkqkMmsV_Z4,540
62
+ opencc/clib/share/opencc/s2hk.json,sha256=NwjnVuoBeD6c9rPM5SdYCBCz1Tm4x_zDWU3RUXqgW_8,507
63
+ opencc/clib/share/opencc/s2t.json,sha256=cQu5cOQG2cCj3TPGCSSGhs8cVXjQZLe3_InnD7uep10,406
64
+ opencc/clib/share/opencc/s2tw.json,sha256=Z84fWqPWsh67UjCEtA5m-AvsJ7stxrVA1E2sLif3GU4,505
65
+ opencc/clib/share/opencc/s2twp.json,sha256=ctGHV0UQVCvmCMhi1TWdKUgO5h8TcILfigbXT3vPx5w,599
66
+ opencc/clib/share/opencc/t2hk.json,sha256=qFMb63Qw_hr-0ClKiTr1Kce3_SrUFWe12sy4OZyO8vA,304
67
+ opencc/clib/share/opencc/t2jp.json,sha256=T7IkKdYxc3Ff7DBSQRHsFBwFd7ZsnwkFE-qLrEdBrXc,318
68
+ opencc/clib/share/opencc/t2s.json,sha256=uBhTQZTyfC2V8BAB7bCl7Em5BQEZiSyzCgUEuyAswHw,406
69
+ opencc/clib/share/opencc/t2tw.json,sha256=EUlb8UTNkyqVaIEIIqWvD7ui25wuBqK7KHFYNCP6wko,302
70
+ opencc/clib/share/opencc/tw2s.json,sha256=_T51hpGofJJG0IFhICHH-Rhs56voRc1O_z5zJsMAQ00,642
71
+ opencc/clib/share/opencc/tw2sp.json,sha256=0QeDeBfncEzsg6n_e4dsKJ6wrnUnIseQyb-WdQnJ6qY,728
72
+ opencc/clib/share/opencc/tw2t.json,sha256=BG-98Ik4jRHVHlrEFeglZP9xtumt0AjM50iOhF15jFc,449
73
+ opencc-1.2.0.dist-info/AUTHORS,sha256=yzTiUvqZRnm8v8g1VYHoIc7aRL2FeHXiz-FbfsTuwAY,277
74
+ opencc-1.2.0.dist-info/LICENSE,sha256=tTTkZZSVWO7CWXsE9QkrXhYSNqaN-_0E1UdZKsOWQwg,9165
75
+ opencc-1.2.0.dist-info/METADATA,sha256=pNbDlk-v-2AkYjjAjMngXjeBDyHN3_Uqe-dcvEHJWHc,13639
76
+ opencc-1.2.0.dist-info/WHEEL,sha256=MtmmbeBGvArFqDaUnJbXKwLXAyAXvR7oh70l2yjkkFQ,110
77
+ opencc-1.2.0.dist-info/top_level.txt,sha256=Ow1HjEUUXf8-aMi4udPf1zHiPrkbN-YSELa3tBWyFcE,7
78
+ opencc-1.2.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (75.3.3)
3
+ Root-Is-Purelib: false
4
+ Tag: cp38-cp38-manylinux2014_x86_64
5
+
@@ -0,0 +1 @@
1
+ opencc