소스 검색

优化同义词转换

zhoutg 3 년 전
부모
커밋
4e63ab258f
1개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 5 4
      src/main/java/com/diagbot/facade/CommonFacade.java

+ 5 - 4
src/main/java/com/diagbot/facade/CommonFacade.java

@@ -527,12 +527,13 @@ public class CommonFacade {
             for (String s : wordList) {
                 String value = redisUtil.get(type + "Conv:" + s);
                 if (value == null) {
-                    StandConvertCrfVO standConvertCrfVO = new StandConvertCrfVO();
-                    standConvertCrfVO.setWord_type(type);
-                    standConvertCrfVO.setWord(s);
-                    standConvertCrfVOList.add(standConvertCrfVO);
+                    // 去重添加
                     if (!convertList.contains(s)) {
                         convertList.add(s);
+                        StandConvertCrfVO standConvertCrfVO = new StandConvertCrfVO();
+                        standConvertCrfVO.setWord_type(type);
+                        standConvertCrfVO.setWord(s);
+                        standConvertCrfVOList.add(standConvertCrfVO);
                     }
                 }
             }