Browse Source

Merge remote-tracking branch 'origin/push-dev' into push-test

wangyu 5 years ago
parent
commit
57835038c0

+ 3 - 0
bigdata-web/src/main/java/org/diagbot/bigdata/work/AlgorithmCore.java

@@ -53,6 +53,9 @@ public class AlgorithmCore {
             switch (searchData.getAlgorithmType() == null ? 1 : searchData.getAlgorithmType()) {
                 case 1: //机器学习算法推理
                     executor = AlgorithmFactory.getInstance(classifies[i]);
+                    if (FeatureType.parse(featureTypes[i]) == FeatureType.DIAG) {
+                        searchData.setLength(6);//模型推送最多6个比较合理
+                    }
                     break;
                 case 2: //朴素贝叶斯算法推理
                     if (FeatureType.parse(featureTypes[i]) == FeatureType.DIAG) {

+ 1 - 1
nlp/src/main/resources/nlp.properties

@@ -5,6 +5,6 @@ cache.file.dir=/opt/diagbot-push/cache_file/
 #抽取时——特征提取范围(不限制范围时配置:all)
 extract.feature.num=all
 #推送时——特征提取范围(不限制范围时配置:all)
-push.feature.num=10
+push.feature.num=all
 #是否过滤(0.不过滤 1.过滤)
 extract.feature.filter=0

+ 1 - 1
push-web/src/main/java/org/diagbot/push/controller/AlgorithmController.java

@@ -150,7 +150,7 @@ public class AlgorithmController extends BaseController {
         responseData.setCrisisDetails(crisisApplication.crisisContent(searchData));
 
         //大数据推送
-        searchData.setLength(6);    //模型推送最多6个比较合理
+//        searchData.setLength(6);    //模型推送最多6个比较合理
         AlgorithmCore core = new AlgorithmCore();
         ResponseData bigDataResponseData = core.algorithm(request, searchData, responseData);