RDF和OWL工作流程问题

发布于 2024-10-19 11:41:29 字数 614 浏览 10 评论 0原文

我一直在通过 Protege 查看和使用 OWL,我想知道我是否正确理解“工作流程”和它的想法(从头开始构建数据库:

  1. 为您的数据生成 OWL 本体
  2. 使用 Protege 或等效的Export 将此模式转换为 RDF
  3. 使用定义为三元组中某些元素的类以及目标数据
  4. 将三元组导出到 RDF
  5. 使用 openRDF/sesame 或 Jena 加载定义的数据和本体
  6. 根据 OWL 本体验证 RDF 三元组以确保 很好
  7. 使用 SPARQL 从 RDF 三元组存储中获取数据
  8. 使用 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:

  1. Generate an OWL ontology for your data using Protege or equivalent
  2. Export this schema to RDF
  3. Use the classes defined as some of the elements in a triplestore along with your target data
  4. Export your triplestore to RDF
  5. Use openRDF/sesame or Jena to load the defined data and ontology
  6. Validate your RDF triplestore against your OWL ontology to make sure everything is ok
  7. Use SPARQL to get data from your RDF triplestore
  8. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

亣腦蒛氧 2024-10-26 11:41:29

有许多可能的工作流程,但实际上不必那么复杂。

  1. 在某些编辑器中生成 OWL 本体
  2. 将本体导出为 RDF
  3. 将本体导入到 Triplestore
  4. 将数据导入到 Triplestore
  5. 使用 SPARQL 查询

数据 子/超类推理是推理器的用途,如果您使用带有内置推理器的存储,那么它的信息将由 SPARQL 使用,因此如果您这样做:

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

您将取回属于 VegarianPizza 类或其任何子类的成员的所有披萨。

我猜 VegarianPizza 类在您的本体中被定义为不含肉类成分的披萨?而不是手动将每个披萨分配给一个类?否则真的不需要OWL,你可以只使用RDFS,这要简单得多。

There are many possible workflows, but it really doesn't have to be that complex.

  1. Generated your OWL ontology in some editor
  2. Export ontology as RDF
  3. Import ontology to triplestore
  4. Import data to triplestore
  5. Query data with 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:

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.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文