Commit b4158551 by hxw

update

parent 778bd62c
...@@ -191,9 +191,10 @@ public class ProcessQuestion { ...@@ -191,9 +191,10 @@ public class ProcessQuestion {
String pair[]; String pair[];
HashSet<String> keyWordSet = null; HashSet<String> keyWordSet = null;
for(String premise:premisesString) { for(String premise:premisesString) {
System.out.println(premise);
if (premise.equals("") || premise.equals(" ")) if (premise.equals("") || premise.equals(" "))
continue; continue;
pair = premise.split("="); pair = premise.split("=", 2);
keyWordSet = new HashSet<String>(); keyWordSet = new HashSet<String>();
for (String keyword : pair[1].split("\\+")) for (String keyword : pair[1].split("\\+"))
//为了处理条件不满足(为空)时的特殊情况, //为了处理条件不满足(为空)时的特殊情况,
...@@ -373,7 +374,7 @@ public class ProcessQuestion { ...@@ -373,7 +374,7 @@ public class ProcessQuestion {
comparePair = premiseStr.split("::"); comparePair = premiseStr.split("::");
actionName = comparePair[0]; actionName = comparePair[0];
keywords = curInfoPoint.get(actionName); keywords = curInfoPoint.get(actionName);
if (keywords == null || keywords[0].equals("")) { if (keywords == null) {
flag = false; flag = false;
break; break;
} }
...@@ -395,7 +396,7 @@ public class ProcessQuestion { ...@@ -395,7 +396,7 @@ public class ProcessQuestion {
actionName = comparePair[0]; actionName = comparePair[0];
keyword = historyInfoPoint.get(actionName); keyword = historyInfoPoint.get(actionName);
if(keyword == null || keyword.equals("")){ if(keyword == null){
flag = false; flag = false;
break; break;
} }
...@@ -697,7 +698,7 @@ public class ProcessQuestion { ...@@ -697,7 +698,7 @@ public class ProcessQuestion {
debugInfo += (" " + key + ":" + value + " "); debugInfo += (" " + key + ":" + value + " ");
} }
ans.setAnswer( debugInfo + ")" + ans.getAnswer()); ans.setAnswer( debugInfo + ") " + ans.getAnswer());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment