A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
-bash/zsh: opencc command not found #Windows (WSL2) sudo apt-get update sudo apt-get install opencc #Debian apt-get install opencc #Ubuntu apt-get install opencc #Arch Linux pacman -S opencc #Kali Linux apt-get install opencc #CentOS yum install opencc #Fedora dnf install opencc #OS X brew install opencc #Raspbian apt-get install opencc #Node.js npm i install opencc #Dockerfile dockerfile.run/opencc #Windows Windows (64-bit): https://ci.appveyor.com/api/projects/Carbo/opencc/artifacts/OpenCC.zip?branch=master&job=Environment:%20nodejs_version=none;%20Platform:%20x64 Windows (32-bit): https://ci.appveyor.com/api/projects/Carbo/opencc/artifacts/OpenCC.zip?branch=master&job=Environment:%20nodejs_version=none;%20Platform:%20x86
opencc 是一个用于在繁体中文和简体中文之间转换字符的库。该软件包包括转换工具。
opencc 是目前感觉最好的中文简繁转换开源项目,支持词汇级别的转换、异体字转换和地区习惯用词转换(中国大陆、台湾、香港、日本新字体)。暂不提供普通话与粤语的转换。
Windows 编译好的版本在 Github 的 Wiki Download 下:https://github.com/BYVoid/OpenCC/wiki/Download
opencc [--noflush <bool>] [-i <file>] [-o <file>] [-c <file>] [--] [--version] [-h]
--noflush <bool> 为每行禁用刷新 -i <file>, --input <file> 从文件中读取 -o <file>, --output <file> 输出到文件 -c <file>, --config <file> 简繁转换的 JSON 配置文件 --, --ignore_rest 忽略此标志后面的其余标记参数。 --version 显示 opencc 的版本 -h, --help 显示 opencc 的帮助信息 Open Chinese Convert (OpenCC) Command Line Tool
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 标准)opencc 转换文件的简繁体:
opencc -i 简体中文.txt -o 台湾繁体中文.txt -c s2tw.json opencc -i 简体中文.txt -o 香港繁体中文.txt -c s2hk.json opencc -i 简体中文.txt -o 通用繁体中文.txt -c s2t.json
如上,如果希望繁体转换为简体中文,-i 和 -o 反过来,配置文件用 t2s.json
等即可。