OpenCC dictionary data, configs, and test data
Project description
opencc-data

A collection of dictionary data, configs, and test data for Simplified and Traditional Chinese conversions from the OpenCC project.
Compatibility
This package is intended for opencc-js, opencc-py, and other OpenCC-compatible implementations that consume OpenCC dictionary and config data.
- Strict Version Matching: Compatibility is only guaranteed when the version of
opencc-datastrictly matches the version of the consumer package. - 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.
Data Sync Policy
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.
Usage
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.
Dictionary text files are shipped in data/. Config files reference those dictionaries by file name and preserve OpenCC's stage/group ordering semantics.
Python consumers can install the opencc-data package from PyPI and use the opencc_data module to locate packaged resources:
import opencc_data
config_file = opencc_data.config_path("s2t.json")
dictionary_file = opencc_data.data_path("STCharacters.txt")
testcases_file = opencc_data.test_data_path("testcases.json")
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: for example, 1.4.0-next.20260628 is published to PyPI as 1.4.0.dev20260628.
opencc-data

本套件收錄來自 OpenCC 專案的簡繁轉換詞典資料、配置與測試集。
相容性
本套件適用於 opencc-js、opencc-py,也可供其他相容 OpenCC 詞典與設定檔格式的實作使用。
- 嚴格版本匹配:只有在
opencc-data與使用端套件版本完全一致時,才保證相容性。 - 破壞性變更:不同版本的
opencc-data之間不保證相容。資料結構或檔名可能會隨上游 OpenCC 更新而調整。
資料同步政策
本套件會從 OpenCC 產生的 resource zip 同步詞典 .txt 檔與設定 .json 檔,並從上游 repository 同步 test/testcases/testcases.json。每次同步都會保留上游 resource manifest 作為內部基準,之後可透過 resource hash 判斷是否有實質資料變更。
使用方式
請以套件內 data/config/ 提供的設定檔作為詞典順序與轉換鏈行為的依據。設定內容可能隨 OpenCC 版本改變,因此使用端應載入其依賴版本對應的設定檔,而不是從 README 固定寫死詞典列表。
詞典文字檔位於 data/。設定檔會以檔名引用這些詞典,並保留 OpenCC 的 stage/group 排序語意。
Python 使用者可以從 PyPI 安裝 opencc-data,並透過 opencc_data module 定位套件內資源:
import opencc_data
config_file = opencc_data.config_path("s2t.json")
dictionary_file = opencc_data.data_path("STCharacters.txt")
testcases_file = opencc_data.test_data_path("testcases.json")
正式版在 npm 與 PyPI 會使用相同版本號,例如 1.3.2。next prerelease 則會在 PyPI 使用對應的 PEP 440 版本:例如 1.4.0-next.20260628 會以 1.4.0.dev20260628 發佈到 PyPI。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opencc_data-1.3.2.tar.gz.
File metadata
- Download URL: opencc_data-1.3.2.tar.gz
- Upload date:
- Size: 532.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d832b28ea4f8664d4386ff44ef987d2faa310003020193d0351af762146ec75
|
|
| MD5 |
6f7e820734a06021e81afbc235fd9b61
|
|
| BLAKE2b-256 |
8db0c9765c1e55a29dfd86a65ad1fc85e507bf40679d70cee9d70a4d088f9418
|
Provenance
The following attestation bundles were made for opencc_data-1.3.2.tar.gz:
Publisher:
pypi-publish.yml on nk2028/opencc-data
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opencc_data-1.3.2.tar.gz -
Subject digest:
2d832b28ea4f8664d4386ff44ef987d2faa310003020193d0351af762146ec75 - Sigstore transparency entry: 2004303695
- Sigstore integration time:
-
Permalink:
nk2028/opencc-data@0a98e8101be0c6dd67b8a841c000d0207f5c7d2f -
Branch / Tag:
refs/tags/1.3.2 - Owner: https://github.com/nk2028
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@0a98e8101be0c6dd67b8a841c000d0207f5c7d2f -
Trigger Event:
release
-
Statement type:
File details
Details for the file opencc_data-1.3.2-py3-none-any.whl.
File metadata
- Download URL: opencc_data-1.3.2-py3-none-any.whl
- Upload date:
- Size: 542.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4e8fa418ab3ca8521733e92a3e046bcd242e08147583a6c5e189279a4977b29
|
|
| MD5 |
8f547a3f90207843f1454d2606c3ab11
|
|
| BLAKE2b-256 |
fe7d18a33dfa1d1e1a512f3aac4f342f854f5b6a2fd72aedbca9548e3c1c696b
|
Provenance
The following attestation bundles were made for opencc_data-1.3.2-py3-none-any.whl:
Publisher:
pypi-publish.yml on nk2028/opencc-data
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opencc_data-1.3.2-py3-none-any.whl -
Subject digest:
c4e8fa418ab3ca8521733e92a3e046bcd242e08147583a6c5e189279a4977b29 - Sigstore transparency entry: 2004303806
- Sigstore integration time:
-
Permalink:
nk2028/opencc-data@0a98e8101be0c6dd67b8a841c000d0207f5c7d2f -
Branch / Tag:
refs/tags/1.3.2 - Owner: https://github.com/nk2028
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@0a98e8101be0c6dd67b8a841c000d0207f5c7d2f -
Trigger Event:
release
-
Statement type: