opencc-data 1.3.2.dev20260628__py3-none-any.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 (45) hide show
  1. opencc_data/__init__.py +29 -0
  2. opencc_data/data/CJK_Compatibility_Ideographs.txt +1007 -0
  3. opencc_data/data/HKPhrases.txt +43 -0
  4. opencc_data/data/HKPhrasesRev.txt +40 -0
  5. opencc_data/data/HKVariants.txt +71 -0
  6. opencc_data/data/HKVariantsPhrases.txt +277 -0
  7. opencc_data/data/HKVariantsRev.txt +79 -0
  8. opencc_data/data/HKVariantsRevPhrases.txt +312 -0
  9. opencc_data/data/JPShinjitaiCharacters.txt +397 -0
  10. opencc_data/data/JPShinjitaiCharactersRev.txt +465 -0
  11. opencc_data/data/JPShinjitaiPhrases.txt +240 -0
  12. opencc_data/data/STCharacters.txt +4016 -0
  13. opencc_data/data/STPhrases.txt +49141 -0
  14. opencc_data/data/STPhrases_GeneratedFromRegionalPhrases.txt +512 -0
  15. opencc_data/data/TSCharacters.txt +4149 -0
  16. opencc_data/data/TSCharactersExt.txt +899 -0
  17. opencc_data/data/TSPhrases.txt +474 -0
  18. opencc_data/data/TWPhrases.txt +780 -0
  19. opencc_data/data/TWPhrasesRev.txt +774 -0
  20. opencc_data/data/TWVariants.txt +43 -0
  21. opencc_data/data/TWVariantsPhrases.txt +9 -0
  22. opencc_data/data/TWVariantsRev.txt +43 -0
  23. opencc_data/data/TWVariantsRevPhrases.txt +1009 -0
  24. opencc_data/data/config/hk2s.json +57 -0
  25. opencc_data/data/config/hk2sp.json +61 -0
  26. opencc_data/data/config/hk2t.json +36 -0
  27. opencc_data/data/config/jp2t.json +36 -0
  28. opencc_data/data/config/s2hk.json +72 -0
  29. opencc_data/data/config/s2hkp.json +76 -0
  30. opencc_data/data/config/s2t.json +56 -0
  31. opencc_data/data/config/s2tw.json +72 -0
  32. opencc_data/data/config/s2twp.json +76 -0
  33. opencc_data/data/config/t2hk.json +46 -0
  34. opencc_data/data/config/t2jp.json +19 -0
  35. opencc_data/data/config/t2s.json +41 -0
  36. opencc_data/data/config/t2tw.json +46 -0
  37. opencc_data/data/config/tw2s.json +57 -0
  38. opencc_data/data/config/tw2sp.json +61 -0
  39. opencc_data/data/config/tw2t.json +36 -0
  40. opencc_data/test_data/testcases.json +1591 -0
  41. opencc_data-1.3.2.dev20260628.dist-info/METADATA +65 -0
  42. opencc_data-1.3.2.dev20260628.dist-info/RECORD +45 -0
  43. opencc_data-1.3.2.dev20260628.dist-info/WHEEL +5 -0
  44. opencc_data-1.3.2.dev20260628.dist-info/licenses/LICENSE +56 -0
  45. opencc_data-1.3.2.dev20260628.dist-info/top_level.txt +1 -0
