Gocc
Golang version OpenCC 繁簡轉換
Install / Use
/learn @liuzl/GoccREADME
gocc - Golang version OpenCC
Introduction 介紹
gocc is a golang port of OpenCC(Open Chinese Convert 開放中文轉換) which is a project for conversion between Traditional and Simplified Chinese developed by BYVoid.
gocc stands for "Golang version OpenCC", it is a total rewrite version of OpenCC in Go. It just borrows the dict files and config files of OpenCC, so it may not produce the same output with the original OpenCC.
Installation 安裝
1, golang package
go get github.com/liuzl/gocc
2, Command Line
git clone https://github.com/liuzl/gocc
cd gocc/cmd
make install
gocc --help
echo "我们是工农子弟兵" | gocc
#我們是工農子弟兵
Usage 使用
package main
import (
"fmt"
"log"
"github.com/liuzl/gocc"
)
func main() {
s2t, err := gocc.New("s2t")
if err != nil {
log.Fatal(err)
}
in := `自然语言处理是人工智能领域中的一个重要方向。`
out, err := s2t.Convert(in)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n%s\n", in, out)
//自然语言处理是人工智能领域中的一个重要方向。
//自然語言處理是人工智能領域中的一個重要方向。
}
Conversions
s2tSimplified Chinese to Traditional Chineset2sTraditional Chinese to Simplified Chineses2twSimplified Chinese to Traditional Chinese (Taiwan Standard)tw2sTraditional Chinese (Taiwan Standard) to Simplified Chineses2hkSimplified Chinese to Traditional Chinese (Hong Kong Standard)hk2sTraditional Chinese (Hong Kong Standard) to Simplified Chineses2twpSimplified Chinese to Traditional Chinese (Taiwan Standard) with Taiwanese idiomtw2spTraditional Chinese (Taiwan Standard) to Simplified Chinese with Mainland Chinese idiomt2twTraditional Chinese (OpenCC Standard) to Taiwan Standardt2hkTraditional Chinese (OpenCC Standard) to Hong Kong Standard
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
