Documentation
¶
Index ¶
- type DictNode
- type Dictionary
- func (dict *Dictionary) AddWord(word, pos string)
- func (dict *Dictionary) AddWords(wordPairs [][]string)
- func (dict *Dictionary) IsStopped(chars []rune, begin, length int) bool
- func (dict *Dictionary) SearchInMain(chars []rune, begin, length int) *Token
- func (dict *Dictionary) SearchWithToken(chars []rune, currentIndex int, token *Token) *Token
- func (dict *Dictionary) StopWord(word, pos string)
- func (dict *Dictionary) StopWords(wordPairs [][]string)
- type Token
- func (token *Token) Begin() int
- func (token *Token) End() int
- func (token *Token) Equals(other *Token) bool
- func (token *Token) GetPrefixNode() *DictNode
- func (token *Token) IsMatch() bool
- func (token *Token) IsMismatch() bool
- func (token *Token) IsPrefix() bool
- func (token *Token) Pos() string
- func (token *Token) SetBegin(begin int)
- func (token *Token) SetEnd(end int)
- func (token *Token) SetMatch()
- func (token *Token) SetMismatch()
- func (token *Token) SetPos(pos string)
- func (token *Token) SetPrefix()
- func (token *Token) SetPrefixNode(node *DictNode)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DictNode ¶
type DictNode struct {
// contains filtered or unexported fields
}
type Dictionary ¶
type Dictionary struct {
// contains filtered or unexported fields
}
func New ¶
func New() *Dictionary
func (*Dictionary) AddWord ¶
func (dict *Dictionary) AddWord(word, pos string)
func (*Dictionary) AddWords ¶
func (dict *Dictionary) AddWords(wordPairs [][]string)
func (*Dictionary) IsStopped ¶
func (dict *Dictionary) IsStopped(chars []rune, begin, length int) bool
func (*Dictionary) SearchInMain ¶
func (dict *Dictionary) SearchInMain(chars []rune, begin, length int) *Token
func (*Dictionary) SearchWithToken ¶
func (dict *Dictionary) SearchWithToken(chars []rune, currentIndex int, token *Token) *Token
func (*Dictionary) StopWord ¶
func (dict *Dictionary) StopWord(word, pos string)
func (*Dictionary) StopWords ¶
func (dict *Dictionary) StopWords(wordPairs [][]string)
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
func (*Token) GetPrefixNode ¶
func (*Token) IsMismatch ¶
func (*Token) SetMismatch ¶
func (token *Token) SetMismatch()
func (*Token) SetPrefixNode ¶
Click to show internal directories.
Click to hide internal directories.