我目前正在使用rdflib在Python中创建和管理RDF图.但是,RDFlib不会进行任何RDFS或OWL推理.这导致如下结果:
如果我有
A rdf:type MyType .
MyType rdfs:subClassOf SuperType .
我问
select ?x where {?x rdf:type SuperType}
然后我什么都没得到,但我想得到A
(通过RDFS语义).
同样的事情发生在owl:equivalentClass
.如果我有
A rdf:type MyType .
MyType owl:equivalentClass SiblingType .
我问
select ?x where {?x rdf:type SiblingType}
我想得到A
,但我一无所获.
有没有办法获得这些结果?