Skip to content

an n-gram is a contiguous sequence of n items from a given sequence of text or speech.

License

Notifications You must be signed in to change notification settings

euskadi31/go-ngram

Repository files navigation

Ngram for Golang Last release

Go Report Card

Branch Status Coverage
master Go Coveralls

an n-gram is a contiguous sequence of n items from a given sequence of text or speech.

import (
    "fmt"

    "github.com/euskadi31/go-ngram"
)

func main() {
    tokens := ngram.New(ngram.Bigram).Tokenize("Hello")

    fmt.Printf("%v\n", tokens) // ["He", "el", "ll", "lo"]
}

License

go-ngram is licensed under the MIT license.