Preliminaries
Partitioning Classes (PTCL)
Preliminaries
![]() PC Gender
Before answering any of the questions raised, we need to introduce some naming conventions and graphical notations. The visualization in figure PC-Gender is a so-called Ontograph of an example ontology using the naming conventions as described in [Bens2014]. Ontographs are created using the open source graphics library graphviz. The quick swith between ontology modeling and visualization supports very rapid prototyping, which facilitates error detection and correction. The Figure PC-Gender already shows some aspects that become important for our methodology. On the one hand, there is the question of how to express whether attribute values of an entity are allowed to change (mutability). On the other hand, it should be possible to specify whether only one value or several values are allowed (multiplicity) for the same attribute of an entity. We will return to the example later, when we will discuss the Partitioning Class (PC) for the attribute
Gender in more detail. What we define below as Knowledge Representation Language (KRL) provides a simpler syntax compared to languages like RDF/RDFS. The new aspect we introduce are the naming conventions, which are intended to contribute to clarity, compactness, and better readability. In particular, we believe that the introduced prefixes for ontology entity names could be used without conflict in languages such as RDF/RDFS. |
Name Sets:
As our key naming convention, the name of an ontological concept always uses the index of the designating set as its prefix: N = {char}* is a set of character strings / literals. In order to have unambiguous designation of the names of ontological concepts we introduce the following naming sets: Nx = {xn | n ∈ N}, N* = ∪ Nx with x ∈ {^, ., ◊, >, »}, and where N^ are class names, N. are data property names, N◊ are object property names, N> are particular names, and N» are relator names.
Knowledge Graph (KG):
Wikipedia defines a knowledge graph as “a knowledge base that uses a graph-structured data model or topology to represent and operate on data”. We give a more formal definition which can be seen as a kind of least common denominator: With
s, p, o ∈ N the smallest syntactic storage unit of a KG is a triple of the form (s, p, o). We define a Knowledge Graph (KG) as the set of all these triples with KG ⊆ N x N x N. For us each ontology is represented by a Knowledge Graph (KG).Filters:
Let ≤ be a non-strict order relation, while the pair (M, ≤) is called a non-strictly ordered set. A filter or order filter (OF) is a special subset of a partially ordered set (poset). E.g., we use filters to construct parent and child hierarchies of classes. Given
x, y ∈ N we define: x≤y ⇔ (x, »subClassOf, y) ∈ KG or (x, »is, y) ∈ KG or (x, »has, y) ∈ KG.{{definition:PF:principal filter:∵a = {x∈M| a≤x} is the parent hierarchy of a.}}
{{definition:PI:principal ideal:∴a = {z∈M| z≤a} is the child hierarchy of a.}}
Data Properties (DP) are defined with exactly one so-called Atomic Data Type (ADT). An
:adt is an element of the set :ADT = {:String, :Integer, :Decimal, :Float, :Boolean, :Duration, :Date, :Time, ...}. The definition of DPs for a universal u follows the scheme (u, .a, :adt) ⇔ (.a, »hasDomain, u) ∧ (.a, »hasRange, :adt), for example, (^Person, .Gender, :String) which, e.g., can be instantiated to (>ANM_Joe, .Gender, male). Based on the following definition of MM-Sets, each property can be used as a function in the mathematical sense, e.g., .Gender(>ANM_Joe) = male. In most cases, entities have exactly one value for an attribute, e.g. for ‘age’, ‘place of birth’ etc. However, there are also attributes such as ‘gender’, ‘fur color’ etc. where an entity can have multiple values for the same attribute. To be able to handle both cases mathematically correctly and to be able to view attributes as functions that return the set of values for an entity, we introduce so-called MM sets. Let X be a set and P(X) its powerset. The set MMX contains all elements of P(X) in such a way that the single elements are included without curly brackets. P(X) and MMX have the same size, but are different. We use an isomorphism iso: P(X) → MMX where y = iso(x) is defined by (1) If x = ∅, then iso(x) := ∅. (2) If x = {v} has one element, then iso(x) := v. (3) If x = {v1, v2, v3, … , vn} has more than one element, then iso(x) := x.- Let C=^natPerson be a class, A=.Gender an attribute of C, and VS(A) the Value Set (VS) of A. Then, with VS(A) = {male, female} we abbreviate WA:= MMVS(A) = MM{male, female} = {∅, male, female, {male, female}}.
- Let C be the extension of C, i.e., the set of particulars of ∴C. Then we can interpret each attribute A as a function A: C → WA which assigns the attribute value(s) from WA to any instance X ∈ C. E.g., for a particular we get .Gender(>NPS-Carl_Linnaeus) = male and for classes we get .Gender(^Earthworm) = {male, female}, and .Gender(^Bacterium) = ∅.
- For an instance X with multiple values for attribute A with n≥2 we have: (X, A, v1) ∈ KG ∧ ... ∧ (X, A, vn) ∈ KG ⇔ A(X) = {v1, … , vn}.
Ontology Query Language:
In the following, we define with the Ontology Query Language (OQL) a simple recursive query language which is easily applicable to Knowledge Graphs (KG) and which compared to SPARQL (Bob DuCharme [DuCh2013]) does not need variables. Using the getSubjects (gS) function, we define the ConjQuery (cq) function, which is used as one of the basic functions for reasoning, namely for Conjunctive Query Answering (CQA). For performance analysis in the Evaluation section we apply set operations to the query result sets.
{{definition:OQL:OQL:OqlQuery = getObjects | getSubjects | ConjQuery}}
{{definition:gO:getObjects:gO(s, p) = {o | (s, p, o) ∈ KG} }}
{{definition:gS:getSubjects:gS(p, r, o) = {s | (s, p, o) ∈ KG and (r ='' or p r o) } }}
{{definition:cQ:ConjQuery:cq(a1, [r1,] v1; a2 [r2,] v2; ...; an, [rn,] vn)) = gS(a1, [r1]v1) ∩ gS(a2, [r2]v2) ∩, ..., ∩ gS(an, [rn]vn) }}
Extension: deriver.app
Back to Introduction; Deriver documentation.
Source: taoke.de — Preliminaries.
