mirror of
https://github.com/fumiama/jieba.git
synced 2026-06-22 12:10:30 +08:00
tiny code refactor
This commit is contained in:
3
jieba.go
3
jieba.go
@@ -37,7 +37,8 @@ func (routes Routes) Less(i, j int) bool {
|
|||||||
routej := routes[j]
|
routej := routes[j]
|
||||||
if routei.Freq < routej.Freq {
|
if routei.Freq < routej.Freq {
|
||||||
return true
|
return true
|
||||||
} else if routei.Freq == routej.Freq {
|
}
|
||||||
|
if routei.Freq == routej.Freq {
|
||||||
return routei.Index < routej.Index
|
return routei.Index < routej.Index
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|||||||
Reference in New Issue
Block a user