1
0
mirror of https://github.com/fumiama/jieba.git synced 2026-06-05 08:40:36 +08:00
Files
jieba/dictionary/token.go
2015-05-04 18:20:35 +08:00

24 lines
380 B
Go

package dictionary
type Token struct {
text string
frequency float64
pos string
}
func (t Token) Text() string {
return t.text
}
func (t Token) Frequency() float64 {
return t.frequency
}
func (t Token) Pos() string {
return t.pos
}
func NewToken(text string, frequency float64, pos string) Token {
return Token{text: text, frequency: frequency, pos: pos}
}