Skip to content
Traditional and Simplified Chinese Conversion in Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
gopherjs
.travis.yml
Makefile
README.rst
UNLICENSE
charsets.go
jianfan.go
jianfan_test.go

README.rst

Traditional and Simplified Chinese Conversion in Go

https://godoc.org/github.com/siongui/gojianfan?status.png https://api.travis-ci.org/siongui/gojianfan.png?branch=master 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.

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
You can’t perform that action at this time.