Semantic Knowledge Graph (SemKG)

Catalink | Centre for Research & Technology Hellas

Description

In order to provide a user-friendly interface and prevent interested stakeholders from writing complex SPARQL queries for accessing and managing the knowledge residing in the ALAMEDA ontology, SemKG serves as the sole entry point for inserting and retrieving data. The SemKG component encompasses:

  • The semantic model, i.e., the ALAMEDA ontology.
  • Instance data fed to the ontology as outputs from other ALAMEDA components.
  • The repository for persisting the populated semantic model, i.e., RDF triplestore.
  • The REST API for interacting with the information residing in the repository.

Documentation

Inputs and Outputs

Through its RESTful API, SemKG allows submitting HTTP requests: POST requests for ingesting component outputs into the ontology; GET requests for retrieving information from the ontology.

However, due to the sensitive nature of personal information stored in the ontology, the SemKG module in the AI Toolkit gives access only to anonymized and aggregate information as well as schema knowledge (i.e., ontology concepts and attributes).

For the first version of the toolkit, only schema information are available, with regards to sleep disorders and sentiment assessment, which are retrieved in JSON-LD format, in order to comply to the W3C semantic interoperability standards. Our motivation is for third-party researchers to adopt the schemes in their applications.

Background Info

SemKG is fully compliant to W3C standards: RDF/OWL for semantically representing all pertinent concepts, SPARQL for querying the semantic Knowledge Graph, JSON-LD for representing the retrieved information in a format facilitating semantic interoperability.

Installation Ιnstructions

The Semantic Knowledge Graph module requires a SPARQL-enabled RDF triplestore, which is defined by its SPARQL endpoint URL. To pull and run the SemKG Docker image use the following commands:

  • Download the graph from the repository:

    sftp -P 4569 sftp_alameda@91.184.203.22:./sftp_alameda/statements.nt ./preload/import/statements.nt
  • Navigate to the preload folder:

    cd ./preload
  • Load existing graph data to the db:

    docker compose up
  • Navigate back to root and build the image:

    cd .. && docker build -t semkg -f Dockerfile .
  • Start the graphDB & semkg services:

    docker compose up
  • The SemKG API is accessible at:

    http://localhost:4568

Datasets & Samples

Sample outputs:

OpenAPI Documentation

View Swagger Documentation