OWL API中的注释

时间:2017-07-05 07:55:49

标签: owl owl-api

我正在学习如何使用OWL API,我发现这个API与我之前使用的API不同。我想弄清楚一些简单的概念。我无法理解“注释”。我得到了这些from wiki

  

OWL抽象语法将本体呈现为序列   注释公理事实。注释带有机器和人   面向元数据。

如果你熟悉猫头鹰,你能举个例子吗? “机器和人类导向的元数据”是什么意思? 非常感谢。

更新

谢谢你回答我。我也想写一个例子:

<http://data.doremus.org/performance/4db95574-8497-3f30-ad1e-f6f65ed6c896>
    a                      mus:M42_Performed_Expression_Creation ;
    ecrm:P3_has_note       "Créée par Teodoro Anzellotti, son commanditaire, en novembre 1995 à Rotterdam" ;
    ecrm:P4_has_time-span  <http://data.doremus.org/performance/4db95574-8497-3f30-ad1e-f6f65ed6c896/time> ;
    ecrm:P9_consists_of    [ a                        mus:M28_Individual_Performance ;
                             ecrm:P14_carried_out_by  "Teodoro Anzellotti"
                           ] ;
    ecrm:P9_consists_of    [ a                        mus:M28_Individual_Performance ;
                             ecrm:P14_carried_out_by  "à Rotterdam"
                           ] ;
    efrbroo:R17_created    <http://data.doremus.org/expression/2fdd40f3-f67c-30a0-bb03-f27e69b9f07f> ;
    efrbroo:R19_created_a_realisation_of
            <http://data.doremus.org/work/907de583-5247-346a-9c19-e184823c9fd6> ;
    efrbroo:R25_performed  <http://data.doremus.org/expression/b4bb1588-dd83-3915-ab55-b8b70b0131b5> .

我认为在这个例子中有注释,“ecrm:P9_consists_of”的对象不是注释。如果我想为ecrm添加注释:P3_has_not,该怎么做? 非常感谢。

1 个答案:

答案 0 :(得分:2)

最简单的owl-annotation示例是注释断言,例如:

_:x rdfs:comment "this is a comment"@en 

其中谓词rdfs:comment - 是内置注释属性,并且有8个这样的内置属性。 您还可以提供自己的注释属性。 您还可以对注释进行注释并构建注释树。 сomplex嵌套注释(turtle)的例子:

[ a                      owl:Annotation ;
  rdfs:comment           "indi-comment" ;
  owl:annotatedProperty  rdfs:comment ;
  owl:annotatedSource    [ a                      owl:Axiom ;
                           rdfs:comment           "INDI-ANN" ;
                           owl:annotatedProperty  rdf:type ;
                           owl:annotatedSource    :Indi ;
                           owl:annotatedTarget    :SomeClass1
                         ] ;
  owl:annotatedTarget    "INDI-ANN"
] .

功能语法相同:

ClassAssertion(Annotation(Annotation(rdfs:comment "indi-comment"^^xsd:string) rdfs:comment "INDI-ANN"^^xsd:string) <#SomeClass1> <#Indi>)

这里我们有类断言公理,它将命名个体':Indi'与类':SomeClass1'绑定在一起;这个公理用rdfs注释:comment =“INDI-ANN”,其中有注释rdfs:comment(annotation-property)=“indi-comment”(注释值)。

我认为功能语法表示可以被视为“以人为本的元数据”,而乌龟则被视为“以机器为导向”的表示。

通常,注释是一种提供有关owl-statements(owl-axioms)的附加(和可选)信息的方法。它可以是版本,链接,一些自定义注释属性等。

备注:它是关于OWL2规范,而不是关于OWL-API。任何符合规范的API都必须提供类似的方法来处理owl-annotations。