func NewNGramAnalyzer(min, max int) *Analyzer { return &Analyzer{ charFilters: []char.Filter{ char.NewRemovePunctuationFilter(), char.NewNorwegianFoldingFilter()}, tokenizer: NewNGramTokenizer(min, max), tokenFilters: []token.Filter{token.NewLowerCaseFilter()}, Idx: index.NewMapIndex(), } }
func NewStandardAnalyzer() *Analyzer { return &Analyzer{ charFilters: []char.Filter{ char.NewRemovePunctuationFilter(), char.NewNorwegianFoldingFilter()}, tokenizer: NewWhiteSpaceTokenizer(), tokenFilters: []token.Filter{token.NewLowerCaseFilter()}, Idx: index.NewMapIndex(), } }