Authored by Gino Zhang

增加一些屏蔽的token

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