/gojianfan

Traditional and Simplified Chinese Conversion in Go

Primary LanguageGoThe UnlicenseUnlicense

Traditional and Simplified Chinese Conversion in Go

https://goreportcard.com/badge/github.com/siongui/gojianfan https://img.shields.io/twitter/url/https/github.com/siongui/gojianfan.svg?style=social

Convert Traditional Chinese to/from Simplified Chinese in Go. This implementation is based on python-jianfan, and is very primitive. If you need advanced converter, visit OpenCC project, or pure Go implementation of OpenCC [13].

Install

$ go get -u github.com/siongui/gojianfan

Usage

package main

import (
      "fmt"
      "github.com/siongui/gojianfan"
)

func main() {
      // Traditional Chinese to Simplified Chinese
      fmt.Println(gojianfan.T2S("橋頭"))

      // Simplified Chinese to Traditional Chinese
      fmt.Println(gojianfan.S2T("桥头"))
}

Tested on:

UNLICENSE

Released in public domain. See UNLICENSE.

References

[1]Jianfan - A python library for translation between traditional and simplified chinese
[2]
[3]
[4]
[5]
[6]開放中文轉換 Open Chinese Convert (OpenCC) (source code, online doc)
[7]stevenyao/go-opencc · GitHub (OpenCC wrapper for Golang, godoc1)
[8][Golang] Converter for Traditional and Simplified Chinese
[9]godoctricks - GoDoc
[10]
[11]Go Report Card | Go project code quality report cards
[12]Shields.io: Quality metadata badges for open source projects
[13]