在RDF中编码数学属性 [英] Encoding mathematical properties in RDF

查看:125
本文介绍了在RDF中编码数学属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图找到一个添加关系的解决方案,例如 X 有单元 A < 20 转化为现有的本体,但到目前为止找不到解决方案。



现有的知识图 - RDF - 有许多概念和关系。为了提高推理的准确性,我们正在尝试为几个概念添加一些关键属性。



示例:

请提供如何在知识图中仅添加这种关系的几种概念 - RDF

解决方案

正如我在在SPARQL中操作RDF集合的函数,您可以在SPARQL中进行一些数学,这是RDF的查询语言。对于编码任意的数学公式(这是标题建议),您可能还对


Wenzel,Ken和Heiner Reinhardt感兴趣。 使用OpenMath的
关联数据应用程序的数学计算

第24次OpenMath研讨会和第七届数学用户研讨会
接口(MathUI)的联合会议记录。 2012年。


所有这一切,你在这里描述的东西(某些属性的值将小于一个值一定数量),可以在OWL中表达。您的具体情况是:


概念X引入概念Y.而且,我们现在知道概念Y具有属性ABC<总是这样的。


我不知道你的意思是什么意思导致另一个,但你可以说每一个Y的实例对于属性ABC只有小于30的值。这很简单。这是公理(以曼彻斯特语法)


Y subClassOf仅限ABC xsd:integer [< 30]


和DL语法:


Y⊑ &forall的; ABC.xsd:整数并[d 30]


在Protégé看起来像:





和OWL本体的RDF表示(在Turtle和RDF / XML中):

  @prefix:< https:// stackoverflow。 COM / q /一百二十八万一千四百三十三分之二千四百一十三万四千七百八十五/刻面#> 。 
@prefix owl:< http://www.w3.org/2002/07/owl#> 。
@prefix rdf:< http://www.w3.org/1999/02/22-rdf-syntax-ns#> 。
@prefix xsd:< http://www.w3.org/2001/XMLSchema#> 。
@prefix rdfs:< http://www.w3.org/2000/01/rdf-schema#> 。

:ABC a owl:DatatypeProperty。

< https://stackoverflow.com/q/24134785/1281433/facets>
a owl:本体论。

:Y a owl:Class;
rdfs:subClassOf [a owl:Restriction;
owl:allValuesFrom [a rdfs:Datatype;
owl:onDatatype xsd:integer;
owl:withRestrictions([xsd:maxExclusive
30])
];
owl:onProperty:ABC
]。



 < rdf:RDF 
xmlns:rdf =http://www.w3.org/1999/02/22-rdf-syntax-ns#
xmlns =https://stackoverflow.com/q/24134785 / 1281433 / facets#
xmlns:owl =http://www.w3.org/2002/07/owl#
xmlns:rdfs =http://www.w3.org / 2000/01 / rdf-schema#
xmlns:xsd =http://www.w3.org/2001/XMLSchema#>
< owl:本体rdf:about =https://stackoverflow.com/q/24134785/1281433/facets/>
< owl:Class rdf:about =https://stackoverflow.com/q/24134785/1281433/facets#Y>
< rdfs:subClassOf>
< owl:限制>
< owl:onProperty>
< owl:DatatypeProperty rdf:about =https://stackoverflow.com/q/24134785/1281433/facets#ABC/>
< / owl:onProperty>
< owl:allValuesFrom>
< rdfs:数据类型>
< owl:onDatatype rdf:resource =http://www.w3.org/2001/XMLSchema#integer/>
< owl:withRestrictions rdf:parseType =Collection>
< rdf:Description>
< xsd:maxExclusive rdf:datatype =http://www.w3.org/2001/XMLSchema#integer
> 30< / xsd:maxExclusive>
< / rdf:Description>
< / owl:withRestrictions>
< / rdfs:数据类型>
< / owl:allValuesFrom>
< / owl:限制>
< / rdfs:subClassOf>
< / owl:Class>
< / rdf:RDF>


I have been trying to find a solution to adding relationships, such as X has unit A < 20 into an existing ontology, but, could not find a solution so far.

An existing knowledge graph - RDF - has many concepts and relationships. In an attempt improve the accuracy of inferences, we are trying to add some key properties to few of the concepts.

Example:

Concept X causes concept Y. And, we now know that concept Y has property ABC < 30 always.

Please suggest on how to add this kind of relationships for only few concepts in a knowledge graph - RDF

解决方案

As I mentioned in an answer to Functions to manipulate RDF collections in SPARQL, you can do some mathematics in SPARQL, which is a query language for RDF. For encoding arbitrary mathematical formulas (which is what the title suggests), you might also be interested in

Wenzel, Ken, and Heiner Reinhardt. "Mathematical Computations for Linked Data Applications with OpenMath." Joint Proceedings of the 24th Workshop on OpenMath and the 7th Workshop on Mathematical User Interfaces (MathUI). 2012.

All that said, what you're describing here (that the value of of some property will have a value less than a certain number), is expressible in OWL. Your particular situation was:

Concept X causes concept Y. And, we now know that concept Y has property ABC < 30 always.

I'm not sure what you mean by a concept causing another, but you can say that every instance of Y has only values less than 30 for the property ABC. That's pretty straightforward. It's the axiom (in Manchester syntax)

Y subClassOf ABC only xsd:integer[< 30]

and in DL syntax:

Y ⊑ ∀ABC.xsd:integer[< 30]

In Protégé that looks like:

and in the RDF representation of the OWL ontology (in Turtle and RDF/XML):

@prefix :      <https://stackoverflow.com/q/24134785/1281433/facets#> .
@prefix owl:   <http://www.w3.org/2002/07/owl#> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd:   <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .

:ABC    a       owl:DatatypeProperty .

<https://stackoverflow.com/q/24134785/1281433/facets>
        a       owl:Ontology .

:Y      a                owl:Class ;
        rdfs:subClassOf  [ a                  owl:Restriction ;
                           owl:allValuesFrom  [ a                     rdfs:Datatype ;
                                                owl:onDatatype        xsd:integer ;
                                                owl:withRestrictions  ( [ xsd:maxExclusive
                                                                  30 ] )
                                              ] ;
                           owl:onProperty     :ABC
                         ] .

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns="https://stackoverflow.com/q/24134785/1281433/facets#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
  <owl:Ontology rdf:about="https://stackoverflow.com/q/24134785/1281433/facets"/>
  <owl:Class rdf:about="https://stackoverflow.com/q/24134785/1281433/facets#Y">
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:onProperty>
          <owl:DatatypeProperty rdf:about="https://stackoverflow.com/q/24134785/1281433/facets#ABC"/>
        </owl:onProperty>
        <owl:allValuesFrom>
          <rdfs:Datatype>
            <owl:onDatatype rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
            <owl:withRestrictions rdf:parseType="Collection">
              <rdf:Description>
                <xsd:maxExclusive rdf:datatype="http://www.w3.org/2001/XMLSchema#integer"
                >30</xsd:maxExclusive>
              </rdf:Description>
            </owl:withRestrictions>
          </rdfs:Datatype>
        </owl:allValuesFrom>
      </owl:Restriction>
    </rdfs:subClassOf>
  </owl:Class>
</rdf:RDF>

这篇关于在RDF中编码数学属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