
rules.rdfs-simple.rules Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sansa-inference-spark_2.12 Show documentation
Show all versions of sansa-inference-spark_2.12 Show documentation
Apache Spark based inference layer for RDF and OWL
The newest version!
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#------------------------------------------------------------------
# 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.
# and only includes the minimum useful core rules with no axioms.
# $Id: rdfs-fb-tgc-simple.rules,v 1.4 2009-03-09 18:10:16 der Exp $
#------------------------------------------------------------------
#------------------------------------------------------------------
# Tabling directives
#------------------------------------------------------------------
#-> tableAll().
#------------------------------------------------------------------
# RDFS Closure rules
#------------------------------------------------------------------
[rdfs2: (?p rdfs:domain ?c), (?x ?p ?y) -> (?x rdf:type ?c)]
#[rdfs2: (?p rdfs:domain ?c) -> [(?x rdf:type ?c) <- (?x ?p ?y)] ]
[rdfs3: (?p rdfs:range ?c), (?x ?p ?y) -> (?y rdf:type ?c) ]
#[rdfs3: (?p rdfs:range ?c) -> [(?y rdf:type ?c) <- (?x ?p ?y)] ]
[rdfs7: (?p rdfs:subPropertyOf ?q), (?a ?p ?b), notEqual(?p,?q) -> (?a ?q ?b)]
# 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) ]
[rdfs9: (?x rdfs:subClassOf ?y), (?a rdf:type ?x) -> (?a rdf:type ?y) ]
# Not needed - replaced by TGC front end
[rdfs11: (?a rdfs:subClassOf ?b), (?b rdfs:subClassOf ?c) -> (?a rdfs:subClassOf ?c)]
[rdfs5: (?a rdfs:subPropertyOf ?b), (?b rdfs:subPropertyOf ?c) -> (?a rdfs:subPropertyOf ?c)]
© 2015 - 2025 Weber Informatics LLC | Privacy Policy