OWL 本体中的分类问题

问题描述 投票:0回答:1

我正在定义一个简单的本体论,根据三明治的成分对三明治进行分类。结构如下:

课程

Ingredient

  • Bio
  • Vegetable
  • Fish
  • Meat

Sandwich

  • BioBurger
  • FishBurger

数据属性

isBiologic
(布尔值)

对象属性

hasIngredient
(具有域
Sandwich
和范围
Ingredient

正式定义为

Bio
Ingredient and (isBiologic value true)

BioBurger
Sandwich and hasIngredient only Bio

FishBurger
Sandwich and hasIngredient some Fish

场景

我创建了以下个人:

salmon
type Fish

organicLettuce
type Vegetable and isBiologic value true

推理机正确地将

organicLettuce
分类为
Bio

但是,当我定义个体时:

organicBurger
,与
hasIngredient organicLettuce

nonOrganicBurger
,与
hasIngredient salmon and hasIngredient organicLettuce

推理机不会将

organicBurger
分类为
BioBurger
。它仅被分类为
Sandwich

假设

我了解问题在于开放世界假设(OWA)。我可能需要定义闭包,但我不确定如何在实践中实现它们。

问题

如何添加必要的闭包,以便推理器将个体正确分类为

BioBurger
FishBurger

我尝试创建一个

NoBioBurger
作为
Sandwich and Ingredient some NoBio
,然后定义类
Bio as Sandwich and not (NoBio)
。但没有成功。

owl ontology protege restriction
1个回答
0
投票

我将在这里讨论如何推断

organicBurger
BioBurger
类型。类似的想法应该可以帮助您做类似的事情
FishBurger

您完全明白 OWA 是问题的一部分。然而,对量化普遍限制,特别是

BioBurger equivalentTo hasIngredient only Bio
的理解也存在问题。这意味着每当一个人属于
BioBurger
类型时,它就只能具有:

  1. 0 个链接,通过
    hasIngredient
  2. 通过
    hasIngredient
    的所有链接都必须链接到
    Bio
    类型的个人。

在您的

organicBurger equivalentTo hasIngredient organicLettuce
示例中,以
organicLettuce
作为
Vegetable and isBiologic value true
的类型,您希望满足 (2)。然而,这失败了,因为没有任何内容表明
Vegetable
类型的个体必须是
Bio
类型。有 2 种可能的方法可以解决此问题:

  1. 最简单的是声明
    Vegetable sublassOf Bio
    ,或
  2. 声明
    Bio equivalentTo isBiologic value true
    (删除
    and Ingredient
    )并声明
    Vegetable equivalentTo isBiologic value true
    。这将导致推理机推断
    Vegetable
    Bio
    是等价的。

这些更改旨在确保

organicLettuce
遵守
hasIngredient only Bio
的语义。

我们现在仍然需要处理 OWA。有2个步骤:

(1) 我们需要通过添加以下内容来确定可以考虑哪些类别

Ingredients

Ingredient equivalentTo Fish or Meat or Bio or Vegetable

(2) 我们还需要确保

organicBurger
没有
hasIngredient
链接到任何其他成分 :

  1. hasIngredient max 0 Fish
  2. hasIngredient max 0 Meat

通过这些陈述,我们通过声明

hasIngredient only Bio
没有与肉和鱼的链接来进一步确保遵守
organicBurger
的语义。

这是完整的本体:

Prefix: owl: <http://www.w3.org/2002/07/owl#>
Prefix: rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
Prefix: rdfs: <http://www.w3.org/2000/01/rdf-schema#>
Prefix: xml: <http://www.w3.org/XML/1998/namespace>
Prefix: xsd: <http://www.w3.org/2001/XMLSchema#>



Ontology: <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl>
<http://henrietteharmse.com/SO/79282158/v0.0.1/classification-issue-in-an-owl-ontology>

Datatype: xsd:boolean

    
ObjectProperty: <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#hasIngredient>

    Domain: 
        <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Sandwich>
    
    Range: 
        <http://henrietteharmse.com/SO#Ingredient>
    
    
DataProperty: <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#isBiologic>

    
Class: <http://henrietteharmse.com/SO#Ingredient>

    EquivalentTo: 
        <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Bio> or <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Fish> or <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Meat> or <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Vegetable>
    
    
Class: <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Bio>

    EquivalentTo: 
        <http://henrietteharmse.com/SO#Ingredient>
        and (<http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#isBiologic> value true)
    
    SubClassOf: 
        <http://henrietteharmse.com/SO#Ingredient>
    
    
Class: <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#BioBurger>

    EquivalentTo: 
        <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Sandwich>
        and (<http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#hasIngredient> only <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Bio>)
    
    SubClassOf: 
        <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Sandwich>
    
    
Class: <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Fish>

    SubClassOf: 
        <http://henrietteharmse.com/SO#Ingredient>
    
    
Class: <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#FishBurger>

    EquivalentTo: 
        <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Sandwich>
        and (<http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#hasIngredient> some <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Fish>)
    
    SubClassOf: 
        <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Sandwich>
    
    
Class: <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Meat>

    SubClassOf: 
        <http://henrietteharmse.com/SO#Ingredient>
    
    
Class: <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Sandwich>

    
Class: <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Vegetable>

    SubClassOf: 
        <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Bio>
    
    
Individual: <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#nonOrganicBurger>

    Facts:  
    <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#hasIngredient>  <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#organicLettuce>,
    <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#hasIngredient>  <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#salmon>
    
    
Individual: <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#organicBurger>

    Types: 
        <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#hasIngredient> max 0 <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Fish>,
        <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#hasIngredient> max 0 <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Meat>
    
    Facts:  
    <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#hasIngredient>  <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#organicLettuce>
    
    
Individual: <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#organicLettuce>

    Types: 
        <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Vegetable>
        and (<http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#isBiologic> value true)
    
    
Individual: <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#salmon>

    Types: 
        <http://henrietteharmse.com/SO/79282158/classification-issue-in-an-owl-ontology.owl#Fish>
© www.soinside.com 2019 - 2024. All rights reserved.