Package cn.net.pap.neo4j.util.kg
Class PathValue2KGConvert
java.lang.Object
cn.net.pap.neo4j.util.kg.PathValue2KGConvert
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconvertToKnowledgeGraph
(List<List<org.neo4j.driver.internal.value.PathValue>> shortestPaths) 将 List<List> shortestPaths 类型的数据转换为 知识图谱需要的数据结构 convertToKnowledgeGraph2
(List<org.neo4j.driver.internal.value.PathValue> pathValues, String relationKey)
-
Constructor Details
-
PathValue2KGConvert
public PathValue2KGConvert()
-
-
Method Details
-
convertToKnowledgeGraph
public static Map<String,Object> convertToKnowledgeGraph(List<List<org.neo4j.driver.internal.value.PathValue>> shortestPaths) 将 List<List> shortestPaths 类型的数据转换为 知识图谱需要的数据结构 - Parameters:
shortestPaths
-- Returns:
-
convertToKnowledgeGraph2
public static Map<String,Object> convertToKnowledgeGraph2(List<org.neo4j.driver.internal.value.PathValue> pathValues, String relationKey) - Parameters:
pathValues
-relationKey
- 取得是关系部分的属性标签,比如如果是 红楼梦 数据的话,关系类型的属性是 type- Returns:
-