Documentation ¶
Index ¶
- type KeywordProcessor
- func (kp *KeywordProcessor) AddKeyWord(keyword string) *KeywordProcessor
- func (kp *KeywordProcessor) AddKeywordsFromList(keywords []string) *KeywordProcessor
- func (kp *KeywordProcessor) Build()
- func (kp *KeywordProcessor) ExtractKeywords(sentence string) []Match
- func (kp *KeywordProcessor) ExtractKeywordsFromBytes(sentence []byte) []Match
- type Match
- type Node
- type WalkFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeywordProcessor ¶
type KeywordProcessor struct {
// contains filtered or unexported fields
}
func NewKeywordProcessor ¶
func NewKeywordProcessor(caseSensitive bool) *KeywordProcessor
func (*KeywordProcessor) AddKeyWord ¶
func (kp *KeywordProcessor) AddKeyWord(keyword string) *KeywordProcessor
func (*KeywordProcessor) AddKeywordsFromList ¶
func (kp *KeywordProcessor) AddKeywordsFromList(keywords []string) *KeywordProcessor
func (*KeywordProcessor) Build ¶
func (kp *KeywordProcessor) Build()
func (*KeywordProcessor) ExtractKeywords ¶
func (kp *KeywordProcessor) ExtractKeywords(sentence string) []Match
ExtractKeywords 匹配关键词
func (*KeywordProcessor) ExtractKeywordsFromBytes ¶
func (kp *KeywordProcessor) ExtractKeywordsFromBytes(sentence []byte) []Match
type Match ¶
type Match struct {
// contains filtered or unexported fields
}
func (*Match) MatchString ¶
Click to show internal directories.
Click to hide internal directories.