Documentation
¶
Index ¶
- Variables
- func Count(input string, cfg *Config) (count int)
- func List(input string, cfg *Config) (list []string)
- func Parse(input string, cfg *Config) (words []string)
- func Range(input string, cfg *Config, fn func(word string))
- func Search(query, content string, cfg *Config) (score int, present []string)
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultPunctuation = []rune{ ',', ',', '.', '。', ':', ':', ';', ';', '[', ']', '【', ']', '】', '{', '{', '}', '}', '(', '(', ')', ')', '<', '《', '>', '》', '$', '¥', '!', '!', '?', '?', '~', '~', '\'', '’', '"', '“', '”', '*', '/', '\\', '&', '%', '@', '#', '^', '、', '、', '、', '、', } RxSpaces = regexp.MustCompile(`\s+`) RxSymbols = regexp.MustCompile(`\p{S}`) RxCharSets = regexp.MustCompile(`[\p{Han}\p{Katakana}\p{Hiragana}\p{Hangul}]`) )
Functions ¶
Types ¶
type Config ¶
func DefaultConfig ¶
func DefaultConfig() (cfg *Config)
Click to show internal directories.
Click to hide internal directories.