0

在以下本体中,我试图通过使用 OneOf 使 Boy 成为 Girl 的补充,但是使用 Fact++ 或 Hermit 我无法通过查询 Boy(Protege 5.2 DL 查询)来获取任何实例,有什么建议吗?

: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 .
4

1 回答 1

1

正如 Stanislav 所建议的,添加一个公理以使所有个体都不同,从而解决了这个问题:

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

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

于 2018-05-21T09:31:52.827 回答