Explorar o código

Merge branch 'main' into wyp/articleSensitive

wangyunpeng hai 11 meses
pai
achega
a1a8ff09d1

+ 2 - 2
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/remote/NLPRemoteService.java

@@ -25,7 +25,7 @@ import java.util.stream.Collectors;
 public class NLPRemoteService {
 
     private final CloseableHttpClient client = HttpPoolFactory.nlpPool();
-    private static final String scoreListUrl = "http://61.48.133.26:8179/score_list";
+    private static final String scoreListUrl = "http://61.48.133.26:6060/score_list";
 
     public Map<String, Double> score(String accountName, List<Content> contentList) {
         long start = System.currentTimeMillis();
@@ -34,7 +34,7 @@ public class NLPRemoteService {
         JSONObject bodyParam = new JSONObject();
         bodyParam.put("account_nickname_list", Collections.singletonList(accountName));
         bodyParam.put("text_list", titleList);
-        bodyParam.put("interest_type", "by_avg");
+        bodyParam.put("interest_type", "avg");
         bodyParam.put("sim_type", "mean");
         bodyParam.put("rate", 0.1);
         int retry = 0;

+ 1 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/rank/strategy/DefaultRankStrategy.java

@@ -80,8 +80,8 @@ public class DefaultRankStrategy implements RankStrategy {
                 }
             }
         }
+        log.info("Sort result {}", JSONUtils.toJson(sortedItems));
         List<Content> contents = CommonCollectionUtils.toList(sortedItems, RankItem::getContent);
-        log.info("Sort result {}", JSONUtils.toJson(contents));
 
         // 3 相似去重
         contents = deduplication(contents);