diff --git a/dsRag/Doc/知识图谱.txt b/dsRag/Doc/12、知识图谱.txt similarity index 100% rename from dsRag/Doc/知识图谱.txt rename to dsRag/Doc/12、知识图谱.txt diff --git a/dsRag/Neo4j/N1_ReadZsd.py b/dsRag/Neo4j/N1_KG_Zsd.py similarity index 100% rename from dsRag/Neo4j/N1_ReadZsd.py rename to dsRag/Neo4j/N1_KG_Zsd.py diff --git a/dsRag/Neo4j/N2_ZsdGraph.py b/dsRag/Neo4j/N2_KG_Zsd_Graph.py similarity index 100% rename from dsRag/Neo4j/N2_ZsdGraph.py rename to dsRag/Neo4j/N2_KG_Zsd_Graph.py diff --git a/dsRag/Neo4j/N3_KG_ShiNingZhong.py b/dsRag/Neo4j/N3_KG_ShiNingZhong.py index aac447fa..b2588409 100644 --- a/dsRag/Neo4j/N3_KG_ShiNingZhong.py +++ b/dsRag/Neo4j/N3_KG_ShiNingZhong.py @@ -1,155 +1,78 @@ -from py2neo import Graph, Node, Relationship, Subgraph -from Config.Config import * -from Util.Neo4jExecutor import Neo4jExecutor - - -# 连接到 Neo4j 数据库 -graph = Graph(NEO4J_URI, auth=NEO4J_AUTH) - - -# 定义节点类 -class EntityNode(Node): - def __init__(self, name, description=""): - super().__init__("Entity", name=name, description=description) - - -class TopicNode(Node): - def __init__(self, name, description=""): - super().__init__("Topic", name=name, description=description) - - -class SubtopicNode(Node): - def __init__(self, name, description=""): - super().__init__("Subtopic", name=name, description=description) - - -class RelationshipNode(Relationship): - def __init__(self, start_node, end_node, relation_type): - super().__init__(start_node, relation_type, end_node) - - -# 创建知识图谱的函数 -def create_knowledge_graph(): - # 创建主题节点 - core_topic = EntityNode("小学数学教学中的若干问题", "小学数学教学的核心内容") - - # 创建数的认识主题及子主题节点 - number_recognition = TopicNode("数的认识", "关于数的基本概念和性质") - quantity_essence = SubtopicNode("数量与数的本质", "数量是对现实生活中事物量的抽象") - natural_numbers = SubtopicNode("自然数", "自然数是对数量的抽象") - negative_numbers = SubtopicNode("负数", "负数是与自然数数量相等但意义相反的数") - fractions = SubtopicNode("分数", "分数本身是数,表示整体与等分关系或比例关系") - decimals = SubtopicNode("小数", "小数建立在十进制基础上") - number_sense = SubtopicNode("数感", "关于数与数量、数量关系、运算结果估计的感悟") - - # 创建数的认识主题与子主题的关系 - core_topic_number_rel = RelationshipNode(core_topic, number_recognition, "INCLUDES") - number_recognition_quantity_rel = RelationshipNode(number_recognition, quantity_essence, "INCLUDES") - number_recognition_natural_rel = RelationshipNode(number_recognition, natural_numbers, "INCLUDES") - number_recognition_negative_rel = RelationshipNode(number_recognition, negative_numbers, "INCLUDES") - number_recognition_fraction_rel = RelationshipNode(number_recognition, fractions, "INCLUDES") - number_recognition_decimal_rel = RelationshipNode(number_recognition, decimals, "INCLUDES") - number_recognition_sense_rel = RelationshipNode(number_recognition, number_sense, "INCLUDES") - - # 创建数的运算主题及子主题节点 - number_operations = TopicNode("数的运算", "关于数的运算规则和方法") - addition = SubtopicNode("加法运算", "加法运算的解释基于对应的方法和定义的方法") - subtraction = SubtopicNode("减法运算", "减法是加法的逆运算") - multiplication = SubtopicNode("乘法运算", "自然数集合上乘法是加法的简便运算") - division = SubtopicNode("除法运算", "除法是乘法的逆运算") - mixed_operations = SubtopicNode("混合运算", "混合运算遵循先乘除后加减的法则") - estimation = SubtopicNode("估算", "估算是基于数量关系的运算") - symbol_awareness = SubtopicNode("符号意识", "符号意识涉及用字母表示数和基于符号的运算") - equation_essence = SubtopicNode("方程的本质", "方程用字母表示未知量,讲述现实世界中的等量关系") - operations_model = SubtopicNode("模型", "模型是数学与现实世界的桥梁") - problem_discovery = SubtopicNode("发现问题与提出问题", "发现问题与提出问题体现创新意识") - - # 创建数的运算主题与子主题的关系 - core_topic_operation_rel = RelationshipNode(core_topic, number_operations, "INCLUDES") - operations_addition_rel = RelationshipNode(number_operations, addition, "INCLUDES") - operations_subtraction_rel = RelationshipNode(number_operations, subtraction, "INCLUDES") - operations_multiplication_rel = RelationshipNode(number_operations, multiplication, "INCLUDES") - operations_division_rel = RelationshipNode(number_operations, division, "INCLUDES") - operations_mixed_rel = RelationshipNode(number_operations, mixed_operations, "INCLUDES") - operations_estimation_rel = RelationshipNode(number_operations, estimation, "INCLUDES") - operations_symbol_rel = RelationshipNode(number_operations, symbol_awareness, "INCLUDES") - operations_equation_rel = RelationshipNode(number_operations, equation_essence, "INCLUDES") - operations_model_rel = RelationshipNode(number_operations, operations_model, "INCLUDES") - operations_problem_rel = RelationshipNode(number_operations, problem_discovery, "INCLUDES") - - # 创建图形与几何主题及子主题节点 - geometry = TopicNode("图形与几何", "关于图形与几何的基本概念和性质") - space_concept = SubtopicNode("空间观念与几何直观", "空间观念是空间想象力,几何直观是直接判断能力") - figure_recognition = SubtopicNode("图形的认识与分类", "图形的认识需从立体图形抽象出点、线、面、体、角等概念") - measurement = SubtopicNode("长度、面积、体积", "长度、面积、体积是对一维、二维、三维空间物体的度量") - figure_movement = SubtopicNode("平移、旋转、轴对称", "图形的运动包括平移、旋转、轴对称") - - # 创建图形与几何主题与子主题的关系 - core_topic_geometry_rel = RelationshipNode(core_topic, geometry, "INCLUDES") - geometry_space_rel = RelationshipNode(geometry, space_concept, "INCLUDES") - geometry_figure_rel = RelationshipNode(geometry, figure_recognition, "INCLUDES") - geometry_measurement_rel = RelationshipNode(geometry, measurement, "INCLUDES") - geometry_movement_rel = RelationshipNode(geometry, figure_movement, "INCLUDES") - - # 创建统计与概率主题及子主题节点 - statistics_probability = TopicNode("统计与概率", "关于统计与概率的基本概念和方法") - data_analysis = SubtopicNode("数据分析观念", "统计学以数据为基础,强调数据分析观念") - statistical_chart = SubtopicNode("统计图", "三种统计图各有共性和差异,用于直观表述数据") - data_randomness = SubtopicNode("数据的随机性", "数据的随机性与不确定性区别") - average = SubtopicNode("平均数", "平均数是统计学中的重要概念") - probability = SubtopicNode("概率", "概率是随机事件发生的属性") - - # 创建统计与概率主题与子主题的关系 - core_topic_statistics_rel = RelationshipNode(core_topic, statistics_probability, "INCLUDES") - statistics_data_rel = RelationshipNode(statistics_probability, data_analysis, "INCLUDES") - statistics_chart_rel = RelationshipNode(statistics_probability, statistical_chart, "INCLUDES") - statistics_randomness_rel = RelationshipNode(statistics_probability, data_randomness, "INCLUDES") - statistics_average_rel = RelationshipNode(statistics_probability, average, "INCLUDES") - statistics_probability_rel = RelationshipNode(statistics_probability, probability, "INCLUDES") - - # 创建附录内容主题及子主题节点 - appendix = TopicNode("附录内容", "小学数学相关话题和教学设计") - topics = SubtopicNode("若干话题", "与小学数学相关的若干话题") - teaching_design = SubtopicNode("相关教学设计", "小学数学教学设计示例") - - # 创建附录内容主题与子主题的关系 - core_topic_appendix_rel = RelationshipNode(core_topic, appendix, "INCLUDES") - appendix_topics_rel = RelationshipNode(appendix, topics, "INCLUDES") - appendix_design_rel = RelationshipNode(appendix, teaching_design, "INCLUDES") - - # 合并所有节点和关系 - nodes = [ - core_topic, number_recognition, quantity_essence, natural_numbers, negative_numbers, - fractions, decimals, number_sense, number_operations, addition, subtraction, - multiplication, division, mixed_operations, estimation, symbol_awareness, - equation_essence, operations_model, problem_discovery, geometry, space_concept, - figure_recognition, measurement, figure_movement, statistics_probability, data_analysis, - statistical_chart, data_randomness, average, probability, appendix, topics, teaching_design - ] - relationships = [ - core_topic_number_rel, number_recognition_quantity_rel, number_recognition_natural_rel, - number_recognition_negative_rel, number_recognition_fraction_rel, number_recognition_decimal_rel, - number_recognition_sense_rel, core_topic_operation_rel, operations_addition_rel, - operations_subtraction_rel, operations_multiplication_rel, operations_division_rel, - operations_mixed_rel, operations_estimation_rel, operations_symbol_rel, - operations_equation_rel, operations_model_rel, operations_problem_rel, - core_topic_geometry_rel, geometry_space_rel, geometry_figure_rel, - geometry_measurement_rel, geometry_movement_rel, core_topic_statistics_rel, - statistics_data_rel, statistics_chart_rel, statistics_randomness_rel, - statistics_average_rel, statistics_probability_rel, core_topic_appendix_rel, - appendix_topics_rel, appendix_design_rel - ] - - # 创建子图并提交到数据库 - subgraph = Subgraph(nodes, relationships) - graph.create(subgraph) - - print("知识图谱创建成功!") - - -if __name__ == '__main__': - executor = Neo4jExecutor.create_default() - # 清库 - executor.graph.run("MATCH (n) DETACH DELETE n") - # 调用函数创建知识图谱 - create_knowledge_graph() +from neo4j import GraphDatabase +from enum import Enum + +class RelationshipType(Enum): + PREREQUISITE = "PREREQUISITE" # 先修知识 + PART_OF = "PART_OF" # 属于/包含 + IS_A = "IS_A" # 子类 + RELATED_TO = "RELATED_TO" # 相关 + TESTS = "TESTS" # 考察 + REQUIRES_SKILL = "REQUIRES_SKILL" # 需要能力 + ASSESSES_SKILL = "ASSESSES_SKILL" # 评估能力 + MASTERY = "MASTERY" # 掌握程度 + +class KnowledgeGraphBuilder: + def __init__(self, uri, user, password): + self._driver = GraphDatabase.driver(uri, auth=(user, password)) + + def close(self): + self._driver.close() + + def clear_database(self): + with self._driver.session() as session: + session.run("MATCH (n) DETACH DELETE n") + + def create_concept_node(self, name, description, node_type="Concept"): + with self._driver.session() as session: + session.run( + "MERGE (n:{} {{name: $name}}) " + "SET n.description = $description".format(node_type), + name=name, description=description + ) + + def create_relationship(self, from_node, to_node, rel_type, properties=None): + with self._driver.session() as session: + query = ( + "MATCH (a {{name: $from_name}}), (b {{name: $to_name}}) " + "MERGE (a)-[r:{}]->(b)".format(rel_type.value) + ) + if properties: + query += " SET r += $properties" + session.run(query, + from_name=from_node, + to_name=to_node, + properties=properties or {}) + + def build_math_knowledge_graph(self): + # 清空数据库 + self.clear_database() + + # 创建核心概念节点 + self.create_concept_node("数的认识", "数的基本概念和分类") + self.create_concept_node("数的运算", "基本数学运算原理") + + # 创建具体知识点节点 + self.create_concept_node("自然数", "表示物体个数的数") + self.create_concept_node("加法意义", "加法的基本定义和含义") + self.create_concept_node("加法运算", "加法计算方法") + + # 创建技能节点 + self.create_concept_node("数值计算", "进行数学计算的能力", "Skill") + + # 创建关系 + self.create_relationship("自然数", "数的认识", RelationshipType.PART_OF) + self.create_relationship("加法意义", "加法运算", RelationshipType.PREREQUISITE) + self.create_relationship("加法运算", "数值计算", RelationshipType.REQUIRES_SKILL) + + # 示例:创建题目节点和关系 + self.create_concept_node("题目1", "计算3+5的值", "Question") + self.create_relationship("题目1", "加法运算", RelationshipType.TESTS) + self.create_relationship("题目1", "数值计算", RelationshipType.ASSESSES_SKILL) + +if __name__ == "__main__": + builder = KnowledgeGraphBuilder("bolt://localhost:7687", "neo4j", "DsideaL147258369") + try: + builder.build_math_knowledge_graph() + print("知识图谱构建完成") + finally: + builder.close() diff --git a/dsRag/Neo4j/knowledge_graph.html b/dsRag/Neo4j/knowledge_graph.html index 17a32584..5c58d1da 100644 --- a/dsRag/Neo4j/knowledge_graph.html +++ b/dsRag/Neo4j/knowledge_graph.html @@ -302,8 +302,8 @@ function highlightFilter(filter) { // parsing and collecting nodes and edges from the python - nodes = new vis.DataSet([{"group": "Topic", "id": 395, "label": "\u6570\u7684\u8ba4\u8bc6", "shape": "dot", "title": "\u5173\u4e8e\u6570\u7684\u57fa\u672c\u6982\u5ff5\u548c\u6027\u8d28"}, {"group": "Subtopic", "id": 379, "label": "\u8d1f\u6570", "shape": "dot", "title": "\u8d1f\u6570\u662f\u4e0e\u81ea\u7136\u6570\u6570\u91cf\u76f8\u7b49\u4f46\u610f\u4e49\u76f8\u53cd\u7684\u6570"}, {"group": "Topic", "id": 396, "label": "\u6570\u7684\u8fd0\u7b97", "shape": "dot", "title": "\u5173\u4e8e\u6570\u7684\u8fd0\u7b97\u89c4\u5219\u548c\u65b9\u6cd5"}, {"group": "Subtopic", "id": 381, "label": "\u65b9\u7a0b\u7684\u672c\u8d28", "shape": "dot", "title": "\u65b9\u7a0b\u7528\u5b57\u6bcd\u8868\u793a\u672a\u77e5\u91cf\uff0c\u8bb2\u8ff0\u73b0\u5b9e\u4e16\u754c\u4e2d\u7684\u7b49\u91cf\u5173\u7cfb"}, {"group": "Subtopic", "id": 368, "label": "\u4f30\u7b97", "shape": "dot", "title": "\u4f30\u7b97\u662f\u57fa\u4e8e\u6570\u91cf\u5173\u7cfb\u7684\u8fd0\u7b97"}, {"group": "Topic", "id": 394, "label": "\u56fe\u5f62\u4e0e\u51e0\u4f55", "shape": "dot", "title": "\u5173\u4e8e\u56fe\u5f62\u4e0e\u51e0\u4f55\u7684\u57fa\u672c\u6982\u5ff5\u548c\u6027\u8d28"}, {"group": "Subtopic", "id": 372, "label": "\u5e73\u79fb\u3001\u65cb\u8f6c\u3001\u8f74\u5bf9\u79f0", "shape": "dot", "title": "\u56fe\u5f62\u7684\u8fd0\u52a8\u5305\u62ec\u5e73\u79fb\u3001\u65cb\u8f6c\u3001\u8f74\u5bf9\u79f0"}, {"group": "Topic", "id": 397, "label": "\u7edf\u8ba1\u4e0e\u6982\u7387", "shape": "dot", "title": "\u5173\u4e8e\u7edf\u8ba1\u4e0e\u6982\u7387\u7684\u57fa\u672c\u6982\u5ff5\u548c\u65b9\u6cd5"}, {"group": "Subtopic", "id": 391, "label": "\u6982\u7387", "shape": "dot", "title": "\u6982\u7387\u662f\u968f\u673a\u4e8b\u4ef6\u53d1\u751f\u7684\u5c5e\u6027"}, {"group": "Subtopic", "id": 382, "label": "\u9664\u6cd5\u8fd0\u7b97", "shape": "dot", "title": "\u9664\u6cd5\u662f\u4e58\u6cd5\u7684\u9006\u8fd0\u7b97"}, {"group": "Subtopic", "id": 384, "label": "\u56fe\u5f62\u7684\u8ba4\u8bc6\u4e0e\u5206\u7c7b", "shape": "dot", "title": "\u56fe\u5f62\u7684\u8ba4\u8bc6\u9700\u4ece\u7acb\u4f53\u56fe\u5f62\u62bd\u8c61\u51fa\u70b9\u3001\u7ebf\u3001\u9762\u3001\u4f53\u3001\u89d2\u7b49\u6982\u5ff5"}, {"group": "Entity", "id": 393, "label": "\u5c0f\u5b66\u6570\u5b66\u6559\u5b66\u4e2d\u7684\u82e5\u5e72\u95ee\u9898", "shape": "dot", "title": "\u5c0f\u5b66\u6570\u5b66\u6559\u5b66\u7684\u6838\u5fc3\u5185\u5bb9"}, {"group": "Subtopic", "id": 375, "label": "\u4e58\u6cd5\u8fd0\u7b97", "shape": "dot", "title": "\u81ea\u7136\u6570\u96c6\u5408\u4e0a\u4e58\u6cd5\u662f\u52a0\u6cd5\u7684\u7b80\u4fbf\u8fd0\u7b97"}, {"group": "Subtopic", "id": 378, "label": "\u7a7a\u95f4\u89c2\u5ff5\u4e0e\u51e0\u4f55\u76f4\u89c2", "shape": "dot", "title": "\u7a7a\u95f4\u89c2\u5ff5\u662f\u7a7a\u95f4\u60f3\u8c61\u529b\uff0c\u51e0\u4f55\u76f4\u89c2\u662f\u76f4\u63a5\u5224\u65ad\u80fd\u529b"}, {"group": "Subtopic", "id": 370, "label": "\u7edf\u8ba1\u56fe", "shape": "dot", "title": "\u4e09\u79cd\u7edf\u8ba1\u56fe\u5404\u6709\u5171\u6027\u548c\u5dee\u5f02\uff0c\u7528\u4e8e\u76f4\u89c2\u8868\u8ff0\u6570\u636e"}, {"group": "Subtopic", "id": 366, "label": "\u5c0f\u6570", "shape": "dot", "title": "\u5c0f\u6570\u5efa\u7acb\u5728\u5341\u8fdb\u5236\u57fa\u7840\u4e0a"}, {"group": "Subtopic", "id": 387, "label": "\u52a0\u6cd5\u8fd0\u7b97", "shape": "dot", "title": "\u52a0\u6cd5\u8fd0\u7b97\u7684\u89e3\u91ca\u57fa\u4e8e\u5bf9\u5e94\u7684\u65b9\u6cd5\u548c\u5b9a\u4e49\u7684\u65b9\u6cd5"}, {"group": "Subtopic", "id": 369, "label": "\u53d1\u73b0\u95ee\u9898\u4e0e\u63d0\u51fa\u95ee\u9898", "shape": "dot", "title": "\u53d1\u73b0\u95ee\u9898\u4e0e\u63d0\u51fa\u95ee\u9898\u4f53\u73b0\u521b\u65b0\u610f\u8bc6"}, {"group": "Subtopic", "id": 385, "label": "\u81ea\u7136\u6570", "shape": "dot", "title": "\u81ea\u7136\u6570\u662f\u5bf9\u6570\u91cf\u7684\u62bd\u8c61"}, {"group": "Topic", "id": 398, "label": "\u9644\u5f55\u5185\u5bb9", "shape": "dot", "title": "\u5c0f\u5b66\u6570\u5b66\u76f8\u5173\u8bdd\u9898\u548c\u6559\u5b66\u8bbe\u8ba1"}, {"group": "Subtopic", "id": 377, "label": "\u76f8\u5173\u6559\u5b66\u8bbe\u8ba1", "shape": "dot", "title": "\u5c0f\u5b66\u6570\u5b66\u6559\u5b66\u8bbe\u8ba1\u793a\u4f8b"}, {"group": "Subtopic", "id": 374, "label": "\u7b26\u53f7\u610f\u8bc6", "shape": "dot", "title": "\u7b26\u53f7\u610f\u8bc6\u6d89\u53ca\u7528\u5b57\u6bcd\u8868\u793a\u6570\u548c\u57fa\u4e8e\u7b26\u53f7\u7684\u8fd0\u7b97"}, {"group": "Subtopic", "id": 388, "label": "\u6df7\u5408\u8fd0\u7b97", "shape": "dot", "title": "\u6df7\u5408\u8fd0\u7b97\u9075\u5faa\u5148\u4e58\u9664\u540e\u52a0\u51cf\u7684\u6cd5\u5219"}, {"group": "Subtopic", "id": 392, "label": "\u957f\u5ea6\u3001\u9762\u79ef\u3001\u4f53\u79ef", "shape": "dot", "title": "\u957f\u5ea6\u3001\u9762\u79ef\u3001\u4f53\u79ef\u662f\u5bf9\u4e00\u7ef4\u3001\u4e8c\u7ef4\u3001\u4e09\u7ef4\u7a7a\u95f4\u7269\u4f53\u7684\u5ea6\u91cf"}, {"group": "Subtopic", "id": 383, "label": "\u5e73\u5747\u6570", "shape": "dot", "title": "\u5e73\u5747\u6570\u662f\u7edf\u8ba1\u5b66\u4e2d\u7684\u91cd\u8981\u6982\u5ff5"}, {"group": "Subtopic", "id": 376, "label": "\u6570\u636e\u7684\u968f\u673a\u6027", "shape": "dot", "title": "\u6570\u636e\u7684\u968f\u673a\u6027\u4e0e\u4e0d\u786e\u5b9a\u6027\u533a\u522b"}, {"group": "Subtopic", "id": 373, "label": "\u6570\u611f", "shape": "dot", "title": "\u5173\u4e8e\u6570\u4e0e\u6570\u91cf\u3001\u6570\u91cf\u5173\u7cfb\u3001\u8fd0\u7b97\u7ed3\u679c\u4f30\u8ba1\u7684\u611f\u609f"}, {"group": "Subtopic", "id": 367, "label": "\u51cf\u6cd5\u8fd0\u7b97", "shape": "dot", "title": "\u51cf\u6cd5\u662f\u52a0\u6cd5\u7684\u9006\u8fd0\u7b97"}, {"group": "Subtopic", "id": 390, "label": "\u6570\u636e\u5206\u6790\u89c2\u5ff5", "shape": "dot", "title": "\u7edf\u8ba1\u5b66\u4ee5\u6570\u636e\u4e3a\u57fa\u7840\uff0c\u5f3a\u8c03\u6570\u636e\u5206\u6790\u89c2\u5ff5"}, {"group": "Subtopic", "id": 386, "label": "\u5206\u6570", "shape": "dot", "title": "\u5206\u6570\u672c\u8eab\u662f\u6570\uff0c\u8868\u793a\u6574\u4f53\u4e0e\u7b49\u5206\u5173\u7cfb\u6216\u6bd4\u4f8b\u5173\u7cfb"}, {"group": "Subtopic", "id": 389, "label": "\u6a21\u578b", "shape": "dot", "title": "\u6a21\u578b\u662f\u6570\u5b66\u4e0e\u73b0\u5b9e\u4e16\u754c\u7684\u6865\u6881"}, {"group": "Subtopic", "id": 380, "label": "\u6570\u91cf\u4e0e\u6570\u7684\u672c\u8d28", "shape": "dot", "title": "\u6570\u91cf\u662f\u5bf9\u73b0\u5b9e\u751f\u6d3b\u4e2d\u4e8b\u7269\u91cf\u7684\u62bd\u8c61"}, {"group": "Subtopic", "id": 371, "label": "\u82e5\u5e72\u8bdd\u9898", "shape": "dot", "title": "\u4e0e\u5c0f\u5b66\u6570\u5b66\u76f8\u5173\u7684\u82e5\u5e72\u8bdd\u9898"}]); - edges = new vis.DataSet([{"from": 395, "title": "INCLUDES", "to": 379}, {"from": 396, "title": "INCLUDES", "to": 381}, {"from": 396, "title": "INCLUDES", "to": 368}, {"from": 394, "title": "INCLUDES", "to": 372}, {"from": 397, "title": "INCLUDES", "to": 391}, {"from": 396, "title": "INCLUDES", "to": 382}, {"from": 394, "title": "INCLUDES", "to": 384}, {"from": 393, "title": "INCLUDES", "to": 396}, {"from": 396, "title": "INCLUDES", "to": 375}, {"from": 394, "title": "INCLUDES", "to": 378}, {"from": 397, "title": "INCLUDES", "to": 370}, {"from": 395, "title": "INCLUDES", "to": 366}, {"from": 396, "title": "INCLUDES", "to": 387}, {"from": 396, "title": "INCLUDES", "to": 369}, {"from": 395, "title": "INCLUDES", "to": 385}, {"from": 393, "title": "INCLUDES", "to": 397}, {"from": 393, "title": "INCLUDES", "to": 398}, {"from": 398, "title": "INCLUDES", "to": 377}, {"from": 396, "title": "INCLUDES", "to": 374}, {"from": 393, "title": "INCLUDES", "to": 394}, {"from": 396, "title": "INCLUDES", "to": 388}, {"from": 394, "title": "INCLUDES", "to": 392}, {"from": 397, "title": "INCLUDES", "to": 383}, {"from": 393, "title": "INCLUDES", "to": 395}, {"from": 397, "title": "INCLUDES", "to": 376}, {"from": 395, "title": "INCLUDES", "to": 373}, {"from": 396, "title": "INCLUDES", "to": 367}, {"from": 397, "title": "INCLUDES", "to": 390}, {"from": 395, "title": "INCLUDES", "to": 386}, {"from": 396, "title": "INCLUDES", "to": 389}, {"from": 395, "title": "INCLUDES", "to": 380}, {"from": 398, "title": "INCLUDES", "to": 371}]); + nodes = new vis.DataSet([]); + edges = new vis.DataSet([]); nodeColors = {}; allNodes = nodes.get({ returnType: "Object" });