Giter Site home page Giter Site logo

go-cc / cc-jianfan Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 30 KB

Chinese-Character Jian<=>Fan converting library in Go

License: MIT License

Go 100.00%
golang go golang-library golang-examples golang-tools language chinese chinese-characters chinese-simplified chinese-traditional chinese-translation

cc-jianfan's Introduction

cc-jianfan

MIT License GoDoc Go Report Card travis Status

TOC

中文简繁互转
Chinese-Character Jian<=>Fan converter

API

> jianfan_test.go

package ccst_test

import (
	"fmt"

	ccst "github.com/go-cc/cc-jianfan"
)

// for standalone test, change package to main and the next func def to,
// func main() {
func Example_output() {
	sj := "看书学习。\n名著:《红楼梦》〖清〗曹雪芹 著、高鹗 续/『人民文学』出版社/1996—9月30日/59.70【元】,《三国演义》〖明〗罗贯中。"

	sf := ccst.S2T(sj)
	fmt.Println(sf)
	// Output:
	//   not here!
	fmt.Println(ccst.T2S(sf))
	sj = ccst.T2S("增補臺灣標準IT詞彙。")
	fmt.Println(sj)
	fmt.Println(ccst.S2T(sj))

	// Output:
	// 看書學習。
	// 名著:《紅樓夢》〖清〗曹雪芹 著、高鶚 續/『人民文學』齣版社/1996—9月30日/59.70【元】,《三國演義》〖明〗羅貫中。
	// 看书学习。
	// 名著:《红楼梦》〖清〗曹雪芹 著、高鹗 续/『人民文学』出版社/1996—9月30日/59.70【元】,《三国演义》〖明〗罗贯中。
	// 增补**标准IT词汇。
	// 增補臺灣標準IT詞匯。
}

All patches welcome.

Credits

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.