|
@@ -1,8 +1,8 @@
|
|
package org.diagbot;
|
|
package org.diagbot;
|
|
|
|
|
|
-import org.diagbot.bigdata.common.ApplicationCacheUtil;
|
|
|
|
import org.diagbot.bigdata.work.BigDataParamsProxy;
|
|
import org.diagbot.bigdata.work.BigDataParamsProxy;
|
|
-import org.diagbot.common.work.SearchData;
|
|
|
|
|
|
+import org.diagbot.common.push.bean.SearchData;
|
|
|
|
+import org.diagbot.common.push.cache.ApplicationCacheUtil;
|
|
import org.diagbot.nlp.participle.ParticipleUtil;
|
|
import org.diagbot.nlp.participle.ParticipleUtil;
|
|
import org.diagbot.nlp.participle.cfg.Configuration;
|
|
import org.diagbot.nlp.participle.cfg.Configuration;
|
|
import org.diagbot.nlp.participle.cfg.DefaultConfig;
|
|
import org.diagbot.nlp.participle.cfg.DefaultConfig;
|
|
@@ -43,39 +43,39 @@ public class AddStandWordTest {
|
|
long seconds = endTime - startTime;
|
|
long seconds = endTime - startTime;
|
|
System.out.println("添加标准词使用了:"+splitSeconds + "毫秒.");
|
|
System.out.println("添加标准词使用了:"+splitSeconds + "毫秒.");
|
|
System.out.println("处理文本总共使用了:"+seconds + "毫秒.");*/
|
|
System.out.println("处理文本总共使用了:"+seconds + "毫秒.");*/
|
|
- for (int j = 1; j < 11; j++) {
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- SearchData searchData = new SearchData();
|
|
|
|
- BigDataParamsProxy paramsDataProxy = new BigDataParamsProxy();
|
|
|
|
- searchData.setSymptom("安静时心率98次/分");
|
|
|
|
- searchData.setOther("心率156次/分");
|
|
|
|
- searchData.setVital("男性43岁");
|
|
|
|
- searchData.setLis("Hachinski缺血积分2分");
|
|
|
|
- searchData.setPacs("病程9个月");
|
|
|
|
- searchData.setDiag("BMI12");
|
|
|
|
- String[] items = { searchData.getSymptom(), searchData.getOther(), searchData.getVital()
|
|
|
|
- , searchData.getLis(), searchData.getPacs(), searchData.getDiag() };
|
|
|
|
- String[] itemsType = { "symptom", "other", "vital", "lis", "pacs", "diag" };
|
|
|
|
- long startTime = System.currentTimeMillis();
|
|
|
|
- for (int i = 0; i < items.length; i++) {
|
|
|
|
- if (items[i] != null) {
|
|
|
|
- LexemePath<Lexeme> featureData = ParticipleUtil.participle(items[i]);
|
|
|
|
- if (featureData != null) {
|
|
|
|
- paramsDataProxy.addStandWord(featureData, ApplicationCacheUtil.getKl_result_mapping_standword_map(), searchData, itemsType[i]);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- System.out.println(searchData.getSymptom());
|
|
|
|
- System.out.println(searchData.getOther());
|
|
|
|
- System.out.println(searchData.getVital());
|
|
|
|
- System.out.println(searchData.getLis());
|
|
|
|
- System.out.println(searchData.getPacs());
|
|
|
|
- System.out.println(searchData.getDiag());
|
|
|
|
- long endTime = System.currentTimeMillis();
|
|
|
|
- System.out.println("处理文本总共使用了:" + (endTime - startTime) + "毫秒.");
|
|
|
|
- System.out.println("---------------------------第" + j + "次处理---------------------------------");
|
|
|
|
- }
|
|
|
|
|
|
+// for (int j = 1; j < 11; j++) {
|
|
|
|
+//
|
|
|
|
+//
|
|
|
|
+// SearchData searchData = new SearchData();
|
|
|
|
+// BigDataParamsProxy paramsDataProxy = new BigDataParamsProxy();
|
|
|
|
+// searchData.setSymptom("安静时心率98次/分");
|
|
|
|
+// searchData.setOther("心率156次/分");
|
|
|
|
+// searchData.setVital("男性43岁");
|
|
|
|
+// searchData.setLis("Hachinski缺血积分2分");
|
|
|
|
+// searchData.setPacs("病程9个月");
|
|
|
|
+// searchData.setDiag("BMI12");
|
|
|
|
+// String[] items = { searchData.getSymptom(), searchData.getOther(), searchData.getVital()
|
|
|
|
+// , searchData.getLis(), searchData.getPacs(), searchData.getDiag() };
|
|
|
|
+// String[] itemsType = { "symptom", "other", "vital", "lis", "pacs", "diag" };
|
|
|
|
+// long startTime = System.currentTimeMillis();
|
|
|
|
+// for (int i = 0; i < items.length; i++) {
|
|
|
|
+// if (items[i] != null) {
|
|
|
|
+// LexemePath<Lexeme> featureData = ParticipleUtil.participle(items[i]);
|
|
|
|
+// if (featureData != null) {
|
|
|
|
+// paramsDataProxy.addStandWord(featureData, ApplicationCacheUtil.getKl_result_mapping_standword_map(), searchData, itemsType[i]);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// System.out.println(searchData.getSymptom());
|
|
|
|
+// System.out.println(searchData.getOther());
|
|
|
|
+// System.out.println(searchData.getVital());
|
|
|
|
+// System.out.println(searchData.getLis());
|
|
|
|
+// System.out.println(searchData.getPacs());
|
|
|
|
+// System.out.println(searchData.getDiag());
|
|
|
|
+// long endTime = System.currentTimeMillis();
|
|
|
|
+// System.out.println("处理文本总共使用了:" + (endTime - startTime) + "毫秒.");
|
|
|
|
+// System.out.println("---------------------------第" + j + "次处理---------------------------------");
|
|
|
|
+// }
|
|
// String s = "\tsafGG\tAFASSADG";
|
|
// String s = "\tsafGG\tAFASSADG";
|
|
// System.out.println(s);
|
|
// System.out.println(s);
|
|
// System.out.println(s.trim());
|
|
// System.out.println(s.trim());
|
|
@@ -118,7 +118,7 @@ public class AddStandWordTest {
|
|
int i = 1;
|
|
int i = 1;
|
|
for (Lexeme lexeme : lexemes) {
|
|
for (Lexeme lexeme : lexemes) {
|
|
if (lexeme.getProperty().contains(",")) {
|
|
if (lexeme.getProperty().contains(",")) {
|
|
- ApplicationCacheUtil.setProterty(lexeme);
|
|
|
|
|
|
+// ApplicationCacheUtil.setProterty(lexeme);
|
|
}
|
|
}
|
|
if (lexemes.size() != i) {
|
|
if (lexemes.size() != i) {
|
|
System.out.print(lexeme.getText() + "(" + lexeme.getProperty() + ")|");
|
|
System.out.print(lexeme.getText() + "(" + lexeme.getProperty() + ")|");
|