在下面的本体中,我试图通过使用OneOf使男孩成为女孩的补充,但是使用Fact++或Hermit,我无法通过查询男孩(Proge5.2DL查询)获得任何实例,有什么建议吗?
: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 .发布于 2018-05-21 09:31:52
按照Stanislav的建议,添加一个公理,使所有个体都不同,解决了这个问题:
[ rdf:type owl:AllDifferent ;
owl:distinctMembers ( :Bob
:Mike
:Sarah
)
] .请参阅assumption
https://stackoverflow.com/questions/50414243
复制相似问题