Skip to content

Magic-Fy/cuttergo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cuttergo

A fast Chinese word cut tool using golang based AC machine algorithm.

Installation

go get github.com/Magic-Fy/cuttergo

Example

package main

import (
	"fmt"
	"github.com/Magic-Fy/cuttergo"
	"strings"
)

func main() {
	wordCutter := cuttergo.Cutter{}
	segs, err := wordCutter.Cut("北京清华大学研究生院")
	if err != nil {
		fmt.Printf("%v\n", err)
		return
	}
	fmt.Printf("'%s'\n", strings.Join(segs, "', '"))
}

//stdout
//

Reference

https://github.com/liwenju0/cutword

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages