Documentation ¶
Overview ¶
Aho–Corasick algorithm Refer to https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm https://www.youtube.com/watch?v=O7_w001f58c https://www.youtube.com/watch?v=OFKxWFew_L0
package sources defines the interface of a "dictionary", input a _string_, get the RAW content in the dictionary, might include the definitions/css files/renderers/...
Index ¶
- Variables
- func GetFromLDOCE(word string) string
- func LoadConfig() error
- func QueryByURL(word string) string
- func QueryMDX(word string, f string) string
- func Restore()
- func Store()
- type AhoCorasick
- type Config
- type Dict
- type DictConfig
- type Dicts
- type Exact
- type Map
- type MdxDict
- type RawOutput
- type Searcher
- type Source
Constants ¶
This section is empty.
Variables ¶
View Source
var G = &Dicts{}
View Source
var Gbold = "**"
View Source
var Gitalic = "*"
Functions ¶
func GetFromLDOCE ¶
func LoadConfig ¶
func LoadConfig() error
func QueryByURL ¶
Types ¶
type AhoCorasick ¶
type AhoCorasick struct {
// contains filtered or unexported fields
}
func (*AhoCorasick) GetRawOutputs ¶
func (ack *AhoCorasick) GetRawOutputs(input string) []RawOutput
type Config ¶
type Config struct {
Dicts []DictConfig `json:"dicts"`
}
type DictConfig ¶ added in v0.0.7
type Exact ¶ added in v0.0.7
type Exact struct {
// contains filtered or unexported fields
}
func (*Exact) GetRawOutputs ¶ added in v0.0.7
type MdxDict ¶
Click to show internal directories.
Click to hide internal directories.