mirror of
https://github.com/fumiama/jieba.git
synced 2026-06-13 13:40:28 +08:00
small refactor according to go vet check results
This commit is contained in:
@@ -50,14 +50,14 @@ func (d *Dictionary) updateLogTotal() {
|
||||
d.logTotal = math.Log(d.total)
|
||||
}
|
||||
|
||||
func (d Dictionary) Frequency(key string) (float64, bool) {
|
||||
func (d *Dictionary) Frequency(key string) (float64, bool) {
|
||||
d.RLock()
|
||||
freq, ok := d.freqMap[key]
|
||||
d.RUnlock()
|
||||
return freq, ok
|
||||
}
|
||||
|
||||
func (d Dictionary) Pos(key string) (string, bool) {
|
||||
func (d *Dictionary) Pos(key string) (string, bool) {
|
||||
d.RLock()
|
||||
pos, ok := d.posMap[key]
|
||||
d.RUnlock()
|
||||
|
||||
Reference in New Issue
Block a user