All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openimaj.rdf.rules.rdfs-fb-tgc-noresource.rules Maven / Gradle / Ivy

There is a newer version: 1.3.10
Show newest version
#------------------------------------------------------------------
# RDFS rule set v0.1.
# This variant is used in the case where the subclass and subproperty
# lattices have been precomputed by a transitive graph closure cache.
# $Id: rdfs-fb-tgc-noresource.rules,v 1.3 2003/08/21 22:06:42 der Exp $
#------------------------------------------------------------------

#------------------------------------------------------------------
# Tabling directives
#------------------------------------------------------------------

-> table(rdf:type).

#------------------------------------------------------------------
# RDFS Axioms
#------------------------------------------------------------------

-> (rdf:type      rdfs:range rdfs:Class).
-> (rdfs:Resource  rdf:type  rdfs:Class).
-> (rdfs:Literal   rdf:type  rdfs:Class).
-> (rdf:Statement  rdf:type  rdfs:Class).
-> (rdf:nil        rdf:type  rdf:List).
-> (rdf:subject    rdf:type  rdf:Property).
-> (rdf:object     rdf:type  rdf:Property).
-> (rdf:predicate  rdf:type  rdf:Property).
-> (rdf:first      rdf:type  rdf:Property).
-> (rdf:rest       rdf:type  rdf:Property).
        
-> (rdfs:subPropertyOf rdfs:domain rdf:Property).
-> (rdfs:subClassOf rdfs:domain rdfs:Class).
-> (rdfs:domain rdfs:domain rdf:Property).
-> (rdfs:range rdfs:domain rdf:Property).
-> (rdf:subject rdfs:domain rdf:Statement).
-> (rdf:predicate rdfs:domain rdf:Statement).
-> (rdf:object rdfs:domain rdf:Statement).
-> (rdf:first rdfs:domain rdf:List).
-> (rdf:rest rdfs:domain rdf:List).

-> (rdfs:subPropertyOf rdfs:range rdf:Property).
-> (rdfs:subClassOf rdfs:range rdfs:Class).
-> (rdfs:domain rdfs:range rdfs:Class).
-> (rdfs:range rdfs:range rdfs:Class).
-> (rdf:type rdfs:range rdfs:Class).
-> (rdfs:comment rdfs:range rdfs:Literal).
-> (rdfs:label rdfs:range rdfs:Literal).
-> (rdf:rest rdfs:range rdf:List).

-> (rdf:Alt rdfs:subClassOf rdfs:Container).
-> (rdf:Bag rdfs:subClassOf rdfs:Container).
-> (rdf:Seq rdfs:subClassOf rdfs:Container).
-> (rdfs:ContainerMembershipProperty rdfs:subClassOf rdf:Property).

-> (rdfs:isDefinedBy rdfs:subPropertyOf rdfs:seeAlso).

-> (rdf:XMLLiteral rdf:type rdfs:Datatype).
-> (rdfs:Datatype rdfs:subClassOf rdfs:Class).

#------------------------------------------------------------------
# RDFS Closure rules
#------------------------------------------------------------------

# This one could be omitted since the results are not really very interesting!
#[rdf1and4: (?x ?p ?y) -> (?p rdf:type rdf:Property), (?x rdf:type rdfs:Resource), (?y rdf:type rdfs:Resource)]

[rdfs7b: (?a rdf:type rdfs:Class) -> (?a rdfs:subClassOf rdfs:Resource)] 

[rdfs2:  (?p rdfs:domain ?c) -> [(?x rdf:type ?c) <- (?x ?p ?y)] ] 
[rdfs3:  (?p rdfs:range ?c)  -> [(?y rdf:type ?c) <- (?x ?p ?y)] ] 
[rdfs5b: (?a rdf:type rdf:Property) -> (?a rdfs:subPropertyOf ?a)] 
[rdfs6:  (?p rdfs:subPropertyOf ?q), notEqual(?p,?q) -> table(?p), table(?q), [ (?a ?q ?b) <- (?a ?p ?b)] ]
# Would this work as well? Think so! see rdfs9-alt
# [rdfs6-alt:  (?p rdfs:subPropertyOf ?q), notEqual(?p,?q), (?a ?p ?b) -> (?a ?q ?b) ] 
[rdfs7:  (?a rdf:type rdfs:Class) -> (?a rdfs:subClassOf ?a)]
[rdfs10: (?x rdf:type rdfs:ContainerMembershipProperty) -> (?x rdfs:subPropertyOf rdfs:member)] 

[rdfs2-partial: (?p rdfs:domain ?c) -> (?c rdf:type rdfs:Class)]
[rdfs3-partial: (?p rdfs:range ?c)  -> (?c rdf:type rdfs:Class)]

# Either version should work, pure back one scales better.
# rdfs9:  (?x rdfs:subClassOf ?y) -> [ (?a rdf:type ?y) <- (?a rdf:type ?x)] ] 
[rdfs9-alt:  (?a rdf:type ?y) <- (?x rdfs:subClassOf ?y), (?a rdf:type ?x) ] 

# Not needed - replaced by TGC front end
#[rdfs8:  (?a rdfs:subClassOf ?b), (?b rdfs:subClassOf ?c) -> (?a rdfs:subClassOf ?c)] 
#[rdfs5a: (?a rdfs:subPropertyOf ?b), (?b rdfs:subPropertyOf ?c) -> (?a rdfs:subPropertyOf ?c)] 





© 2015 - 2024 Weber Informatics LLC | Privacy Policy