@@ -0,0 +1,65 @@
1
+ Metadata-Version: 2.4
2
+ Name: opencc-data
3
+ Version: 1.3.2.dev20260628
4
+ Summary: OpenCC dictionary data, configs, and test data
5
+ Home-page: https://github.com/nk2028/opencc-data
6
+ Author: The Ngiox Khyen 2028 Project
7
+ License: Apache-2.0
8
+ Project-URL: Homepage, https://github.com/nk2028/opencc-data
9
+ Project-URL: Bug Tracker, https://github.com/nk2028/opencc-data/issues
10
+ Project-URL: Source, https://github.com/nk2028/opencc-data
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Natural Language :: Chinese (Simplified)
14
+ Classifier: Natural Language :: Chinese (Traditional)
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Topic :: Text Processing :: Linguistic
18
+ Requires-Python: >=3.9
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Dynamic: author
22
+ Dynamic: classifier
23
+ Dynamic: description
24
+ Dynamic: description-content-type
25
+ Dynamic: home-page
26
+ Dynamic: license
27
+ Dynamic: license-file
28
+ Dynamic: project-url
29
+ Dynamic: requires-python
30
+ Dynamic: summary
31
+
32
+ # opencc-data [![](https://badge.fury.io/js/opencc-data.svg)](https://www.npmjs.com/package/opencc-data) [![JSDelivr badge](https://data.jsdelivr.com/v1/package/npm/opencc-data/badge)](https://www.jsdelivr.com/package/npm/opencc-data)
33
+
34
+ [繁體中文](README.zh-TW.md)
35
+
36
+ A collection of dictionary data, configs, and test data for Simplified and Traditional Chinese conversions from the [OpenCC](https://github.com/BYVoid/OpenCC) project.
37
+
38
+ ## Compatibility
39
+
40
+ This package is intended for [opencc-js](https://github.com/nk2028/opencc-js) and other OpenCC-compatible implementations that consume OpenCC dictionary and config data.
41
+
42
+ - **Strict Version Matching**: Compatibility is only guaranteed when the version of `opencc-data` strictly matches the version of the consumer package.
43
+ - **Breaking Changes**: We do not guarantee compatibility between different versions of `opencc-data`. Structure or file names may change to align with upstream OpenCC updates.
44
+
45
+ ## Data Sync Policy
46
+
47
+ This package syncs dictionary `.txt` files and config `.json` files from OpenCC's generated resource zip, plus `test/testcases/testcases.json` from the upstream repository. Each sync keeps the upstream resource manifest as an internal baseline so future updates can detect substantive data changes by resource hash.
48
+
49
+ ## Usage
50
+
51
+ Use the config files shipped in `data/config/` as the source of truth for dictionary order and conversion-chain behavior. Config contents can change between OpenCC versions, so consumers should load the matching config file for the package version they depend on instead of hard-coding dictionary lists from this README.
52
+
53
+ Dictionary text files are shipped in `data/`. Config files reference those dictionaries by file name and preserve OpenCC's stage/group ordering semantics.
54
+
55
+ Python consumers can install the `opencc-data` package from PyPI and use the `opencc_data` module to locate packaged resources:
56
+
57
+ ```python
58
+ import opencc_data
59
+
60
+ config_file = opencc_data.config_path("s2t.json")
61
+ dictionary_file = opencc_data.data_path("STCharacters.txt")
62
+ testcases_file = opencc_data.test_data_path("testcases.json")
63
+ ```
64
+
65
+ Release versions match across npm and PyPI, such as `1.3.2`. For `next` prereleases, PyPI uses the PEP 440 equivalent of the npm version: `1.3.2-next.20260628` is published to PyPI as `1.3.2.dev20260628`.
@@ -0,0 +1,45 @@
1
+ opencc_data/__init__.py,sha256=R47_P72vLz3msKN9FbebIkThfEhez_VYn-NfGF_3GT8,869
2
+ opencc_data/data/CJK_Compatibility_Ideographs.txt,sha256=Rdix3_eskTv6JJQJ63lDfiaYR765rRA9-6jSD3YHNJU,8834
3
+ opencc_data/data/HKPhrases.txt,sha256=ihk2hrGF44vDJ__ewYLaVTKkWhPjsLFFiyZAR3V8bb0,1144
4
+ opencc_data/data/HKPhrasesRev.txt,sha256=ysmqT2_ZnPVpAtMvcKNyVXbcLvCPbBC7MM65iqcyjeg,1096
5
+ opencc_data/data/HKVariants.txt,sha256=9h2P3ySIv0H-jzbbT9kJBuUsVbvxwQ-jRtD-yGNhuLQ,718
6
+ opencc_data/data/HKVariantsPhrases.txt,sha256=xwWs14E0WlzjxrCcRzpqdAdO4eAJa2P0l5GT3vWzlkg,6487
7
+ opencc_data/data/HKVariantsRev.txt,sha256=o4Kqoh3qLKZB0vytTU_M8tAIVjRwVn9DbY5ZUWRFu6c,786
8
+ opencc_data/data/HKVariantsRevPhrases.txt,sha256=gtuJ0N3kIXplAmZ_zof03GRctBvI_jk_bewHXW4qqhY,6177
9
+ opencc_data/data/JPShinjitaiCharacters.txt,sha256=aqMhlG-gOqZUdPWAt3YoZxXoK4LrySmC39SBGs-HR_I,3565
10
+ opencc_data/data/JPShinjitaiCharactersRev.txt,sha256=1g0KlxjEp_LmLowEMPKxrGmvZFS38jAHCRgGAU4jqwE,3884
11
+ opencc_data/data/JPShinjitaiPhrases.txt,sha256=XHcyUTVD0SBppygweoDA-9UI2PbVQTl80ypdp7ijRdY,3728
12
+ opencc_data/data/STCharacters.txt,sha256=Wm0XSwlOOHvHkx5yOfFSjNCdCrQni087ZNt2zuzzMi4,34919
13
+ opencc_data/data/STPhrases.txt,sha256=kUG0JM3MbYVK9pR8w8znhIapTeUb7tEFOn46BZwGndo,1004476
14
+ opencc_data/data/STPhrases_GeneratedFromRegionalPhrases.txt,sha256=CprLNCA8iiDyYS8RYfNSQXx-t3U-KXyVZN9JeZk-8_U,13550
15
+ opencc_data/data/TSCharacters.txt,sha256=O7RxIgMrZYsExEr2GXjTnI8YdyedbQ2nmm5zwOwWris,39070
16
+ opencc_data/data/TSCharactersExt.txt,sha256=bgQPKdq8-HEmRCmyKTlYHPCwGFVUj8j26mfQs_ax8uI,8521
17
+ opencc_data/data/TSPhrases.txt,sha256=wCJxZdPVDZ4J4tXPwtwNWm9ZONbIndWeBfAL_vOt0ps,8506
18
+ opencc_data/data/TWPhrases.txt,sha256=SzEVfz2rhaBe_lwqvYCTMhYL_wws7L_4hi1tRw0BtLg,17658
19
+ opencc_data/data/TWPhrasesRev.txt,sha256=Px1oMg64qv2Uc7QZVWSZiU9ZNYymWsaPcFiEYUY2aSI,17490
20
+ opencc_data/data/TWVariants.txt,sha256=7paWixVSQzviv81SegnGdLhT5dG1r3bycDsoNfyADvw,450
21
+ opencc_data/data/TWVariantsPhrases.txt,sha256=ebGYxTjItMlwfHGICB9QNCOLa38ZKtdqGUf_6e-55v4,257
22
+ opencc_data/data/TWVariantsRev.txt,sha256=ghp57MH9Qg0-MJfQmAmM5TmuRZXIqL2Rm7yMiRMBsHg,486
23
+ opencc_data/data/TWVariantsRevPhrases.txt,sha256=zK0GzFrfYvl-zRQwsCXXtc8lI5oH63MXa7yMmZQ3sqI,20303
24
+ opencc_data/data/config/hk2s.json,sha256=lAtHj-1AP_LQw-mM5_v5p2I0GKwYoPq8PBE9IymuX1k,1129
25
+ opencc_data/data/config/hk2sp.json,sha256=lq9AZXSZg7GuwFgXwB7Abj3vYZwmEetV8BPiHqphybc,1236
26
+ opencc_data/data/config/hk2t.json,sha256=A7IRBM6yJ1RauFmMMPBV9sh2g2t9A5T34ar-jbe-wDc,715
27
+ opencc_data/data/config/jp2t.json,sha256=i_Y-UoZWZBAJHJtdeLWhNhjvk7e-w1lhSzyr6lJ3WrE,703
28
+ opencc_data/data/config/s2hk.json,sha256=_2lA-OL7-3ay_sb9_SL6sOZjuFiAFSQ10vwYWT1OIl8,1485
29
+ opencc_data/data/config/s2hkp.json,sha256=a0HrTTcTbeqRQnhjq8Cgf_1iv9Db1_6EvicLHjgTmcQ,1588
30
+ opencc_data/data/config/s2t.json,sha256=W3WtAkXGduUcuhBX9J6kDOaJbs1PZjpjUOL_2nceiP8,1165
31
+ opencc_data/data/config/s2tw.json,sha256=ijsl2-Fs8PvuBL6g5fW1n8Hm4fRnf-GP-0Bw2Dr8UD4,1483
32
+ opencc_data/data/config/s2twp.json,sha256=ZZL1SM4JcAAbmqm3h_5-yS1P96ySeTJwVQAxBt9x7B0,1593
33
+ opencc_data/data/config/t2hk.json,sha256=IYLwUO-t0sAk_7gsHcM9eooS1CubRgNpK806S2OebPU,903
34
+ opencc_data/data/config/t2jp.json,sha256=-h9DpRtpxxan5evnyqYnIkUkzqQ2UxdpRCDNgZDxEe0,354
35
+ opencc_data/data/config/t2s.json,sha256=guNoNniddyab0l8MtnqQ4VfuPQOGSYu4rmuhacCrOcw,803
36
+ opencc_data/data/config/t2tw.json,sha256=w11vxtZBAkGxbyJbIUMojmg1Kb9OuwAk0p6aHu38dIU,901
37
+ opencc_data/data/config/tw2s.json,sha256=DaHaR-sROqTjlv6si_IV7meERZR2QKagA9wKeZYRiXw,1127
38
+ opencc_data/data/config/tw2sp.json,sha256=D78_3WeU060dtZQK14rOEMtwL-ebNZRY1q9zBevoj2g,1244
39
+ opencc_data/data/config/tw2t.json,sha256=ZBqoVQ9Po2Dsl07g4-m4o7cLvIldg-Xeplbcj69QQjE,713
40
+ opencc_data/test_data/testcases.json,sha256=ddKpodl7PidhpRax_a1_gcFj-Hm8bGUtZut6da_jSgU,71180
41
+ opencc_data-1.3.2.dev20260628.dist-info/licenses/LICENSE,sha256=tTTkZZSVWO7CWXsE9QkrXhYSNqaN-_0E1UdZKsOWQwg,9165
42
+ opencc_data-1.3.2.dev20260628.dist-info/METADATA,sha256=-u1NjpPWU989Tn9rMjloXlZXnC0UFjdfvQ_Z9NCXybA,3391
43
+ opencc_data-1.3.2.dev20260628.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
44
+ opencc_data-1.3.2.dev20260628.dist-info/top_level.txt,sha256=MAMUhX4qVRD8NcmVOHY2KBwaB8o3m-irAE0HMp3FqBk,12
45
+ opencc_data-1.3.2.dev20260628.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -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 @@
1
+ opencc_data