|
@@ -24,25 +24,6 @@ import java.util.*;
|
|
**/
|
|
**/
|
|
public class ParamsDataProxy {
|
|
public class ParamsDataProxy {
|
|
Logger logger = LoggerFactory.getLogger(ParamsDataProxy.class);
|
|
Logger logger = LoggerFactory.getLogger(ParamsDataProxy.class);
|
|
- //标准词只处理的词性
|
|
|
|
- public static NegativeEnum[] negativeEnums = new NegativeEnum[] { NegativeEnum.VITAL_INDEX, NegativeEnum.SYMPTOM
|
|
|
|
- , NegativeEnum.DIGITS, NegativeEnum.EVENT_TIME, NegativeEnum.UNIT, NegativeEnum.DIAG_STAND
|
|
|
|
- , NegativeEnum.OTHER };
|
|
|
|
- //标准词处理的三元组
|
|
|
|
- public static NegativeEnum[][] negativeEnumTriple = {
|
|
|
|
- { NegativeEnum.VITAL_INDEX, NegativeEnum.DIGITS, NegativeEnum.UNIT },
|
|
|
|
- { NegativeEnum.VITAL_INDEX, NegativeEnum.DIGITS, NegativeEnum.EVENT_TIME },
|
|
|
|
- { NegativeEnum.SYMPTOM, NegativeEnum.DIGITS, NegativeEnum.UNIT },
|
|
|
|
- { NegativeEnum.SYMPTOM, NegativeEnum.DIGITS, NegativeEnum.EVENT_TIME },
|
|
|
|
- { NegativeEnum.DIAG_STAND, NegativeEnum.DIGITS, NegativeEnum.UNIT },
|
|
|
|
- { NegativeEnum.DIAG_STAND, NegativeEnum.DIGITS, NegativeEnum.EVENT_TIME },
|
|
|
|
- { NegativeEnum.DIAG_STAND, NegativeEnum.DIGITS, NegativeEnum.OTHER }
|
|
|
|
- };
|
|
|
|
- //标准词处理的二元组
|
|
|
|
- public static NegativeEnum[][] negativeEnumTwoTuple = {
|
|
|
|
- { NegativeEnum.VITAL_INDEX, NegativeEnum.DIGITS },
|
|
|
|
- { NegativeEnum.SYMPTOM, NegativeEnum.DIGITS }
|
|
|
|
- };
|
|
|
|
|
|
|
|
public void createNormalInfo(SearchData searchData) throws Exception {
|
|
public void createNormalInfo(SearchData searchData) throws Exception {
|
|
//计算年龄区间
|
|
//计算年龄区间
|
|
@@ -142,11 +123,11 @@ public class ParamsDataProxy {
|
|
if (!StringUtils.isEmpty(searchData.getPacs())) {
|
|
if (!StringUtils.isEmpty(searchData.getPacs())) {
|
|
//关系抽取模型
|
|
//关系抽取模型
|
|
AlgorithmCNNExecutorPacs algorithmCNNExecutor = RelationExtractionFactory.getInstance();
|
|
AlgorithmCNNExecutorPacs algorithmCNNExecutor = RelationExtractionFactory.getInstance();
|
|
- RelationExtractionCreateSearchData re = new RelationExtractionCreateSearchData();
|
|
|
|
|
|
+ RelationExtractionUtil re = new RelationExtractionUtil();
|
|
//Pacs原始分词结果
|
|
//Pacs原始分词结果
|
|
- List<List<String>> execute = algorithmCNNExecutor.execute(searchData.getPacs(), re.createSearchData(searchData));
|
|
|
|
|
|
+ List<List<String>> execute = algorithmCNNExecutor.execute(searchData.getPacs(), re.createTriad(searchData));
|
|
if (execute != null && execute.size() > 0) {
|
|
if (execute != null && execute.size() > 0) {
|
|
- re.start(execute, searchData);
|
|
|
|
|
|
+ re.addToSearchDataInputs(execute, searchData);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|