在Neo4J db上使用Jena推理机 [英] Using Jena reasoner on Neo4J db

查看:918
本文介绍了在Neo4J db上使用Jena推理机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我第一次在这里写书,但是我真的遇到了一个问题: 是否可以在已经填充了数据的No-SQL数据库(例如Neo4J)上使用Jena推理器?

it's my first time writing here but i'm really struck with a problem: is it possible to use the Jena reasoner on a No-SQL database, like Neo4J, already filled with data?

我有一个Neo4J的图形表示一堆三元组,我想在它们上使用Jena API和Jena推理器.我考虑过使用耶拿(Jena)的SDB/TDB组件,但是我不知道如何将数据实际加载到我的模型中,因为SDB组件似乎只适用于SQL数据库,而整个TDB javadoc似乎有点太多了. 我也应该为TDB模型定义某种配置文件吗?

I've a Neo4J's graph rappresenting a bunch of triples and I would like to use the Jena API and the Jena reasoner on them. I thought about using the SDB/TDB component of Jena but I don't get how to actually load the data into my model since the SDB component seems to work with just SQL databases and the go throught the whole TDB javadoc seems to be a bit too much. Should I define some kind of configuration file for the TDB model too ?

非常感谢您的帮助.

推荐答案

您应该查看此链接,其中描述了neo4j和Triplestore之间的连接.或至少可能的连接.

You should have a look at this link which describes the connection between neo4j and triplestores. Or possible connections at least.

neo4j模型与Jena使用的RDF模型有很大不同. RDF由三元组(即主题,谓词和宾语)组成. 这里是由三元组组成的图的示例.请注意使用URI标识资源,并注意节点通常是原子数据值.它们是URI,简单数字,字符串等.

The neo4j model is very different than the RDF model, which Jena uses. RDF is composed of triples, meaning subjects, predicates, and objects. Here is an example of a graph composed of triples. Note the use of URIs for identifying resources, and note that the nodes are typically atomic data values. They're a URI, a simple number, a string, and so on.

在Neo4j中,节点是属性容器".这意味着它们不仅是URI,而且实际上是一堆信息.关系连接节点.因此,RDF的谓词"有点像Neo4j的关系,但是neo4j节点却不像RDF的资源和文字.

In Neo4j, nodes are "Property Containers". Meaning that they're not just URIs, but they're actually bundles of information. Relationships connect nodes. So RDF "predicates" are sort of like Neo4j relationships, but neo4j nodes are not like RDF resources and literals.

如果要在neo4j数据库上使用推理机,您的主要任务是将数据从neo4j中吸取,并将其格式化为一组RDF三元组.然后,您可以将这些RDF三元组放入Jena 模型.当您在内存中拥有该jena模型时,可以使用现有的jena API在该模型中使用推理程序.

Your main task if you want to use reasoners over a neo4j database is going to be to suck data out of neo4j, and format it as a set of RDF triples. You can then put those RDF triples into a Jena Model. When you have that jena model in memory, you can use existing jena APIs to use reasoners with that model.

这篇关于在Neo4J db上使用Jena推理机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