为什么在 GraphDB 中会发生这些类型推断?

问题描述

我有以下 .ttl 文件:

@Prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@Prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@Prefix ex: <http://www.example.com#>

ex:requires rdfs:domain ex:Function.
ex:requires rdfs:range ex:Information.
ex:provides rdfs:domain ex:Function.
ex:provides rdfs:range ex:Function.
ex:requires rdfs:domain ex:Display.
ex:DisplaysTo rdfs:domain ex:Display.
ex:DisplaysTo rdfs:range ex:User.

ex:F1 ex:requires ex:I1.
ex:F1 ex:provides ex:I2.
ex:D1 ex:requires ex:I2.
ex:D1 ex:DisplaysTo ex:U1.

一旦使用 RDFS(优化)规则集导入到 GraphDB 中,就会产生以下推论。

I1 和 I2 是类型信息

U1 是类型用户

D1 是类型显示和类型功能

F1 是类型显示和类型功能

我想要的前 2 个推理,但是对于最后两个推理,我希望 D1 仅属于类型显示,而 F1 仅属于类型功能。

如何更改我的 .ttl 文件以实现这种情况?

编辑:带有 owl 的较新 .ttl 文件

@prefix : <http://www.semanticweb.org/alexbett/ontologies/2021/3/untitled-ontology-5#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://www.semanticweb.org/alexbett/ontologies/2021/3/untitled-ontology-5> .

:DisplaysTo rdf:type owl:ObjectProperty ;
            rdfs:domain :Display ;
            rdfs:range :User .

:Provides rdf:type owl:ObjectProperty ;
          rdfs:domain :Function ;
          rdfs:range :Information .

:Requires rdf:type owl:ObjectProperty ;
          rdfs:domain :Display,:Function ;
          rdfs:range :Information .

:Display rdf:type owl:Class ;
         rdfs:subClassOf [ rdf:type owl:Restriction ;
                           owl:onProperty :DisplaysTo ;
                           owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
                           owl:onClass :User
                         ],[ rdf:type owl:Restriction ;
                           owl:onProperty :Requires ;
                           owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
                           owl:onClass :Information
                         ] .

:Function rdf:type owl:Class ;
          rdfs:subClassOf [ rdf:type owl:Restriction ;
                            owl:onProperty :Provides ;
                            owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
                            owl:onClass :Information
                          ],[ rdf:type owl:Restriction ;
                            owl:onProperty :Requires ;
                            owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
                            owl:onClass :Information
                          ] .

:Information rdf:type owl:Class .
:User rdf:type owl:Class .

:D1 rdf:type owl:NamedIndividual ;
    :DisplaysTo :U1 ;
    :Requires :I2 .

:F1 rdf:type owl:NamedIndividual ;
    :Provides :I2 ;
    :Requires :I1 .

:I1 rdf:type owl:NamedIndividual .
:I2 rdf:type owl:NamedIndividual .
:U1 rdf:type owl:NamedIndividual .

编辑 2: 应该是:

:Display rdf:type owl:Class ;
         owl:intersectionOf [ rdf:type owl:Restriction ;
                              owl:onProperty :DisplaysTo ;
                              owl:onClass :User
                            ],[ rdf:type owl:Restriction ;
                              owl:onProperty :Requires ;
                              owl:onClass :Information
                            ] .

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)