Authored by Gino Zhang

增加一些屏蔽的token

... ... @@ -115,7 +115,7 @@ public class SuggestConvertorService {
Map<String, Double> matchResult = new HashMap<>();
for (Map.Entry<String, Set<String>> entry : yohoKeywords.entrySet()) {
double score = getMatchScore(entry.getValue(), contentTokenMap);
if (score > 0.0F) {
if (score > 0.0D) {
matchResult.put(entry.getKey(), score);
}
}
... ... @@ -131,7 +131,6 @@ public class SuggestConvertorService {
}
String conversionResult = String.join(",", sortedKeywords);
detailMap.put("conversionResult", conversionResult);
detailMap.put("content", content);
detailMap.put("contentTokenMap", contentTokenMap);
detailMap.put("matchResult", matchResult);
... ...
... ... @@ -63,6 +63,10 @@ public class KeywordCrawlerFlow implements RetryBusinessFlow {
public void init() {
//TODO: 增加忽略的关键词 需要能自行添加
IGNORE_KEYWORDS.add("其他");
IGNORE_KEYWORDS.add("中文");
IGNORE_KEYWORDS.add("中国");
IGNORE_KEYWORDS.add("普通");
IGNORE_KEYWORDS.add("2%");
Set<String> keywordSet = new HashSet<>(1000);
Set<ZSetOperations.TypedTuple<String>> redisResults = yhNoSyncZSetOperations.reverseRangeWithScores(RedisKeys.getRedisKey4Yesterday(RedisKeys.YOHO_SEARCH_KEYWORDS_EMPTY), 0, KEYWORD_COUNT);
... ...