Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/euskadi31/go-ngram

an n-gram is a contiguous sequence of n items from a given sequence of text or speech.
https://github.com/euskadi31/go-ngram

go golang golang-library machine-learning ngram ngram-analysis ngrams nlp

Last synced: 30 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# Ngram for Golang ![Last release](https://img.shields.io/github/release/euskadi31/go-ngram.svg)

[![Go Report Card](https://goreportcard.com/badge/github.com/euskadi31/go-ngram)](https://goreportcard.com/report/github.com/euskadi31/go-ngram)

| Branch | Status | Coverage |
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| master | [![Go](https://github.com/euskadi31/go-ngram/actions/workflows/go.yml/badge.svg)](https://github.com/euskadi31/go-ngram/actions/workflows/go.yml) | [![Coveralls](https://img.shields.io/coveralls/euskadi31/go-ngram/master.svg)](https://coveralls.io/github/euskadi31/go-ngram?branch=master) |

> an **_n_-gram** is a contiguous sequence of _n_ items from a given sequence of text or speech.

```go
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](LICENSE.md).