Sfoglia il codice sorgente

神清 精神可 二便无殊等体征信息进行过滤,不参与推送

louhr 6 anni fa
parent
commit
eb8affe80c

+ 2 - 0
nlp/src/main/java/org/diagbot/nlp/feature/extract/CaseToken.java

@@ -12,6 +12,7 @@ public abstract class CaseToken {
     protected static String[] ignore_symbol = new String[]{"、", "."};
     protected static String[] stop_symbol = new String[]{"。", ";", "?", ";", "?", "“", "”", "\r", "\n", "[", "]", "{", "}"};
     protected static String[] negative_words = Constants.negative_words;
+    protected static String[] vital_filter_data = Constants.vital_filter_data;
     //找到对应词后,词回退处理游标
     protected int back_cursor = 1;
     protected int searched_position = -1;
@@ -24,6 +25,7 @@ public abstract class CaseToken {
         Arrays.sort(ignore_symbol);
         Arrays.sort(stop_symbol);
         Arrays.sort(negative_words);
+        Arrays.sort(vital_filter_data);
     }
 
     public abstract List<Map<String, Object>> analyze(LexemePath<Lexeme> lexemePath) throws Exception;

+ 5 - 0
nlp/src/main/java/org/diagbot/nlp/feature/extract/CaseTokenFeature.java

@@ -31,6 +31,11 @@ public class CaseTokenFeature extends CaseToken {
             Lexeme lexeme = lexemePath.get(index);
             property = lexeme.getProperty();
             if (NlpUtil.isFeature(property, nees_symptom)) {          //特征词 症状
+                //特定的一些体征描述不需要参与推送
+                searched_position = Arrays.binarySearch(vital_filter_data, lexeme.getText());
+                if (searched_position > -1) {
+                    continue;
+                }
                 lookFeatures(featuresList, index, lexemePath, lexeme, Constants.feature_type_feature, nees_symptom, true);
             }
         }

+ 4 - 0
nlp/src/main/java/org/diagbot/nlp/util/Constants.java

@@ -35,4 +35,8 @@ public class Constants {
     public final static String word_property_time = "2";
     public final static String word_property_unit = "9";
     public final static String word_property_number = "35";
+
+    public static String[] vital_filter_data = new String[] {
+            "神清","神志清","睡眠可","精神可","精神佳","二便无殊","体重无明显减轻","睡眠一般","小便无殊","大便无殊","胃纳可"
+    };
 }

+ 0 - 2
nlp/src/main/resources/synonym.dict

@@ -5095,7 +5095,6 @@ APCA
 神智清|神志清
 神智清楚|神智清
 神智清醒|神智清
-神清|神志清
 神清淡漠|表情淡漠
 神经传导速度+F反应+EMG|神经传导速度检测+肌电图检查
 神经传导速度+F反应+EMG(肛门括约肌)|神经传导速度检测+肌电图检查(肛门括约肌)
@@ -5259,7 +5258,6 @@ APCA
 精液常规|精液检查
 精液果糖|精液果糖测定
 精神分裂症(可疑)|精神分裂症
-精神可|精神佳
 精神尚可|精神佳
 精神恍惚|神志不清
 精神抑郁症|抑郁症

+ 3 - 2
nlp/src/main/resources/tc.dict

@@ -31046,6 +31046,7 @@ zy|9|99
 体重指数|9|60
 体重指数BMI|9|99
 体重无异常|9|62
+体重无明显减轻|9|62
 体重无殊|9|62
 体重表|9|99
 体重计|9|99
@@ -118822,7 +118823,6 @@ zy|9|99
 市井无赖|9|99
 市亩|9|99
 市人民|9|99
-市人民医院|9|99
 市人民医院住院|9|99
 市人民医院就诊配|9|99
 市人民医院巍山|9|99
@@ -226909,6 +226909,7 @@ zy|9|99
 睡相|9|99
 睡眠|9|60
 睡眠-觉醒节律障碍|9|19
+睡眠一般|9|62
 睡眠不佳|9|1
 睡眠不好|9|1
 睡眠不实|9|1
@@ -305644,7 +305645,7 @@ zy|9|99
 部优|9|99
 部会|9|99
 部会首长|9|99
-部位|9|3,99
+部位|9|99
 部位不明确恶性肿瘤(可疑)|9|19
 部位未特指的上呼吸道过敏反应|9|19
 部位未特指的恶性肿瘤|9|19