|
@@ -3,6 +3,7 @@ package public
|
|
|
import (
|
|
|
"math/rand"
|
|
|
. "qfw/util"
|
|
|
+ "regexp"
|
|
|
"sort"
|
|
|
"strings"
|
|
|
"sync"
|
|
@@ -83,6 +84,10 @@ func (rk *recomKws) GetRecomKws(value string, count int) []*map[string]interface
|
|
|
if strings.HasSuffix(p.Word, "路") || DealString(p.Word) {
|
|
|
continue
|
|
|
}
|
|
|
+ hzRegexp := regexp.MustCompile("[^A-Za-z0-9\u4e00-\u9fa5]")
|
|
|
+ if hzRegexp.MatchString(p.Word) {
|
|
|
+ continue //过滤乱码
|
|
|
+ }
|
|
|
lock.Lock()
|
|
|
if !wordMap[p.Word] {
|
|
|
sl.List = append(sl.List, &map[string]interface{}{
|