|
@@ -99,17 +99,22 @@ public class EntityProcessEZaAll extends EntityProcess {
|
|
|
|
|
|
//肯定
|
|
|
List<Lemma> diaList = createEntityTree(aiOut, EntityEnum.DIEASE.toString());
|
|
|
- List<Lemma> diaTimeList = createEntityTree(aiOut, EntityEnum.TIME.toString());
|
|
|
if(ListUtil.isEmpty(diaList)){
|
|
|
diaList = createEntityTree(aiOut, EntityEnum.INJURY.toString());
|
|
|
}
|
|
|
for (Lemma lemma : diaList) {
|
|
|
+ String text = lemma.getText();
|
|
|
+ if (lemma.isHaveChildren()) {
|
|
|
+ for (Lemma relationLemmaRec : lemma.getRelationLemmas()) {
|
|
|
if(!diagSet.contains(lemma.getText())){
|
|
|
- if(diaTimeList.size()==1 && diaList.size()==1){
|
|
|
- diagRetSet.add(diaTimeList.get(0).getText()+lemma.getText());
|
|
|
+ if(relationLemmaRec.getProperty().equals(EntityEnum.TIME.toString())){
|
|
|
+ diagRetSet.add(relationLemmaRec.getText()+text);
|
|
|
+ }else{
|
|
|
+ diagRetSet.add(text);
|
|
|
}
|
|
|
- diagRetSet.add(lemma.getText());
|
|
|
}
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
if(null != diagRetSet && diagRetSet.size()>0){
|
|
|
for (String str : diagRetSet) {
|