Class

net.sansa_stack.inference.spark.forwardchaining.triples

ForwardRuleReasonerEL

Related Doc: package triples

Permalink

class ForwardRuleReasonerEL extends TransitiveReasoner

This rule-based forward chaining reasoner implementation is based on the paper

'Pushing the EL envelope' by Baader, Brandt, Lutz. IJCAI. Vol. 5. 2005.

The paper does not cover the whole OWL 2 EL profile and makes some assumptions w.r.t. the allowed axioms. Given the set BC that contains

- owl:Thing - all concept names - all nominals { a } (with just one individual!) - concrete domain descriptions p(f1, ..., fk) (not used here)

The allowed general concept inclusions are the following (with C1, C2 \in BC, D \in BC \cup { owl:Nothin }):

- C1 \sqsubseteq D - C1 \sqcap C2 \sqsubseteq D - C1 \sqsubseteq \exists r.C2 - \exists r.C1 \sqsubseteq D

Role inclusions may be of the form

- r \sqsubseteq s , or - r1 o r2 \sqsubseteq s

We implemented the completion rules that were feasible in our setting.

Naming conventions: - C, C1, C2 --> class names, or nominals (with just one individual), or owl:Thing - D, D1, D2 --> class names, or nominals (with just one individual), owl:Thing, or owl:Nothing

Linear Supertypes
TransitiveReasoner, ForwardRuleReasoner, Profiler, Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ForwardRuleReasonerEL
  2. TransitiveReasoner
  3. ForwardRuleReasoner
  4. Profiler
  5. Logging
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ForwardRuleReasonerEL(sc: SparkContext, parallelism: Int = 2)

    Permalink

    sc

    The Spark context

    parallelism

    The degreee of parallelism (mainly used to derive the number of partitions for RDD.distinct(parallelism) calls)

