OpenCC


NameOpenCC JSON
Version 1.1.7 PyPI version JSON
download
home_pagehttps://github.com/BYVoid/OpenCC
SummaryConversion between Traditional and Simplified Chinese
upload_time2023-10-16 07:32:07
maintainer
docs_urlNone
authorCarbo Kuo, Peng Huang, Kefu Chai, LI Daobing, Asias, Peng Wu, Xiaojun Ma, 佛振
requires_python
licenseApache License 2.0
keywords opencc convert chinese
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # Open Chinese Convert 開放中文轉換

[![Travis](https://img.shields.io/travis/BYVoid/OpenCC.svg)](https://travis-ci.org/BYVoid/OpenCC)
[![AppVeyor](https://img.shields.io/appveyor/ci/Carbo/OpenCC.svg)](https://ci.appveyor.com/project/Carbo/OpenCC)
[![C/C++ CI](https://github.com/BYVoid/OpenCC/actions/workflows/cmake.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/cmake.yml)
[![Node.js CI](https://github.com/BYVoid/OpenCC/actions/workflows/nodejs.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/nodejs.yml)
[![Python CI](https://github.com/BYVoid/OpenCC/actions/workflows/python.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/python.yml)

## Introduction 介紹

![OpenCC](https://opencc.byvoid.com/img/opencc.png)

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.

中文簡繁轉換開源項目,支持詞彙級別的轉換、異體字轉換和地區習慣用詞轉換(中國大陸、臺灣、香港、日本新字體)。不提供普通話與粵語的轉換。

Discussion (Telegram): https://t.me/open_chinese_convert

### Features 特點

* 嚴格區分「一簡對多繁」和「一簡對多異」。
* 完全兼容異體字,可以實現動態替換。
* 嚴格審校一簡對多繁詞條,原則爲「能分則不合」。
* 支持中國大陸、臺灣、香港異體字和地區習慣用詞轉換,如「裏」「裡」、「鼠標」「滑鼠」。
* 詞庫和函數庫完全分離,可以自由修改、導入、擴展。

## Installation 安裝

See [Download](https://github.com/BYVoid/OpenCC/wiki/Download).

## Usage 使用

### Online demo 線上轉換展示

Warning: **This is NOT an API.** You will be banned if you make calls programmatically.

https://opencc.byvoid.com/

### Node.js

[npm](https://www.npmjs.com/opencc) `npm install opencc`

#### JavaScript
```js
const OpenCC = require('opencc');
const converter = new OpenCC('s2t.json');
converter.convertPromise("汉字").then(converted => {
  console.log(converted);  // 漢字
});
```

#### TypeScript
```ts
import { OpenCC } from 'opencc';
async function main() {
  const converter: OpenCC = new OpenCC('s2t.json');
  const result: string = await converter.convertPromise('汉字');
  console.log(result);
}
```

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).

### Python

[PyPI](https://pypi.org/project/OpenCC/) `pip install opencc` (Windows, Linux, Mac)

```python
import opencc
converter = opencc.OpenCC('s2t.json')
converter.convert('汉字')  # 漢字
```

### C++

```c++
#include "opencc.h"

int main() {
  const opencc::SimpleConverter converter("s2t.json");
  converter.Convert("汉字");  // 漢字
  return 0;
}
```

### C

```c
#include "opencc.h"

int main() {
  opencc_t opencc = opencc_open("s2t.json");
  const char* input = "汉字";
  char* converted = opencc_convert_utf8(opencc, input, strlen(input));  // 漢字
  opencc_convert_utf8_free(converted);
  opencc_close(opencc);
  return 0;
}

```

Document 文檔: https://byvoid.github.io/OpenCC/

### Command Line

* `opencc --help`
* `opencc_dict --help`
* `opencc_phrase_extract --help`

### Others (Unofficial)

* Swift (iOS): [SwiftyOpenCC](https://github.com/XQS6LB3A/SwiftyOpenCC)
* iOSOpenCC (pod): [iOSOpenCC](https://github.com/swiftdo/OpenCC)
* Java: [opencc4j](https://github.com/houbb/opencc4j)
* Android: [android-opencc](https://github.com/qichuan/android-opencc)
* PHP: [opencc4php](https://github.com/nauxliu/opencc4php)
* Pure JavaScript: [opencc-js](https://github.com/nk2028/opencc-js)
* WebAssembly: [wasm-opencc](https://github.com/oyyd/wasm-opencc)
* Browser Extension: [opencc-extension](https://github.com/tnychn/opencc-extension)
* Go (Pure): [OpenCC for Go](https://github.com/longbridgeapp/opencc)

### Configurations 配置文件

#### 預設配置文件

* `s2t.json` Simplified Chinese to Traditional Chinese 簡體到繁體
* `t2s.json` Traditional Chinese to Simplified Chinese 繁體到簡體
* `s2tw.json` Simplified Chinese to Traditional Chinese (Taiwan Standard) 簡體到臺灣正體
* `tw2s.json` Traditional Chinese (Taiwan Standard) to Simplified Chinese 臺灣正體到簡體
* `s2hk.json` Simplified Chinese to Traditional Chinese (Hong Kong variant) 簡體到香港繁體
* `hk2s.json` Traditional Chinese (Hong Kong variant) to Simplified Chinese 香港繁體到簡體
* `s2twp.json` Simplified Chinese to Traditional Chinese (Taiwan Standard) with Taiwanese idiom 簡體到繁體(臺灣正體標準)並轉換爲臺灣常用詞彙
* `tw2sp.json` Traditional Chinese (Taiwan Standard) to Simplified Chinese with Mainland Chinese idiom 繁體(臺灣正體標準)到簡體並轉換爲中國大陸常用詞彙
* `t2tw.json` Traditional Chinese (OpenCC Standard) to Taiwan Standard 繁體(OpenCC 標準)到臺灣正體
* `hk2t.json` Traditional Chinese (Hong Kong variant) to Traditional Chinese 香港繁體到繁體(OpenCC 標準)
* `t2hk.json` Traditional Chinese (OpenCC Standard) to Hong Kong variant 繁體(OpenCC 標準)到香港繁體
* `t2jp.json` Traditional Chinese Characters (Kyūjitai) to New Japanese Kanji (Shinjitai) 繁體(OpenCC 標準,舊字體)到日文新字體
* `jp2t.json` New Japanese Kanji (Shinjitai) to Traditional Chinese Characters (Kyūjitai) 日文新字體到繁體(OpenCC 標準,舊字體)
* `tw2t.json` Traditional Chinese (Taiwan standard) to Traditional Chinese 臺灣正體到繁體(OpenCC 標準)

## Build 編譯

### Build with CMake

#### Linux & Mac OS X

g++ 4.6+ or clang 3.2+ is required.

```bash
make
```

#### Windows Visual Studio:

```bash
build.cmd
```

### Test 測試

#### Linux & Mac OS X

```
make test
```

#### Windows Visual Studio:

```bash
test.cmd
```

### Benchmark 基準測試

```
make benchmark
```

Example results (from Github CI):

```
1: ------------------------------------------------------------------
1: Benchmark                        Time             CPU   Iterations
1: ------------------------------------------------------------------
1: BM_Initialization/hk2s        1.56 ms         1.56 ms          442
1: BM_Initialization/hk2t       0.144 ms        0.144 ms         4878
1: BM_Initialization/jp2t       0.260 ms        0.260 ms         2604
1: BM_Initialization/s2hk        23.8 ms         23.8 ms           29
1: BM_Initialization/s2t         25.6 ms         25.6 ms           28
1: BM_Initialization/s2tw        24.0 ms         23.9 ms           30
1: BM_Initialization/s2twp       24.6 ms         24.6 ms           28
1: BM_Initialization/t2hk       0.052 ms        0.052 ms        12897
1: BM_Initialization/t2jp       0.141 ms        0.141 ms         5012
1: BM_Initialization/t2s         1.30 ms         1.30 ms          540
1: BM_Initialization/tw2s        1.39 ms         1.39 ms          529
1: BM_Initialization/tw2sp       1.69 ms         1.69 ms          426
1: BM_Initialization/tw2t       0.089 ms        0.089 ms         7707
1: BM_Convert2M                   582 ms          582 ms            1
1: BM_Convert/100                1.07 ms         1.07 ms          636
1: BM_Convert/1000               11.0 ms         11.0 ms           67
1: BM_Convert/10000               113 ms          113 ms            6
1: BM_Convert/100000             1176 ms         1176 ms            1
```

## Projects using OpenCC 使用 OpenCC 的項目

* [ibus-pinyin](https://github.com/ibus/ibus-pinyin)
* [fcitx](https://github.com/fcitx/fcitx)
* [rimeime](https://rime.im/)
* [libgooglepinyin](http://code.google.com/p/libgooglepinyin/)
* [ibus-libpinyin](https://github.com/libpinyin/ibus-libpinyin)
* [alfred-chinese-converter](https://github.com/amowu/alfred-chinese-converter)
* [GoldenDict](https://github.com/goldendict/goldendict)

## License 許可協議

Apache License 2.0

## Third Party Library 第三方庫

* [darts-clone](https://github.com/s-yata/darts-clone) BSD License
* [marisa-trie](https://github.com/s-yata/marisa-trie) BSD License
* [tclap](http://tclap.sourceforge.net/) MIT License
* [rapidjson](https://github.com/Tencent/rapidjson) MIT License
* [Google Test](https://github.com/google/googletest) BSD License

All these libraries are statically linked by default.

## Change History 版本歷史

* [NEWS](https://github.com/BYVoid/OpenCC/blob/master/NEWS.md)

### Links 相關鏈接

* Introduction 詳細介紹 https://github.com/BYVoid/OpenCC/wiki/%E7%B7%A3%E7%94%B1
* 現代漢語常用簡繁一對多字義辨析表 http://ytenx.org/byohlyuk/KienxPyan

## Contributors 貢獻者

* [BYVoid](http://www.byvoid.com/)
* [佛振](https://github.com/lotem)
* [Peng Huang](https://github.com/phuang)
* [LI Daobing](https://github.com/lidaobing)
* [Kefu Chai](https://github.com/tchaikov)
* [Kan-Ru Chen](http://kanru.info/)
* [Ma Xiaojun](https://twitter.com/damage3025)
* [Jiang Jiang](http://jjgod.org/)
* [Ruey-Cheng Chen](https://github.com/rueycheng)
* [Paul Meng](http://home.mno2.org/)
* [Lawrence Lau](https://github.com/ktslwy)
* [瑾昀](https://github.com/kunki)
* [內木一郎](https://github.com/SyaoranHinata)
* [Marguerite Su](https://www.marguerite.su/)
* [Brian White](http://mscdex.net)
* [Qijiang Fan](https://fqj.me/)
* [LEOYoon-Tsaw](https://github.com/LEOYoon-Tsaw)
* [Steven Yao](https://github.com/stevenyao)
* [Pellaeon Lin](https://github.com/pellaeon)
* [stony](https://github.com/stony-shixz)
* [steelywing](https://github.com/steelywing)
* [吕旭东](https://github.com/lvxudong)
* [Weng Xuetian](https://github.com/wengxt)
* [Ma Tao](https://github.com/iwater)
* [Heinz Wiesinger](https://github.com/pprkut)
* [J.W](https://github.com/jakwings)
* [Amo Wu](https://github.com/amowu)
* [Mark Tsai](https://github.com/mxgit1090)
* [Zhe Wang](https://github.com/0x1997)
* [sgqy](https://github.com/sgqy)
* [Qichuan (Sean) ZHANG](https://github.com/qichuan)
* [Flandre Scarlet](https://github.com/XadillaX)
* [宋辰文](https://github.com/songchenwen)
* [iwater](https://github.com/iwater)
* [Xpol Wan](https://github.com/xpol)
* [Weihang Lo](https://github.com/weihanglo)
* [Cychih](https://github.com/pi314)
* [kyleskimo](https://github.com/kyleskimo)
* [Ryuan Choi](https://github.com/bunhere)
* [Prcuvu](https://github.com/Prcuvu)
* [Tony Able](https://github.com/TonyAble)
* [Xiao Liang](https://github.com/yxliang01)

Please feel free to update this list if you have contributed OpenCC.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/BYVoid/OpenCC",
    "name": "OpenCC",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "opencc,convert,chinese",
    "author": "Carbo Kuo, Peng Huang, Kefu Chai, LI Daobing, Asias, Peng Wu, Xiaojun Ma, \u4f5b\u632f",
    "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",
    "download_url": "",
    "platform": null,
    "description": "# Open Chinese Convert \u958b\u653e\u4e2d\u6587\u8f49\u63db\n\n[![Travis](https://img.shields.io/travis/BYVoid/OpenCC.svg)](https://travis-ci.org/BYVoid/OpenCC)\n[![AppVeyor](https://img.shields.io/appveyor/ci/Carbo/OpenCC.svg)](https://ci.appveyor.com/project/Carbo/OpenCC)\n[![C/C++ CI](https://github.com/BYVoid/OpenCC/actions/workflows/cmake.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/cmake.yml)\n[![Node.js CI](https://github.com/BYVoid/OpenCC/actions/workflows/nodejs.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/nodejs.yml)\n[![Python CI](https://github.com/BYVoid/OpenCC/actions/workflows/python.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/python.yml)\n\n## Introduction \u4ecb\u7d39\n\n![OpenCC](https://opencc.byvoid.com/img/opencc.png)\n\nOpen Chinese Convert (OpenCC, \u958b\u653e\u4e2d\u6587\u8f49\u63db) 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.\n\n\u4e2d\u6587\u7c21\u7e41\u8f49\u63db\u958b\u6e90\u9805\u76ee\uff0c\u652f\u6301\u8a5e\u5f59\u7d1a\u5225\u7684\u8f49\u63db\u3001\u7570\u9ad4\u5b57\u8f49\u63db\u548c\u5730\u5340\u7fd2\u6163\u7528\u8a5e\u8f49\u63db\uff08\u4e2d\u570b\u5927\u9678\u3001\u81fa\u7063\u3001\u9999\u6e2f\u3001\u65e5\u672c\u65b0\u5b57\u9ad4\uff09\u3002\u4e0d\u63d0\u4f9b\u666e\u901a\u8a71\u8207\u7cb5\u8a9e\u7684\u8f49\u63db\u3002\n\nDiscussion (Telegram): https://t.me/open_chinese_convert\n\n### Features \u7279\u9ede\n\n* \u56b4\u683c\u5340\u5206\u300c\u4e00\u7c21\u5c0d\u591a\u7e41\u300d\u548c\u300c\u4e00\u7c21\u5c0d\u591a\u7570\u300d\u3002\n* \u5b8c\u5168\u517c\u5bb9\u7570\u9ad4\u5b57\uff0c\u53ef\u4ee5\u5be6\u73fe\u52d5\u614b\u66ff\u63db\u3002\n* \u56b4\u683c\u5be9\u6821\u4e00\u7c21\u5c0d\u591a\u7e41\u8a5e\u689d\uff0c\u539f\u5247\u7232\u300c\u80fd\u5206\u5247\u4e0d\u5408\u300d\u3002\n* \u652f\u6301\u4e2d\u570b\u5927\u9678\u3001\u81fa\u7063\u3001\u9999\u6e2f\u7570\u9ad4\u5b57\u548c\u5730\u5340\u7fd2\u6163\u7528\u8a5e\u8f49\u63db\uff0c\u5982\u300c\u88cf\u300d\u300c\u88e1\u300d\u3001\u300c\u9f20\u6a19\u300d\u300c\u6ed1\u9f20\u300d\u3002\n* \u8a5e\u5eab\u548c\u51fd\u6578\u5eab\u5b8c\u5168\u5206\u96e2\uff0c\u53ef\u4ee5\u81ea\u7531\u4fee\u6539\u3001\u5c0e\u5165\u3001\u64f4\u5c55\u3002\n\n## Installation \u5b89\u88dd\n\nSee [Download](https://github.com/BYVoid/OpenCC/wiki/Download).\n\n## Usage \u4f7f\u7528\n\n### Online demo \u7dda\u4e0a\u8f49\u63db\u5c55\u793a\n\nWarning: **This is NOT an API.** You will be banned if you make calls programmatically.\n\nhttps://opencc.byvoid.com/\n\n### Node.js\n\n[npm](https://www.npmjs.com/opencc) `npm install opencc`\n\n#### JavaScript\n```js\nconst OpenCC = require('opencc');\nconst converter = new OpenCC('s2t.json');\nconverter.convertPromise(\"\u6c49\u5b57\").then(converted => {\n  console.log(converted);  // \u6f22\u5b57\n});\n```\n\n#### TypeScript\n```ts\nimport { OpenCC } from 'opencc';\nasync function main() {\n  const converter: OpenCC = new OpenCC('s2t.json');\n  const result: string = await converter.convertPromise('\u6c49\u5b57');\n  console.log(result);\n}\n```\n\nSee [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).\n\n### Python\n\n[PyPI](https://pypi.org/project/OpenCC/) `pip install opencc` (Windows, Linux, Mac)\n\n```python\nimport opencc\nconverter = opencc.OpenCC('s2t.json')\nconverter.convert('\u6c49\u5b57')  # \u6f22\u5b57\n```\n\n### C++\n\n```c++\n#include \"opencc.h\"\n\nint main() {\n  const opencc::SimpleConverter converter(\"s2t.json\");\n  converter.Convert(\"\u6c49\u5b57\");  // \u6f22\u5b57\n  return 0;\n}\n```\n\n### C\n\n```c\n#include \"opencc.h\"\n\nint main() {\n  opencc_t opencc = opencc_open(\"s2t.json\");\n  const char* input = \"\u6c49\u5b57\";\n  char* converted = opencc_convert_utf8(opencc, input, strlen(input));  // \u6f22\u5b57\n  opencc_convert_utf8_free(converted);\n  opencc_close(opencc);\n  return 0;\n}\n\n```\n\nDocument \u6587\u6a94: https://byvoid.github.io/OpenCC/\n\n### Command Line\n\n* `opencc --help`\n* `opencc_dict --help`\n* `opencc_phrase_extract --help`\n\n### Others (Unofficial)\n\n* Swift (iOS): [SwiftyOpenCC](https://github.com/XQS6LB3A/SwiftyOpenCC)\n* iOSOpenCC (pod): [iOSOpenCC](https://github.com/swiftdo/OpenCC)\n* Java: [opencc4j](https://github.com/houbb/opencc4j)\n* Android: [android-opencc](https://github.com/qichuan/android-opencc)\n* PHP: [opencc4php](https://github.com/nauxliu/opencc4php)\n* Pure JavaScript: [opencc-js](https://github.com/nk2028/opencc-js)\n* WebAssembly: [wasm-opencc](https://github.com/oyyd/wasm-opencc)\n* Browser Extension: [opencc-extension](https://github.com/tnychn/opencc-extension)\n* Go (Pure): [OpenCC for Go](https://github.com/longbridgeapp/opencc)\n\n### Configurations \u914d\u7f6e\u6587\u4ef6\n\n#### \u9810\u8a2d\u914d\u7f6e\u6587\u4ef6\n\n* `s2t.json` Simplified Chinese to Traditional Chinese \u7c21\u9ad4\u5230\u7e41\u9ad4\n* `t2s.json` Traditional Chinese to Simplified Chinese \u7e41\u9ad4\u5230\u7c21\u9ad4\n* `s2tw.json` Simplified Chinese to Traditional Chinese (Taiwan Standard) \u7c21\u9ad4\u5230\u81fa\u7063\u6b63\u9ad4\n* `tw2s.json` Traditional Chinese (Taiwan Standard) to Simplified Chinese \u81fa\u7063\u6b63\u9ad4\u5230\u7c21\u9ad4\n* `s2hk.json` Simplified Chinese to Traditional Chinese (Hong Kong variant) \u7c21\u9ad4\u5230\u9999\u6e2f\u7e41\u9ad4\n* `hk2s.json` Traditional Chinese (Hong Kong variant) to Simplified Chinese \u9999\u6e2f\u7e41\u9ad4\u5230\u7c21\u9ad4\n* `s2twp.json` Simplified Chinese to Traditional Chinese (Taiwan Standard) with Taiwanese idiom \u7c21\u9ad4\u5230\u7e41\u9ad4\uff08\u81fa\u7063\u6b63\u9ad4\u6a19\u6e96\uff09\u4e26\u8f49\u63db\u7232\u81fa\u7063\u5e38\u7528\u8a5e\u5f59\n* `tw2sp.json` Traditional Chinese (Taiwan Standard) to Simplified Chinese with Mainland Chinese idiom \u7e41\u9ad4\uff08\u81fa\u7063\u6b63\u9ad4\u6a19\u6e96\uff09\u5230\u7c21\u9ad4\u4e26\u8f49\u63db\u7232\u4e2d\u570b\u5927\u9678\u5e38\u7528\u8a5e\u5f59\n* `t2tw.json` Traditional Chinese (OpenCC Standard) to Taiwan Standard \u7e41\u9ad4\uff08OpenCC \u6a19\u6e96\uff09\u5230\u81fa\u7063\u6b63\u9ad4\n* `hk2t.json` Traditional Chinese (Hong Kong variant) to Traditional Chinese \u9999\u6e2f\u7e41\u9ad4\u5230\u7e41\u9ad4\uff08OpenCC \u6a19\u6e96\uff09\n* `t2hk.json` Traditional Chinese (OpenCC Standard) to Hong Kong variant \u7e41\u9ad4\uff08OpenCC \u6a19\u6e96\uff09\u5230\u9999\u6e2f\u7e41\u9ad4\n* `t2jp.json` Traditional Chinese Characters (Ky\u016bjitai) to New Japanese Kanji (Shinjitai) \u7e41\u9ad4\uff08OpenCC \u6a19\u6e96\uff0c\u820a\u5b57\u9ad4\uff09\u5230\u65e5\u6587\u65b0\u5b57\u9ad4\n* `jp2t.json` New Japanese Kanji (Shinjitai) to Traditional Chinese Characters (Ky\u016bjitai) \u65e5\u6587\u65b0\u5b57\u9ad4\u5230\u7e41\u9ad4\uff08OpenCC \u6a19\u6e96\uff0c\u820a\u5b57\u9ad4\uff09\n* `tw2t.json` Traditional Chinese (Taiwan standard) to Traditional Chinese \u81fa\u7063\u6b63\u9ad4\u5230\u7e41\u9ad4\uff08OpenCC \u6a19\u6e96\uff09\n\n## Build \u7de8\u8b6f\n\n### Build with CMake\n\n#### Linux & Mac OS X\n\ng++ 4.6+ or clang 3.2+ is required.\n\n```bash\nmake\n```\n\n#### Windows Visual Studio:\n\n```bash\nbuild.cmd\n```\n\n### Test \u6e2c\u8a66\n\n#### Linux & Mac OS X\n\n```\nmake test\n```\n\n#### Windows Visual Studio:\n\n```bash\ntest.cmd\n```\n\n### Benchmark \u57fa\u6e96\u6e2c\u8a66\n\n```\nmake benchmark\n```\n\nExample results (from Github CI):\n\n```\n1: ------------------------------------------------------------------\n1: Benchmark                        Time             CPU   Iterations\n1: ------------------------------------------------------------------\n1: BM_Initialization/hk2s        1.56 ms         1.56 ms          442\n1: BM_Initialization/hk2t       0.144 ms        0.144 ms         4878\n1: BM_Initialization/jp2t       0.260 ms        0.260 ms         2604\n1: BM_Initialization/s2hk        23.8 ms         23.8 ms           29\n1: BM_Initialization/s2t         25.6 ms         25.6 ms           28\n1: BM_Initialization/s2tw        24.0 ms         23.9 ms           30\n1: BM_Initialization/s2twp       24.6 ms         24.6 ms           28\n1: BM_Initialization/t2hk       0.052 ms        0.052 ms        12897\n1: BM_Initialization/t2jp       0.141 ms        0.141 ms         5012\n1: BM_Initialization/t2s         1.30 ms         1.30 ms          540\n1: BM_Initialization/tw2s        1.39 ms         1.39 ms          529\n1: BM_Initialization/tw2sp       1.69 ms         1.69 ms          426\n1: BM_Initialization/tw2t       0.089 ms        0.089 ms         7707\n1: BM_Convert2M                   582 ms          582 ms            1\n1: BM_Convert/100                1.07 ms         1.07 ms          636\n1: BM_Convert/1000               11.0 ms         11.0 ms           67\n1: BM_Convert/10000               113 ms          113 ms            6\n1: BM_Convert/100000             1176 ms         1176 ms            1\n```\n\n## Projects using OpenCC \u4f7f\u7528 OpenCC \u7684\u9805\u76ee\n\n* [ibus-pinyin](https://github.com/ibus/ibus-pinyin)\n* [fcitx](https://github.com/fcitx/fcitx)\n* [rimeime](https://rime.im/)\n* [libgooglepinyin](http://code.google.com/p/libgooglepinyin/)\n* [ibus-libpinyin](https://github.com/libpinyin/ibus-libpinyin)\n* [alfred-chinese-converter](https://github.com/amowu/alfred-chinese-converter)\n* [GoldenDict](https://github.com/goldendict/goldendict)\n\n## License \u8a31\u53ef\u5354\u8b70\n\nApache License 2.0\n\n## Third Party Library \u7b2c\u4e09\u65b9\u5eab\n\n* [darts-clone](https://github.com/s-yata/darts-clone) BSD License\n* [marisa-trie](https://github.com/s-yata/marisa-trie) BSD License\n* [tclap](http://tclap.sourceforge.net/) MIT License\n* [rapidjson](https://github.com/Tencent/rapidjson) MIT License\n* [Google Test](https://github.com/google/googletest) BSD License\n\nAll these libraries are statically linked by default.\n\n## Change History \u7248\u672c\u6b77\u53f2\n\n* [NEWS](https://github.com/BYVoid/OpenCC/blob/master/NEWS.md)\n\n### Links \u76f8\u95dc\u93c8\u63a5\n\n* Introduction \u8a73\u7d30\u4ecb\u7d39 https://github.com/BYVoid/OpenCC/wiki/%E7%B7%A3%E7%94%B1\n* \u73fe\u4ee3\u6f22\u8a9e\u5e38\u7528\u7c21\u7e41\u4e00\u5c0d\u591a\u5b57\u7fa9\u8fa8\u6790\u8868 http://ytenx.org/byohlyuk/KienxPyan\n\n## Contributors \u8ca2\u737b\u8005\n\n* [BYVoid](http://www.byvoid.com/)\n* [\u4f5b\u632f](https://github.com/lotem)\n* [Peng Huang](https://github.com/phuang)\n* [LI Daobing](https://github.com/lidaobing)\n* [Kefu Chai](https://github.com/tchaikov)\n* [Kan-Ru Chen](http://kanru.info/)\n* [Ma Xiaojun](https://twitter.com/damage3025)\n* [Jiang Jiang](http://jjgod.org/)\n* [Ruey-Cheng Chen](https://github.com/rueycheng)\n* [Paul Meng](http://home.mno2.org/)\n* [Lawrence Lau](https://github.com/ktslwy)\n* [\u747e\u6600](https://github.com/kunki)\n* [\u5167\u6728\u4e00\u90ce](https://github.com/SyaoranHinata)\n* [Marguerite Su](https://www.marguerite.su/)\n* [Brian White](http://mscdex.net)\n* [Qijiang Fan](https://fqj.me/)\n* [LEOYoon-Tsaw](https://github.com/LEOYoon-Tsaw)\n* [Steven Yao](https://github.com/stevenyao)\n* [Pellaeon Lin](https://github.com/pellaeon)\n* [stony](https://github.com/stony-shixz)\n* [steelywing](https://github.com/steelywing)\n* [\u5415\u65ed\u4e1c](https://github.com/lvxudong)\n* [Weng Xuetian](https://github.com/wengxt)\n* [Ma Tao](https://github.com/iwater)\n* [Heinz Wiesinger](https://github.com/pprkut)\n* [J.W](https://github.com/jakwings)\n* [Amo Wu](https://github.com/amowu)\n* [Mark Tsai](https://github.com/mxgit1090)\n* [Zhe Wang](https://github.com/0x1997)\n* [sgqy](https://github.com/sgqy)\n* [Qichuan (Sean) ZHANG](https://github.com/qichuan)\n* [Flandre Scarlet](https://github.com/XadillaX)\n* [\u5b8b\u8fb0\u6587](https://github.com/songchenwen)\n* [iwater](https://github.com/iwater)\n* [Xpol Wan](https://github.com/xpol)\n* [Weihang Lo](https://github.com/weihanglo)\n* [Cychih](https://github.com/pi314)\n* [kyleskimo](https://github.com/kyleskimo)\n* [Ryuan Choi](https://github.com/bunhere)\n* [Prcuvu](https://github.com/Prcuvu)\n* [Tony Able](https://github.com/TonyAble)\n* [Xiao Liang](https://github.com/yxliang01)\n\nPlease feel free to update this list if you have contributed OpenCC.\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "Conversion between Traditional and Simplified Chinese",
    "version": "1.1.7",
    "project_urls": {
        "Homepage": "https://github.com/BYVoid/OpenCC"
    },
    "split_keywords": [
        "opencc",
        "convert",
        "chinese"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0a28aed41e348d84cefbacd80e8715969c3acbbf0d849335ef924946655960d7",
                "md5": "1a4f6e1ac61426684bfbfeff99bfa428",
                "sha256": "ba77d5eb376129adcad090a07b0edbee293f26513f14a135a9cb17af004defd1"
            },
            "downloads": -1,
            "filename": "OpenCC-1.1.7-cp310-cp310-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "1a4f6e1ac61426684bfbfeff99bfa428",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 734824,
            "upload_time": "2023-10-16T07:32:07",
            "upload_time_iso_8601": "2023-10-16T07:32:07.116397Z",
            "url": "https://files.pythonhosted.org/packages/0a/28/aed41e348d84cefbacd80e8715969c3acbbf0d849335ef924946655960d7/OpenCC-1.1.7-cp310-cp310-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df273d4652dcf73d1ddde83348ab167dc33372822f96eac76fd6235d5144868a",
                "md5": "b424b0c906276496f6607d154ddb1a82",
                "sha256": "fc4fb3ec08dcbdb430cbd70d14f9457f2b2ef2d51b08bf079b9cee0c6def3eed"
            },
            "downloads": -1,
            "filename": "OpenCC-1.1.7-cp310-cp310-manylinux1_x86_64.whl",
            "has_sig": false,
            "md5_digest": "b424b0c906276496f6607d154ddb1a82",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 779782,
            "upload_time": "2023-10-16T07:25:59",
            "upload_time_iso_8601": "2023-10-16T07:25:59.815481Z",
            "url": "https://files.pythonhosted.org/packages/df/27/3d4652dcf73d1ddde83348ab167dc33372822f96eac76fd6235d5144868a/OpenCC-1.1.7-cp310-cp310-manylinux1_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0c89aaae6b007603e5021a3b7dc0f53835cad9065999f342a9ed4d7779dd0c9b",
                "md5": "47e94e4b78a38e601e0f129b8e769941",
                "sha256": "8fa764bbb93ff97f50d1f70ca2542c9108adb763845d690e256664a61c98f914"
            },
            "downloads": -1,
            "filename": "OpenCC-1.1.7-cp310-cp310-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "47e94e4b78a38e601e0f129b8e769941",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 715981,
            "upload_time": "2023-10-16T07:30:27",
            "upload_time_iso_8601": "2023-10-16T07:30:27.188432Z",
            "url": "https://files.pythonhosted.org/packages/0c/89/aaae6b007603e5021a3b7dc0f53835cad9065999f342a9ed4d7779dd0c9b/OpenCC-1.1.7-cp310-cp310-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a2999bf06f2111f682ce8c1cf6b57a01b651b0c9d786e7d650b1f7cb6ac0d6a2",
                "md5": "e91656462a78e3fcbe7136f06e63cdfb",
                "sha256": "8aa4b1203bf78ced40ae4da7206089ccd459f823a1b05f311b653eb08dce7d0d"
            },
            "downloads": -1,
            "filename": "OpenCC-1.1.7-cp311-cp311-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "e91656462a78e3fcbe7136f06e63cdfb",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": null,
            "size": 734776,
            "upload_time": "2023-10-16T07:32:09",
            "upload_time_iso_8601": "2023-10-16T07:32:09.000224Z",
            "url": "https://files.pythonhosted.org/packages/a2/99/9bf06f2111f682ce8c1cf6b57a01b651b0c9d786e7d650b1f7cb6ac0d6a2/OpenCC-1.1.7-cp311-cp311-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "18a29ccfc1e1c49f6643b2bc090ba2a5bca5df6a2754e5049caa1909609bdccd",
                "md5": "1ed255db1a0f31bb5b0f996c593255db",
                "sha256": "3ed6f128383375b9dc5c3db02ffa9d6ac1a14242656414bab85a18ef65daf645"
            },
            "downloads": -1,
            "filename": "OpenCC-1.1.7-cp311-cp311-manylinux1_x86_64.whl",
            "has_sig": false,
            "md5_digest": "1ed255db1a0f31bb5b0f996c593255db",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": null,
            "size": 779725,
            "upload_time": "2023-10-16T07:26:02",
            "upload_time_iso_8601": "2023-10-16T07:26:02.027461Z",
            "url": "https://files.pythonhosted.org/packages/18/a2/9ccfc1e1c49f6643b2bc090ba2a5bca5df6a2754e5049caa1909609bdccd/OpenCC-1.1.7-cp311-cp311-manylinux1_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f076a9a5cedb776401a5ac470fb92be910012410d6334693e4799b2544493de5",
                "md5": "ed659c6405eb6788ca4f9f58e43a98f3",
                "sha256": "d2d4705b3f599903784b4d4be6a557c591aeeb93d2b99b8f19d3e13dee4fab10"
            },
            "downloads": -1,
            "filename": "OpenCC-1.1.7-cp311-cp311-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "ed659c6405eb6788ca4f9f58e43a98f3",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": null,
            "size": 715864,
            "upload_time": "2023-10-16T07:30:28",
            "upload_time_iso_8601": "2023-10-16T07:30:28.931339Z",
            "url": "https://files.pythonhosted.org/packages/f0/76/a9a5cedb776401a5ac470fb92be910012410d6334693e4799b2544493de5/OpenCC-1.1.7-cp311-cp311-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "688695196525a59c440d03b182e638f1cd0ad2b74e2e41e37c6f931b4bb85fd7",
                "md5": "622b57730d11d843699fb9b1a2a07eb3",
                "sha256": "253e7d636ad0aad2e70e616d2185181e0104687f53ec38974f7b67221c475382"
            },
            "downloads": -1,
            "filename": "OpenCC-1.1.7-cp312-cp312-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "622b57730d11d843699fb9b1a2a07eb3",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": null,
            "size": 735726,
            "upload_time": "2023-10-16T07:32:11",
            "upload_time_iso_8601": "2023-10-16T07:32:11.122529Z",
            "url": "https://files.pythonhosted.org/packages/68/86/95196525a59c440d03b182e638f1cd0ad2b74e2e41e37c6f931b4bb85fd7/OpenCC-1.1.7-cp312-cp312-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "925a7b1cd306d435434058ea4a97467f0f2e74408ed54be4b2ae3d40d337ab5b",
                "md5": "64dce45e8133bda58b4b61fb1ec47c84",
                "sha256": "dc5d6443b833e1a45bcad4d4312c680d9d574a365491357165d927a3eecac5f0"
            },
            "downloads": -1,
            "filename": "OpenCC-1.1.7-cp312-cp312-manylinux1_x86_64.whl",
            "has_sig": false,
            "md5_digest": "64dce45e8133bda58b4b61fb1ec47c84",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": null,
            "size": 779675,
            "upload_time": "2023-10-16T07:26:04",
            "upload_time_iso_8601": "2023-10-16T07:26:04.006589Z",
            "url": "https://files.pythonhosted.org/packages/92/5a/7b1cd306d435434058ea4a97467f0f2e74408ed54be4b2ae3d40d337ab5b/OpenCC-1.1.7-cp312-cp312-manylinux1_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "71661d56f4cf2c80243d3f8e715bfd81a2e4413691e9a8a2e07c827d7e2f6596",
                "md5": "594f12bbc33fc6681b9e47b0403bca3b",
                "sha256": "7f3f843f0b47afa0bff91ea5b9fbf9968f19ffbaffda9508615993058246ca3c"
            },
            "downloads": -1,
            "filename": "OpenCC-1.1.7-cp312-cp312-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "594f12bbc33fc6681b9e47b0403bca3b",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": null,
            "size": 716542,
            "upload_time": "2023-10-16T07:30:30",
            "upload_time_iso_8601": "2023-10-16T07:30:30.880255Z",
            "url": "https://files.pythonhosted.org/packages/71/66/1d56f4cf2c80243d3f8e715bfd81a2e4413691e9a8a2e07c827d7e2f6596/OpenCC-1.1.7-cp312-cp312-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dafded04905f54eb29459f91ee8afc10de9342a0a09fcba40dcc5bb2b272c895",
                "md5": "cfc7734fd9d28be721acf849b454d321",
                "sha256": "49c2eb39f636c948eaa21a84f4553da761a9cca5aa0dede8570729d572712531"
            },
            "downloads": -1,
            "filename": "OpenCC-1.1.7-cp38-cp38-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "cfc7734fd9d28be721acf849b454d321",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": null,
            "size": 734768,
            "upload_time": "2023-10-16T07:32:13",
            "upload_time_iso_8601": "2023-10-16T07:32:13.014590Z",
            "url": "https://files.pythonhosted.org/packages/da/fd/ed04905f54eb29459f91ee8afc10de9342a0a09fcba40dcc5bb2b272c895/OpenCC-1.1.7-cp38-cp38-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7c19b05d2c0b0f03154e68e85086e1db891b785afadfaad3901294fff6c19572",
                "md5": "7ec46aaaef322fa59a265efb994bba7e",
                "sha256": "49bbf40042702a743ad5b65398fc3faf1582e41fc948cd9bbbabe7c3e5366cd6"
            },
            "downloads": -1,
            "filename": "OpenCC-1.1.7-cp38-cp38-manylinux1_x86_64.whl",
            "has_sig": false,
            "md5_digest": "7ec46aaaef322fa59a265efb994bba7e",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": null,
            "size": 779803,
            "upload_time": "2023-10-16T07:26:05",
            "upload_time_iso_8601": "2023-10-16T07:26:05.505952Z",
            "url": "https://files.pythonhosted.org/packages/7c/19/b05d2c0b0f03154e68e85086e1db891b785afadfaad3901294fff6c19572/OpenCC-1.1.7-cp38-cp38-manylinux1_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d93c5be641241b1cb91ce65d77febcee76a8ec1a66244d2f75172212bfd692ec",
                "md5": "906c3164ffc5b6035802cd7b6d273f5c",
                "sha256": "06092f06e4b8a1f2563df03214c9f6fa457c9ff6d114f76bf9fb374cc2a4591f"
            },
            "downloads": -1,
            "filename": "OpenCC-1.1.7-cp38-cp38-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "906c3164ffc5b6035802cd7b6d273f5c",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": null,
            "size": 715791,
            "upload_time": "2023-10-16T07:30:32",
            "upload_time_iso_8601": "2023-10-16T07:30:32.669985Z",
            "url": "https://files.pythonhosted.org/packages/d9/3c/5be641241b1cb91ce65d77febcee76a8ec1a66244d2f75172212bfd692ec/OpenCC-1.1.7-cp38-cp38-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e63c50b95105d0578ea519d8d586a810a67c218db496ca77efa59f849f951480",
                "md5": "ba63ef15572fa43ebad47451ab95e181",
                "sha256": "a16b7ed7d01b77b133a51e41903c5c83486de5be5483164c869ed34b9bbfdaf7"
            },
            "downloads": -1,
            "filename": "OpenCC-1.1.7-cp39-cp39-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "ba63ef15572fa43ebad47451ab95e181",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": null,
            "size": 734878,
            "upload_time": "2023-10-16T07:32:14",
            "upload_time_iso_8601": "2023-10-16T07:32:14.978588Z",
            "url": "https://files.pythonhosted.org/packages/e6/3c/50b95105d0578ea519d8d586a810a67c218db496ca77efa59f849f951480/OpenCC-1.1.7-cp39-cp39-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1fef5221cf0909fcf44e33176a89af15728b581c45a6fe5f4201ea8a5640bcda",
                "md5": "129b439482a12b77822e49cfc64e9003",
                "sha256": "b55ad5edf93a45e89519fa4aa80384d7021fd795fdf8c9315b6898fa2a0e202a"
            },
            "downloads": -1,
            "filename": "OpenCC-1.1.7-cp39-cp39-manylinux1_x86_64.whl",
            "has_sig": false,
            "md5_digest": "129b439482a12b77822e49cfc64e9003",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": null,
            "size": 779923,
            "upload_time": "2023-10-16T07:26:07",
            "upload_time_iso_8601": "2023-10-16T07:26:07.319998Z",
            "url": "https://files.pythonhosted.org/packages/1f/ef/5221cf0909fcf44e33176a89af15728b581c45a6fe5f4201ea8a5640bcda/OpenCC-1.1.7-cp39-cp39-manylinux1_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "58e09adbd3983da5bf627a097dbfb81acfa02d68e6e97b8be367968b88dde6f1",
                "md5": "59601077947fc16095a7a1b932053a0b",
                "sha256": "6455d2548e2211d28cfa68d25aceeb4ff06c6a396264dcefe5a2b885ffeaf783"
            },
            "downloads": -1,
            "filename": "OpenCC-1.1.7-cp39-cp39-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "59601077947fc16095a7a1b932053a0b",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": null,
            "size": 716124,
            "upload_time": "2023-10-16T07:30:34",
            "upload_time_iso_8601": "2023-10-16T07:30:34.540917Z",
            "url": "https://files.pythonhosted.org/packages/58/e0/9adbd3983da5bf627a097dbfb81acfa02d68e6e97b8be367968b88dde6f1/OpenCC-1.1.7-cp39-cp39-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-16 07:32:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "BYVoid",
    "github_project": "OpenCC",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "appveyor": true,
    "lcname": "opencc"
}
        
Elapsed time: 0.12318s