nlp

package
v12.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AutoLang string = "auto"

AutoLang tries to automatically recognize the language

View Source
var (
	ErrMaxRetriesReached = errors.New("max retries reached")
)

Functions

func NewNLPTokenizer

func NewNLPTokenizer(credentialsFilename string, lang string) tokenize.Tokenizer

NewNLPTokenizer returns a new NLP tokenizer instance

Types

type NLPTokenizer

type NLPTokenizer struct {
	// contains filtered or unexported fields
}

NLPTokenizer tokenizes a text using Google NLP

func (NLPTokenizer) Tokenize

func (nlp NLPTokenizer) Tokenize(ctx context.Context, text string) ([]tokenize.Token, error)

Tokenize tokenizes a text

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL