简体   繁体   English

RDF和OWL工作流程问题

[英]RDF and OWL workflow question

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: 我一直在通过Protege查看和玩OWL,我想知道我是否正确理解了“工作流程”和它的想法(从头开始构建数据库:

  1. Generate an OWL ontology for your data using Protege or equivalent 使用Protege或等效项为您的数据生成OWL本体
  2. Export this schema to RDF 将此架构导出到RDF
  3. Use the classes defined as some of the elements in a triplestore along with your target data 使用定义为triplestore中某些元素的类以及目标数据
  4. Export your triplestore to RDF 将您的triplestore导出到RDF
  5. Use openRDF/sesame or Jena to load the defined data and ontology 使用openRDF / sesame或Jena加载定义的数据和本体
  6. Validate your RDF triplestore against your OWL ontology to make sure everything is ok 根据您的OWL本体验证您的RDF三元组,以确保一切正常
  7. Use SPARQL to get data from your RDF triplestore 使用SPARQL从RDF triplestore获取数据
  8. Use an OWL reasoner to do something (not really clear here) 使用OWL推理器做某事(这里不太清楚)

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. 但就数据而言,如何查询子类 - 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. 例如,如果我的三重商店定义(pizzaID1是-a marghareta)并且我在SPARQL中查询素食比萨,我如何确保返回pizzaID1。

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? sparql在查询三重存储时是否进行任何自动推理,或者是否正在生成这样一个完整的图形?

There are many possible workflows, but it really doesn't have to be that complex. 有许多可能的工作流程,但实际上并不一定非常复杂。

  1. Generated your OWL ontology in some editor 在某些编辑器中生成您的OWL本体
  2. Export ontology as RDF 将本体导出为RDF
  3. Import ontology to triplestore 将本体导入triplestore
  4. Import data to triplestore 将数据导入triplestore
  5. Query data with SPARQL 使用SPARQL查询数据

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: sub / superclass推理是推理器的用途,如果你使用带有内置推理器的商店,那么它的信息将被SPARQL使用,所以如果你这样做:

SELECT ?pizza
WHERE {
  ?pizza a :VegitarianPizza .
}

You will get back all the pizzas that are members of the class VegitarianPizza, or any of it's subclasses. 您将获得VegitarianPizza类或其任何子类成员的所有比萨饼。

I'm guessing that the class VegitarianPizza is defined in your ontology as a pizza that has no ingredients that are meat? 我猜这个类VegitarianPizza在你的本体中被定义为没有肉类成分的披萨? 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. 否则,实际上不需要OWL,你可以使用更简单的RDFS。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM