【问题标题】:Is there a way to build a graph in Gephi and export it to TitanDb?有没有办法在 Gephi 中构建图形并将其导出到 TitanDb?
【发布时间】:2016-10-23 04:21:35
【问题描述】:

有没有办法使用 Gephi 和 Data Laboratory 构建图形并将其导出到 Titan db?

我尝试了以下方法但没有成功: 与数据实验室在 Gephi 中构建了一个简单的图表 将图形保存为 GraphML 格式 使用 titanDb 的 Gremlin 控制台导入 graphml 文件。 我收到此错误:名称不能在受保护的命名空间中:标签

编辑:在 aws DynamoDb 上使用 TitanDb 1.0.0

有什么想法吗?

【问题讨论】:

    标签: titan tinkerpop gephi graphml


    【解决方案1】:

    Titan 1.0 使用 Apache TinkerPop 3.0.1 作为其核心 Graph API,因此实际功能来自 TinkerPop,documented here。听起来你已经意识到了这一点。这是一个example GraphML file,它将使用graph.io(graphml()).readGraph('tinkerpop-classic-indented.xml')成功加载

    TinkerPop 对 GraphML 的具体用法目前没有记录的一个方面是,它分别需要 <node><edge> 中的 labelVlabelE 数据键。

    在我对 Gephi 0.9.1 数据实验室的简短测试中,当你创建一个节点时,它会提示你设置一个label。这会在 GraphML 中的 <node> 中创建一个 label 数据键。当你创建一条边时,它会提示你设置一个kind,它实际上并没有出现在 GraphML 中。创建后,您应该在边缘设置label。这会在 GraphML 中创建一个 edgelabel 数据键。

    Titan / TinkerPop 需要在所有节点和边上添加标签,因此请确保为所有节点设置了非空的 label

    从 Gephi 将图形导出为 GraphML 文件后

    1. 替换文件中的所有以将"label" 更改为"labelV"。如果您不这样做,您将在原始帖子中遇到错误 (Name cannot be in protected namespace: label),因为 label 是 Titan 中的 reserved word

    2. 替换文件中的所有以将"edgelabel" 更改为"labelE"。如果你不这样做,你会遇到一个错误提示Label can not be null

    然后文件就可以加载到 Titan 中了。

    【讨论】:

      猜你喜欢
      • 2012-06-25
      • 1970-01-01
      • 1970-01-01
      • 2011-01-07
      • 2022-01-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多