Forráskód Böngészése

1、模型没有返回数据例外处理

louhr 5 éve
szülő
commit
e0e76dfb96

+ 2 - 0
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/process/EntityProcess.java

@@ -46,6 +46,8 @@ public class EntityProcess {
         JSONArray entitys = annotation.getJSONArray("T");
         JSONArray relations = annotation.getJSONArray("R");
 
+        if (entitys == null || entitys.isEmpty()) return resultLemmaList;
+
         List<Lemma> allLemmaList = loadAllLemmaList(entitys);
         List<String> relationIds = new ArrayList<>();
         for (Lemma l : allLemmaList) {