This is forked from https://github.com/liuzl/gocc.
package main
import (
"fmt"
"log"
"github.com/MontageApps/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)
//自然语言处理是人工智能领域中的一个重要方向。
//自然語言處理是人工智能領域中的一個重要方向。
}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