analyze

package
v0.0.1-beta2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SpanishStopWords = StopWords{}/* 443 elements not displayed */

)

Functions

This section is empty.

Types

type CleanTokenizer

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

func NewCleanTokenizer

func NewCleanTokenizer(fns ...cleanFunc) CleanTokenizer

func NewKeepAlphanumericTokenizer

func NewKeepAlphanumericTokenizer() CleanTokenizer

func (*CleanTokenizer) Tokenize

func (c *CleanTokenizer) Tokenize(text string) []string

type Filter

type Filter interface {
	Filter(tokens []string) []string
}

type LowerCaseFilter

type LowerCaseFilter struct{}

func NewLowerCaseTokenizer

func NewLowerCaseTokenizer() LowerCaseFilter

func (LowerCaseFilter) Filter

func (l LowerCaseFilter) Filter(tokens []string) []string

type SpanishStemmerFilter

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

func NewSpanishStemmer

func NewSpanishStemmer(removeStopWords bool) SpanishStemmerFilter

func (SpanishStemmerFilter) Filter

func (s SpanishStemmerFilter) Filter(tokens []string) []string

type StopWords

type StopWords map[string]struct{}

type StopWordsFilter

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

func NewStopWordsFilter

func NewStopWordsFilter(sw StopWords) StopWordsFilter

func (StopWordsFilter) Filter

func (s StopWordsFilter) Filter(tokens []string) []string

type TokenizationPipeline

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

func NewTokenizationPipeline

func NewTokenizationPipeline(t Tokenizer, f ...Filter) TokenizationPipeline

func (*TokenizationPipeline) Tokenize

func (p *TokenizationPipeline) Tokenize(text string) []string

type Tokenizer

type Tokenizer interface {
	Tokenize(text string) []string
}

Jump to

Keyboard shortcuts

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