RDF和OWL工作流程问题
我一直在通过 Protege 查看和使用 OWL,我想知道我是否正确理解“工作流程”和它的想法(从头开始构建数据库:
- 为您的数据生成 OWL 本体
- 使用 Protege 或等效的Export 将此模式转换为 RDF
- 使用定义为三元组中某些元素的类以及目标数据
- 将三元组导出到 RDF
- 使用 openRDF/sesame 或 Jena 加载定义的数据和本体
- 根据 OWL 本体验证 RDF 三元组以确保 很好
- 使用 SPARQL 从 RDF 三元组存储中获取数据
- 使用 OWL 推理器来做某事(这里不太清楚)
我想了解其他人在做什么以及他们如何解决此类问题。
一切都 有一个具体的问题:
猫头鹰推理机似乎仅用于确定本体的子类超类关系,但就数据而言,如何在 SPARQL 中查询子类-超类关系例如,如果我的三重存储定义了 (pizzaID1) is-a marghareta ),我在 SPARQL 中查询素食披萨,如何确保返回 PizzaID1 。
我认为答案与生成“全图”有关,其中明确说明了每个关系。 sparql 在查询三元组时是否会进行自动推理,或者是否需要生成这样的完整图?
I have been looking at and playing with OWL through Protege and I would like to know if I understand the "workflow" and idea of it correctly (for building up a database from scratch:
- Generate an OWL ontology for your data using Protege or equivalent
- Export this schema to RDF
- Use the classes defined as some of the elements in a triplestore along with your target data
- Export your triplestore to RDF
- Use openRDF/sesame or Jena to load the defined data and ontology
- Validate your RDF triplestore against your OWL ontology to make sure everything is ok
- Use SPARQL to get data from your RDF triplestore
- Use an OWL reasoner to do something (not really clear here)
I would like to get an idea of what others are doing and how they are approaching this type of problem.
In addition I have a specific question:
It seems like an owl reasoner is used to determine sub-class superclass relationships only for ontologies. But in terms of data how to you query for subclass - superclass relationships in SPARQL. For example if my triple store defines (pizzaID1 is-a marghareta ) and I query for vegetarian pizza in SPARQL how do I make sure that pizzaID1 is returned.
I think that the answer has something to do with generating a "full-graph", one in which every relationship is explicitly stated. Does sparql do any automatic reasoning when querying triplestores, or is generating such a full graph neccessary?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有许多可能的工作流程,但实际上不必那么复杂。
数据 子/超类推理是推理器的用途,如果您使用带有内置推理器的存储,那么它的信息将由 SPARQL 使用,因此如果您这样做:
您将取回属于 VegarianPizza 类或其任何子类的成员的所有披萨。
我猜 VegarianPizza 类在您的本体中被定义为不含肉类成分的披萨?而不是手动将每个披萨分配给一个类?否则真的不需要OWL,你可以只使用RDFS,这要简单得多。
There are many possible workflows, but it really doesn't have to be that complex.
The sub/superclass reasoning is what the reasoner is used for, if you use a store with a builtin reasoner then then it's information will be used by SPARQL, so if you do:
You will get back all the pizzas that are members of the class VegitarianPizza, or any of it's subclasses.
I'm guessing that the class VegitarianPizza is defined in your ontology as a pizza that has no ingredients that are meat? Rather than assigning each pizza to a class by hand? Otherwise there's really no need for OWL, and you could just use RDFS, which is much simpler.