본문 바로가기

날리지/지식표현

RDFS Entailment Pattern

자꾸 까먹어서 블로그에 정리함. 

RDFS Entailment 에는 모두 13개의 규칙이 존재하는데, 이 모든 규칙을 사용하여서 추론을 수행할 경우에는 

간단히 Jena에서 아래와 같이 하면 됨. 

ModelFactory.createRDFSModel();

그러나 간단히 subClassOf를 통한 instance의 타입 추론만 한다면 Generic을 사용하는 것이 더 효율적이라 생각함

아래와 같이 


규칙 : 

[rdfsRule: (?x rdf:type ?y), (?y rdfs:subClassOf ?z) (?z rdfs:subClassOf ?a) -> (?x rdf:type ?a)]


Jena: 

Reasoner reasoner = new GenericRuleReasoner(Rule.rulesFromURL("resource/rules/rdfsInference.txt"));
InfModel infModel = ModelFactory.createInfModel(reasoner,model);





9.2.1 Patterns of RDFS entailment (Informative)

This section is non-normative.

RDFS entailment holds for all the following patterns, which correspond closely to the RDFS semantic conditions:

RDFS entailment patterns.
If S contains:then S RDFS entails recognizing D:
rdfs1any IRI aaa in Daaa rdf:type rdfs:Datatype .
rdfs2aaa rdfs:domain xxx .
yyy aaa zzz .
yyy rdf:type xxx .
rdfs3aaa rdfs:range xxx .
yyy aaa zzz .
zzz rdf:type xxx .
rdfs4axxx aaa yyy .xxx rdf:type rdfs:Resource .
rdfs4bxxx aaa yyy.yyy rdf:type rdfs:Resource .
rdfs5xxx rdfs:subPropertyOf yyy .
yyy rdfs:subPropertyOf zzz .
xxx rdfs:subPropertyOf zzz .
rdfs6xxx rdf:type rdf:Property .xxx rdfs:subPropertyOf xxx .
rdfs7aaa rdfs:subPropertyOf bbb .
xxx aaa yyy .
xxx bbb yyy .
rdfs8xxx rdf:type rdfs:Class .xxx rdfs:subClassOf rdfs:Resource .
rdfs9xxx rdfs:subClassOf yyy .
zzz rdf:type xxx .
zzz rdf:type yyy .
rdfs10xxx rdf:type rdfs:Class .xxx rdfs:subClassOf xxx .
rdfs11xxx rdfs:subClassOf yyy .
yyy rdfs:subClassOf zzz .
xxx rdfs:subClassOf zzz .
rdfs12xxx rdf:type rdfs:ContainerMembershipProperty .xxx rdfs:subPropertyOf rdfs:member .
rdfs13xxx rdf:type rdfs:Datatype .xxx rdfs:subClassOf rdfs:Literal .

RDFS provides for several new ways to be unsatisfiable recognizing D. For example, the following graph is RDFS unsatisfiable recognizing {xsd:integer, xsd:boolean}:

ex:p rdfs:domain xsd:boolean .
ex:a rdf:type xsd:integer .
ex:a ex:p ex:c .