owl closing the world with OneOf

我们两清 提交于 2020-01-06 07:28:11

问题


In the following Ontology I'm trying to make Boy the complement of Girl by using OneOf however using Fact++ or Hermit I'm unable to get any instances by querying for Boy (Protege 5.2 DL query), any suggestions?

:Bob rdf:type owl:NamedIndividual ,
              :Person .


:Mike rdf:type owl:NamedIndividual ,
               owl:Thing .


:Sarah rdf:type owl:NamedIndividual ,
                :Girl.

:Person rdf:type owl:Class ;
        owl:equivalentClass [ rdf:type owl:Class ;
                              owl:oneOf ( :Bob
                                          :Mike
                                          :Sarah
                                        )
                            ] .

:Girl rdf:type owl:Class ;
      owl:equivalentClass [ rdf:type owl:Class ;
                            owl:oneOf ( :Sarah
                                      )
                          ] ;
      rdfs:subClassOf :Person .

:Boy rdf:type owl:Class ;
     owl:equivalentClass [ owl:intersectionOf ( :Person
                                                [ rdf:type owl:Class ;
                                                  owl:complementOf :Girl
                                                ]
                                              ) ;
                           rdf:type owl:Class
                         ] ;
     rdfs:subClassOf :Person ;
     owl:disjointWith :Girl .

回答1:


Adding an axiom to make all individuals as different solves the problem as suggested by Stanislav:

[ rdf:type owl:AllDifferent ;
  owl:distinctMembers ( :Bob
                        :Mike
                        :Sarah
                      )
] .

See https://en.wikipedia.org/wiki/Unique_name_assumption



来源:https://stackoverflow.com/questions/50414243/owl-closing-the-world-with-oneof

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!