plimble / tsplitter

Thai word break written in GO

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tsplitter godoc badge gocover badge Build Status Go Report Card

Thai word break written in GO

Installation

go get -u github.com/plimble/tsplitter

Example

#####Get all words

  func main(){
    dict := NewFileDict("dictionary.txt")
    txt := "ตัดคำไทย"
    words := Split(dict, txt)
    fmt.Println(words.All()) //ตัด, คำ, ไทย
  }

#####Get deduplicate word

  func main(){
    dict := NewFileDict("dictionary.txt")
    txt := "ตัดคำไทย"
    words := Split(dict, txt)
    fmt.Println(words.Known())
    fmt.Println(words.Unknown())
  }

Documentation

###Contributing

If you'd like to help out with the project. You can put up a Pull Request.

About

Thai word break written in GO

License:Apache License 2.0


Languages

Language:Go 100.0%