Loading and Inferencing

Loading Data into RDF Server #

SemSpect is a Snapshot Explorer #

SemSpect is a snapshot RDF data explorer and querying tool. This means that SemSpect does not fetch data from a SPARQL endpoint on demand, but loads the specified list of RDF input data for which it generates special indices. If the input data changes, the index must also be recalculated.

RDF SemSpect indices are managed by derivo SemStore, a proprietary in-memory RDF store. SemStore uses low-memory index structures that have been specially developed and optimized for the efficient processing of SemSpect front-end requests. Parts of these index structures are based on a variant of the Bitmap Triple (BT) indices, which extend the compact triple data structure of the RDF compression format HDT.

Since the SemStore indices for a given set of RDF datasets are persisted on disk, the initialization of SemSpect is much faster at each subsequent startup. Whether a persistent index already exists for a particular input is decided by checking for each of the supplied input files whether it has changed (modified date and time of the file system) since the index was created.

How is RDF data interpreted in SemSpect? #

SemSpect is an RDF data explorer rather than an RDF schema explorer. The provided RDF schema is used to distinguish RDF classes from resources and properties between resources resp. between a resource and a literal. If the schema part is missing or ambiguous, SemSpect tries to assume a schema that is as plausible as possible using heuristics. As a guide, SemSpect proceeds as follows:

  • all resources from the namespaces rdf:, rdfs:, owl:, swrl:, and xsd: (such as owl:Class) are not considered as explorable resources

  • all properties from the namespaces rdf:, rdfs:, owl: (such as rdf:type, rdfs:subPropertyOf) are not considered for exploration

  • SemSpect converts RDF collections (rdf:List, rdf:Seq, rdf:Bag, rdf:Alt) into human-readable sequence values that are displayed alongside usual data and annotation property assertions

  • SemSpect will process annotations on property assertions which have been reified according to RDF/ OWL or specified in the Turtle-star format and shows them in the tabular view of resources or property assertions

Supported Inference #

SemSpect applies basic inference including:

  • RDFS (rdfs:domain, rdfs:range, rdfs:subClassOf, rdfs:subPropertyOf)
  • owl:equivalentProperty, owl:inverseOf, owl:SymmetricProperty

This means that the logical consequences of these axioms are computed and written into the SemStore indices at load time. When exploring a dataset in SemSpect, you will see the supplied input data enriched with the results of these derivations. Note that there is an option to turn of entailments caused by rdfs:domain/rdfs:range in the configuration of the Index Generation.

SKOS Mode (Experimental) #

By default, the visualization of SKOS data in SemSpect is quite unintuitive, because the inherent hierarchy of the skos:broader/skos:narrower relations is not directly visible. For this reason SemSpect now offers a SKOS mode (see translateSKOSToRDFS configuration in Index Generation).

This mode “abuses” the idea of the traditional RDF class hierarchy to some extent with the aim of being able to visualize and explore SKOS data in SemSpect in a meaningful way. It adds RDF classes for the SKOS concept instances that have narrower concepts and rdfs:subClassOf relations for the skos:broader relations of such concepts. Moreover, skos:exactMatch relations between SKOS concepts are translated into class equivalence of the introduced RDF classes.

Remark: This approach uses punning as it introduces classes with the same IRI used by the originating individuals.

As an example, the following SKOS model:

:vegetable rdf:type skos:Concept .
:potato rdf:type skos:Concept .
:sweet_potato rdf:type skos:Concept .
:sweet_potato skos:broader :potato .
:potato skos:broader :vegetable .

is translated into:

# introduce classes and hierarchy for skos:Concepts (except for leaf concepts)
:vegetable rdf:type rdf:Class .
:potato rdf:type rdf:Class .
:vegetable rdfs:subClassOf skos:Concept .
:potato rdfs:subClassOf :vegetable .
# establish membership for new classes (concepts are a class member of their broader concepts)
:potato rdf:type :vegetable .
:sweet_potato rdf:type :potato .

and added to the entailments.

Furthermore, SemSpect identifies the root and leaf SKOS concept individuals:

derivo:SKOSRootConcept rdf:type rdf:Class ;
                       rdfs:label "[Root Concept]" .
derivo:SKOSLeafConcept rdf:type rdf:Class ;
                       rdfs:label "[Leaf Concept]" .                    

:vegetable rdf:type derivo:SKOSRootConcept .
:sweet_potato rdf:type derivo:SKOSLeafConcept .

With the help of this translation users can use more SemSpect functionalities to explore the SKOS taxonomy, for instance by starting with the “[Root Concept]” and then following the “has broader ←” relationship.

SKOS example exploration

Note: While this is useful, it does not accurately reflect the intent of the SKOS modeling principles. SemSpect will likely continue to develop the above translation to better handle SKOS models in the future.