Documentation
¶
Index ¶
- func FilterStopword(sw Stopwords, in iter.Seq[*Token]) (out iter.Seq[*Token])
- func FinishStemmer(raw []byte, keep int, fold func([]byte) []byte) ([]byte, bool)
- func HasSuffixFold(b []byte, suf string) bool
- func NeedsFold(b []byte) bool
- func TokenizeWithStemmer(in []byte, stem Stemmer) iter.Seq[*Token]
- type Stemmer
- type Stopwords
- type Token
- type Tokenizer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FinishStemmer ¶
FinishStemmer returns a borrowed sub slice when the kept prefix needs no rewriting, otherwise the folded allocation. fold lowers and, for Spanish, strips accents.
func HasSuffixFold ¶
Types ¶
type Stemmer ¶
Stemmer normalizes one raw token. It returns the term and whether the term is an owned allocation (true) or a sub slice of raw (false).
Click to show internal directories.
Click to hide internal directories.