Versions in this module Expand all Collapse all v0 v0.1.0 Aug 7, 2026 Changes in this version + type CountPolicy struct + func NewCountPolicy(maxCount int) *CountPolicy + func (p *CountPolicy) Depth(segments int) int + type FixedPolicy struct + func NewFixedPolicy(depth int) *FixedPolicy + func (p *FixedPolicy) Depth(segments int) int + type LinearPolicy struct + func NewLinearPolicy(shortLen, shortDepth, longLen, longDepth int) *LinearPolicy + func (p *LinearPolicy) Depth(segments int) int + type Option func(*Tokenizer) + func WithLanguage(rt *unicode.RangeTable) Option + func WithLanguages(tables ...*unicode.RangeTable) Option + func WithPolicy(p Policy) Option + type Policy interface + Depth func(segments int) int + type RuneClass int + const ClassDigit + const ClassLetter + const ClassOther + const ClassPunct + type TokenInfo struct + Base [2]int + Language int + type Tokenizer struct + func New(opts ...Option) *Tokenizer + func (t *Tokenizer) Tokenize(source string) map[string]TokenInfo