mirror of
https://github.com/fumiama/jieba.git
synced 2026-06-05 00:32:51 +08:00
put dictionary to a seperated module
This commit is contained in:
19
dictionary/token.go
Normal file
19
dictionary/token.go
Normal file
@@ -0,0 +1,19 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user