|
@@ -657,6 +657,8 @@ public class Neo4jAPI {
|
|
query = "match (l)-[r:近义词]->(m)\n" +
|
|
query = "match (l)-[r:近义词]->(m)\n" +
|
|
"where l.name in " + fildList + "\n" +
|
|
"where l.name in " + fildList + "\n" +
|
|
"return l.name as zi,type(r),m.name as fu";
|
|
"return l.name as zi,type(r),m.name as fu";
|
|
|
|
+// System.out.println("近义词语句:");
|
|
|
|
+// System.out.println(query);
|
|
result = session.run(query);
|
|
result = session.run(query);
|
|
while (result.hasNext()) {
|
|
while (result.hasNext()) {
|
|
Record record = result.next();
|
|
Record record = result.next();
|
|
@@ -665,6 +667,7 @@ public class Neo4jAPI {
|
|
fildList.remove(c);
|
|
fildList.remove(c);
|
|
fildList.add(d);
|
|
fildList.add(d);
|
|
}
|
|
}
|
|
|
|
+// System.out.println("参与计算的词:"+fildList);
|
|
newList.addAll(fildList);
|
|
newList.addAll(fildList);
|
|
int i = 0;
|
|
int i = 0;
|
|
while (newList.size() > 0) {
|
|
while (newList.size() > 0) {
|
|
@@ -676,6 +679,8 @@ public class Neo4jAPI {
|
|
"match (n)-[r:诊断依据]->(m)\n" +
|
|
"match (n)-[r:诊断依据]->(m)\n" +
|
|
"where n.name= row\n" +
|
|
"where n.name= row\n" +
|
|
"return m.name as condition, count(distinct r)>=m.path as jundgement, labels(m)[0] as label";
|
|
"return m.name as condition, count(distinct r)>=m.path as jundgement, labels(m)[0] as label";
|
|
|
|
+// System.out.println("第"+i+"次查询:");
|
|
|
|
+// System.out.println(query);
|
|
result = session.run(query);
|
|
result = session.run(query);
|
|
newList.clear();
|
|
newList.clear();
|
|
while (result.hasNext()) {
|
|
while (result.hasNext()) {
|
|
@@ -695,6 +700,8 @@ public class Neo4jAPI {
|
|
"where n.name=row\n" +
|
|
"where n.name=row\n" +
|
|
"with distinct m,r\n" +
|
|
"with distinct m,r\n" +
|
|
"return m.name as name, labels(m)[0] as label,type(r) as relationType";
|
|
"return m.name as name, labels(m)[0] as label,type(r) as relationType";
|
|
|
|
+// System.out.println("查询确诊和拟诊:");
|
|
|
|
+// System.out.println(query);
|
|
|
|
|
|
result = session.run(query);
|
|
result = session.run(query);
|
|
while (result.hasNext()) {
|
|
while (result.hasNext()) {
|