Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

opencc-data PyPI version JSDelivr badge

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-data strictly 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. Numbered alpha / beta / rc prereleases are mapped the same way: 1.5.0-beta.0 is published to PyPI as 1.5.0b0.


opencc-data PyPI version JSDelivr badge

本套件收錄來自 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。帶序號的 alpha/beta/rc prerelease 亦同理:1.5.0-beta.0 會以 1.5.0b0 發佈到 PyPI。

Metadata

Release files for opencc-data 1.5.0b0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opencc-data 1.5.0b0
File Size Uploaded
opencc_data-1.5.0b0.tar.gz 671.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for opencc-data 1.5.0b0
File Interpreter ABI Platform
opencc_data-1.5.0b0-py3-none-any.whl Python 3 none any Details

Total release size: 1.4 MB

Release files / opencc_data-1.5.0b0.tar.gz

Download URL opencc_data-1.5.0b0.tar.gz
Size 671.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8d25f293db6092fbb8b578ac0c186c6f3fbfe93ed7610fd88bb466b77e775993
BLAKE2b-256 checksum
How to use checksums
ea740092f1351026cbc56dbff9dc007e587d9d1dd8c4982d8021fef3faa9945b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / opencc_data-1.5.0b0-py3-none-any.whl

Download URL opencc_data-1.5.0b0-py3-none-any.whl
Size 683.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24f132a3946da1e36fd6e11d1df5e6fb2af02e901b1971efe16d49b6347e07ce
BLAKE2b-256 checksum
How to use checksums
2ec136f52b10191cbc6440d8e28874421c36a1e926f535252e8b737f4a7ef52c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page