【问题标题】:How to represent an ontology using description logic?如何使用描述逻辑来表示本体?
【发布时间】:2014-10-15 23:13:47
【问题描述】:

我正在学习本体,DL语言对我来说很难,我在网上找到了很好的练习,这里有一个问题:给定遵循本体:

有两种不相交的实体:城市和国家。每个 国家只有一个首都,一座城市。然而,一个城市可以在更多 比一个国家。每个国家至少与一个国家相邻,并且 也许是大海(我们不区分不同的海域)。

如何用描述逻辑符号表达?

【问题讨论】:

  • 这似乎在this exam, CSE 636: Test #1 中逐字出现。 (赠品是从 LaTeX 生成的 PDF 复制“不同”会丢失 ff 连字。)
  • 我已经写了一个答案(目前已删除),但不想在没有任何解释的情况下公开发布它,因为我不会只是为他们做作业。
  • 我喜欢一个城市可以在多个国家。在我的脑海中,这绝对是现实世界中的一个极端案例。
  • @Ignazio 可能是 literal 角落或边缘案例。 (任何有边界争端的地方都可以提供例子。)
  • 是的,我能想到的最明显的一个是柏林,直到 1989 年。但这是题外话。

标签: rdf semantic-web owl ontology description-logic


【解决方案1】:

以下示例演示了如何处理基数。你怎么看这个例子? 为了给你留下一些工作,你可以自己建模海洋、城市和脱节?

@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 world: <http://www.world.org/ontology/world#> .

world: rdf:type owl:Ontology .


############# country ##################
world:Country 
  a owl:Class , rdfs:Class ;
  rdfs:label "Country" ;
  rdfs:comment "representing an country in the world" ;
  rdfs:subClassOf
    [a owl:Restriction ;
    owl:onProperty :hasNeighbors ;
    owl:minCardinality 1 
    ];
  rdfs:subClassOf
    [a owl:Restriction ;
    owl:onProperty :hasCapital ;
    owl:minCardinality 1 
    ];
  rdfs:isDefinedBy world: .

world:hasNeighbors
    a owl:ObjectProperty, rdf:Property ;
    rdfs:label "hasNeighbors" ;
    rdfs:comment "The neighbor countries." ;
    rdfs:domain :Country ;
    rdfs:range :Country ;
    rdfs:isDefinedBy world: .

world:hasCapital
    a owl:ObjectProperty, rdf:Property ;
    rdfs:label "hasCapital" ;
    rdfs:comment "The capital of a country." ;
    rdfs:domain :Country ;
    rdfs:range :City ;
    rdfs:isDefinedBy world: .

############### City ####################  
world:City
  a owl:Class , rdfs:Class ;
  rdfs:label "City" ;
  rdfs:comment "representing an city in the world" ;
  rdfs:isDefinedBy world: .

【讨论】:

  • 非常感谢,您的回答不在描述逻辑中,但它是使用rdfs和OWL描述本体的一个很好的例子,我已经解决了。
  • 你的权利......我被绑定到我当前的上下文......对不起(限制只是 DL 的一小部分的代表 - 明白了这一点:-)。如果您找到了解决方案,是否想与我们分享您的见解 - 以便我们能够学习……?
猜你喜欢
  • 2018-06-16
  • 1970-01-01
  • 1970-01-01
  • 2015-07-09
  • 2019-07-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多