Type Members

  1. case class Rule(name: String, getInferredTriples: (RDD[Triple]) ⇒ RDD[Triple]) extends Product with Serializable

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addTransitivePairs[A, B](s: Set[(A, B)]): Set[(A, B)]

    Permalink
    Definition Classes
    TransitiveReasoner
  5. def apply(graph: RDFGraph): RDFGraph

    Permalink

    Applies forward chaining to the given RDF graph and returns a new RDF graph that contains all additional triples based on the underlying set of rules.

    Applies forward chaining to the given RDF graph and returns a new RDF graph that contains all additional triples based on the underlying set of rules.

    graph

    the RDF graph

    returns

    the materialized RDF graph

    Definition Classes
    ForwardRuleReasonerELTransitiveReasonerForwardRuleReasoner
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def computeTransitiveClosure(edges: Dataset[Triple]): Dataset[Triple]

    Permalink

    Computes the transitive closure for a Dataframe of triples

    Computes the transitive closure for a Dataframe of triples

    edges

    the Dataframe of triples

    returns

    a Dataframe containing the transitive closure of the triples

    Definition Classes
    TransitiveReasoner
  9. def computeTransitiveClosure[A](edges: RDD[(A, A)])(implicit arg0: ClassTag[A]): RDD[(A, A)]

    Permalink

    Computes the transitive closure for an RDD of tuples

    Computes the transitive closure for an RDD of tuples

    edges

    the RDD of tuples

    returns

    an RDD containing the transitive closure of the tuples

    Definition Classes
    TransitiveReasoner
  10. def computeTransitiveClosure(triples: RDD[Triple], predicate: Node): RDD[Triple]

    Permalink

    Computes the transitive closure for the given predicate on an RDD of triples.

    Computes the transitive closure for the given predicate on an RDD of triples.

    triples

    the RDD of triples

    predicate

    the predicate

    returns

    an RDD containing the transitive closure of the triples

    Definition Classes
    TransitiveReasoner
  11. def computeTransitiveClosure(triples: RDD[Triple]): RDD[Triple]

    Permalink

    Computes the transitive closure on an RDD of triples.

    Computes the transitive closure on an RDD of triples. Note, that the assumption is that all triples do have the same predicate.

    triples

    the RDD of triples

    returns

    an RDD containing the transitive closure of the triples

    Definition Classes
    TransitiveReasoner
  12. def computeTransitiveClosure(triples: Set[Triple]): Set[Triple]

    Permalink

    Computes the transitive closure on a set of triples, i.e.

    Computes the transitive closure on a set of triples, i.e. it is computed in-memory by the driver. Note, that the assumption is that all triples do have the same predicate.

    triples

    the set of triples

    returns

    a set containing the transitive closure of the triples

    Definition Classes
    TransitiveReasoner
  13. def computeTransitiveClosurePairs[A, B](s: Set[(A, B)]): Set[(A, B)]

    Permalink
    Definition Classes
    TransitiveReasoner
  14. def computeTransitiveClosureSemiNaive[A](edges: RDD[(A, A)])(implicit arg0: ClassTag[A]): RDD[(A, A)]

    Permalink

    Semi-naive computation of the transitive closure T for an RDD of tuples R=(x,y).

    Semi-naive computation of the transitive closure T for an RDD of tuples R=(x,y).

    (1) T = R
    (2) ∆T = R
    (3) while ∆T != ∅ do
    (4) ∆T = ∆T ◦ R − T
    (5) T = T ∪ ∆T
    (6) end
    edges

    the RDD of tuples (x,y)

    returns

    an RDD containing the transitive closure of the tuples

    Definition Classes
    TransitiveReasoner
  15. val cr1: Rule

    Permalink

    CR1: C1 \sqsubseteq C2, C2 \sqsubseteq D => C1 \sqsubseteq D

  16. val cr10: Rule

    Permalink

    CR10: C \sqsubseteq \exists r.D, r \sqsubseteq s => C \sqsubseteq \exists s.D

  17. val cr11: Rule

    Permalink

    CR11: C \sqsubseteq \exists r1.D, D \sqsubseteq \exists r2.E, r1 o r2 \sqsubseteq r3 => C \sqsubseteq \exists r3.E

  18. val cr2: Rule

    Permalink

    CR2: C \sqsubseteq C1, C \sqsubseteq C2, C1 \sqcap C2 \sqsubseteq D => C \sqsubseteq D

  19. val cr3: Rule

    Permalink

    CR3: C1 \sqsubseteq C2, C2 \sqsubseteq \exists r.D => C1 \sqsubseteq \exists r.D

  20. val cr4: Rule

    Permalink

    CR4: C \sqsubseteq \exists r.D, D \sqsubseteq D2, \exists r.D2 \sqsubseteq E => C \sqsubseteq E

  21. val cr5: Rule

    Permalink

    CR5: C\sqsubseteq \exists r.D, D \sqsubseteq owl:Noting => C \sqsubseteq owl:Nothing

  22. def debug(msg: ⇒ String, o: Any, os: Any*): Unit

    Permalink
    Definition Classes
    Logging
  23. def debug(msg: ⇒ String, e: Throwable): Unit

    Permalink
    Definition Classes
    Logging
  24. def debug(msg: ⇒ String): Unit

    Permalink
    Definition Classes
    Logging
  25. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  26. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  27. def error(msg: ⇒ String, o: Any, os: Any*): Unit

    Permalink
    Definition Classes
    Logging
  28. def error(msg: ⇒ String, e: Throwable): Unit

    Permalink
    Definition Classes
    Logging
  29. def error(msg: ⇒ String): Unit

    Permalink
    Definition Classes
    Logging
  30. def extractTriples(triples: RDD[Triple], subject: Option[Node], predicate: Option[Node], obj: Option[Node]): RDD[Triple]

    Permalink

    Extracts all triples that match the given subject, predicate and object if defined.

    Extracts all triples that match the given subject, predicate and object if defined.

    triples

    the RDD of triples

    subject

    the subject

    predicate

    the predicate

    obj

    the object

    returns

    the RDD of triples that match

    Definition Classes
    ForwardRuleReasoner
  31. def extractTriples(triples: RDD[Triple], predicate: Node): RDD[Triple]

    Permalink

    Extracts all triples for the given predicate.

    Extracts all triples for the given predicate.

    triples

    the RDD of triples

    predicate

    the predicate

    returns

    the RDD of triples that contain the predicate

    Definition Classes
    ForwardRuleReasoner
  32. def extractTriples(triples: Set[Triple], predicate: Node): Set[Triple]

    Permalink

    Extracts all triples for the given predicate.

    Extracts all triples for the given predicate.

    triples

    the triples

    predicate

    the predicate

    returns

    the set of triples that contain the predicate

    Definition Classes
    ForwardRuleReasoner
  33. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  34. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  35. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  36. def info(msg: ⇒ String, o: Any, os: Any*): Unit

    Permalink
    Definition Classes
    Logging
  37. def info(msg: ⇒ String, e: Throwable): Unit

    Permalink
    Definition Classes
    Logging
  38. def info(msg: ⇒ String): Unit

    Permalink
    Definition Classes
    Logging
  39. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  40. def log: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  41. def logName: String

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  42. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  43. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  44. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  45. val parallelism: Int

    Permalink
    Definition Classes
    TransitiveReasoner
  46. def profile[R](block: ⇒ R): R

    Permalink
    Definition Classes
    Profiler
  47. val properties: Seq[Node]

    Permalink
    Definition Classes
    TransitiveReasoner
  48. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  49. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  50. def trace(msg: ⇒ String, o: Any, os: Any*): Unit

    Permalink
    Definition Classes
    Logging
  51. def trace(msg: ⇒ String, e: Throwable): Unit

    Permalink
    Definition Classes
    Logging
  52. def trace(msg: ⇒ String): Unit

    Permalink
    Definition Classes
    Logging
  53. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. def warn(msg: ⇒ String, o: Any, os: Any*): Unit

    Permalink
    Definition Classes
    Logging
  57. def warn(msg: ⇒ String, e: Throwable): Unit

    Permalink
    Definition Classes
    Logging
  58. def warn(msg: ⇒ String): Unit

    Permalink
    Definition Classes
    Logging

Inherited from TransitiveReasoner

Inherited from ForwardRuleReasoner

Inherited from Profiler

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped