Sign inSign up

giterhub/opencc

By giterhub

•Updated about 1 month ago

一个提供 OpenCC API 及网页服务的镜像

Image
Web servers
2

7.4K

giterhub/opencc repository overview

⁠OpenCC Server & Web

一个提供 OpenCC API 及网页服务的镜像。

在线示例⁠。

⁠Quickstart

# pull
docker pull giterhub/opencc:latest

# run
docker run -d \
    --name opencc
    --restart unless-stopped \
    -p 8900:8900 \
    giterhub/opencc:latest

⁠Usage

⁠API Server
地址请求方法Body 类型Body 参数响应
/apiPOSTtext/plain 或 application/json{ "type": "<类型>", "content": "<内容>" }{ "code": 0, "result": "<结果>" }
⁠Type
类型描述
s2t简体 → 繁体(OpenCC 标准)
t2s繁体(OpenCC 标准) → 简体
s2hk简体 → 香港繁体
hk2s香港繁体 → 简体
s2tw简体 → 台湾正体
tw2s台湾正体 → 简体
s2hkp简体 → 香港繁体(香港常用词汇模式)
hk2sp香港繁体 → 简体(中国大陆常用词汇模式)
s2twp简体 → 台湾正体(台湾常用词汇模式)
tw2sp台湾正体 → 简体(中国大陆常用词汇模式)
t2hk繁体(OpenCC 标准) → 香港繁体
hk2t香港繁体 → 繁体(OpenCC 标准)
t2tw繁体(OpenCC 标准) → 台湾正体
tw2t台湾正体 → 繁体(OpenCC 标准)
t2jp日文旧字体 → 日文新字体
jp2t日文新字体 → 日文旧字体
⁠示例
curl -d '{"type":"s2twp","content":"软件"}' http://localhost:8900/api
⁠Web

地址:http://localhost:8900。

web

⁠Credits

Tag summary

Content type

Image

Digest

sha256:688c3365d…

Size

48.7 MB

Last updated

about 1 month ago

docker pull giterhub/opencc