Versions in this module Expand all Collapse all v1 v1.1.0 Aug 11, 2021 Changes in this version + type ASCII struct + func NewASCII() *ASCII + func (a ASCII) Transform(s string) (string, error) + type Document struct + Text string + Tokens []string + func NewDocument(text string, opts ...Option) (*Document, error) + func NewDocumentFromReader(text io.Reader, opts ...Option) (*Document, error) + func (d Document) Compare(tokens Tokens) (bool, []rune) + func (d Document) CompareRune(a, b rune) bool + func (d Document) IsEqual(a, b []rune) bool + func (d Document) Scan(docs ...Documenter) Matches + func (d Document) String() string + type Documenter interface + Compare func(ref Tokens) (bool, []rune) + CompareRune func(a, b rune) bool + IsEqual func(a, b []rune) bool + type Mapper interface + AddIndex func(v string, index int) Mapping + Items func() map[string][]int + Map func() Tokens + type Mapping map[string][]int + func NewMappingFromTokens(tokens []string) Mapping + func (m Mapping) AddIndex(v string, index int) Mapping + func (m Mapping) Items() map[string][]int + func (m Mapping) Map() Tokens + type Matches map[int][]rune + type Option func(*Document) + func WithConditionalMatchScore(f func(int, int) bool) Option + func WithCustomRegexpTokenizer(t *tokenize.RegexpTokenizer) Option + func WithHMTLParsing() Option + func WithMinimumMatchScore(score int) Option + func WithReplacer(pattern *regexp.Regexp, rep string) Option + func WithSequentialEqualCharsRemoval() Option + func WithSetLower() Option + func WithSetUpper() Option + func WithTransform(t Transformer) Option + type Scanner interface + Scan func(docs ...Documenter) Matches + type Tokens struct + Ids []int + Values map[int][]rune + func (t Tokens) GetRunesByID(id int) []rune + type Transformer interface + Transform func(s string) (string, error) v1.0.0 Jul 20, 2021