---
title: Semantic Framework
description: "# Open-Source Code Repository links The release packages of Semantic Framework are available on a dedicated Open-Source GitHub repositories: - [https://github.com/DHS-SemanticFramework/SemanticFramework/releases](https://github.com/DHS-SemanticFramework/SemanticFramework/releases) - [https://github.com/DHS-SemanticFramework/SF-DataReceiver/releases](https://github.com/DHS-SemanticFramework/SF-DataReceiver/releases) - [https://github.com/DHS-SemanticFramework/SF-Natural-Language/releases](https://github.com/DHS-SemanticFramework/SF-Natural-Language/releases) # Public Docker Repository links The relevant Docker images are available on dedicated Public Docker…"
url: "https://collgs.esa.int/docs/semantic-framework/"
updated: "2024-07-17"
category: Software Guide
---

# Semantic Framework

# Open-Source Code Repository links

The release packages of Semantic Framework are available on a dedicated Open-Source GitHub
repositories:

- [https://github.com/DHS-SemanticFramework/SemanticFramework/releases](https://github.com/DHS-SemanticFramework/SemanticFramework/releases)
- [https://github.com/DHS-SemanticFramework/SF-DataReceiver/releases](https://github.com/DHS-SemanticFramework/SF-DataReceiver/releases)
- [https://github.com/DHS-SemanticFramework/SF-Natural-Language/releases](https://github.com/DHS-SemanticFramework/SF-Natural-Language/releases)

# Public Docker Repository links

The relevant Docker images are available on dedicated Public Docker Hub repositories:

- [https://hub.docker.com/r/collaborativedhs/semantic_framework/tags](https://hub.docker.com/r/collaborativedhs/semantic_framework/tags)
- [https://hub.docker.com/r/collaborativedhs/sf-datareceiver/tags](https://hub.docker.com/r/collaborativedhs/sf-datareceiver/tags)
- [https://hub.docker.com/r/collaborativedhs/sf-natural-language/tags](https://hub.docker.com/r/collaborativedhs/sf-natural-language/tags)
- [https://hub.docker.com/r/openlink/virtuoso-opensource-7/tag](https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhub.docker.com%2Fr%2Fopenlink%2Fvirtuoso-opensource-7%2Ftags&data=05%7C02%7CElisabetta.Giuliani%40serco.com%7C5ff9a5529132416aa06e08dca0ee59d4%7Cf93616dd45a640c89e29adab2fb5f25c%7C0%7C0%7C638562193011379441%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=kB7AFwBGb4uTsF30zQI5jRgmKauSvtnHrCcSZgnK0i0%3D&reserved=0)

# Installation and Configuration Guidelines

The installation of the Semantic Framework is achieved using the docker-compose.

## Software pre-requirements

The following software must be pre-installed on the Virtual Machine:

- Docker version (>=2.3.0.3)
- Docker engine (>=19.03.08)
- docker-compose (>=1.25.5)
- curl (>=7.75)
- unzip (>=6.0)

## Installation

The following commands will install a version of Semantic Framework software:

```
curl -LJO https://github.com/DHS-
SemanticFramework/SemanticFramework/archive/refs/tags/<SF-VERSION>.zip

unzip <SF-VERSION>.zip

cd <SF-VERSION>
```

In order to start the docker-compose, it is then necessary to configure properly the following files

- config_nl/keycloak_configuration.json
- config_sf.json/configuration.json
- config_sf/keycloak_configuration.json

Please refer to Installation and Configuration Manual for details about the configuration.

 [COPE-SERCO-TN-22-1329 - Collaborative Data Hub Software - Semantic Framework Installation Configuration Manual v3.5](https://collgs.esa.int/wp-content/uploads/2024/07/COPE-SERCO-TN-22-1329 - Collaborative Data Hub Software - Semantic Framework Installation Configuration Manual v3.5.pdf)[Download](https://collgs.esa.int/wp-content/uploads/2024/07/COPE-SERCO-TN-22-1329 - Collaborative Data Hub Software - Semantic Framework Installation Configuration Manual v3.5.pdf)

Finally, the following command pulls the docker images from the Public Docker Repository and starts the docker-compose:

```
nohup docker-compose up &
```

## Knowledge Base population

The following request pre-populates the Knowledge Base with location-related information, and it indicates a successful installation of SF.

```
Method: HTTP POST

{{SERVICE-ROOT-URI}}/SemanticFramework/api/population
```

Please note that this procedure should run only once, during the installation of the Semantic Framework.

## Configuration

Please refer to Installation and Configuration Manual for details about the configuration.

Please find it here attached.

 [COPE-SERCO-TN-22-1329 - Collaborative Data Hub Software - Semantic Framework Installation Configuration Manual v3.5](https://collgs.esa.int/wp-content/uploads/2024/07/COPE-SERCO-TN-22-1329 - Collaborative Data Hub Software - Semantic Framework Installation Configuration Manual v3.5.pdf)[Download](https://collgs.esa.int/wp-content/uploads/2024/07/COPE-SERCO-TN-22-1329 - Collaborative Data Hub Software - Semantic Framework Installation Configuration Manual v3.5.pdf)

# API User Guide

The Semantic Framework exposes a REST API. Through this interface, the Framework allows to identify products useful for analysing earthquake events over a geographic location in a defined time span.

## Semantic query using City, Country syntax

```
Method: HTTP POST

{{SERVICE-ROOT-URI}}/SemanticFramework/api/retrieve

Body:

Content Type = application/json

{
        "text": "earthquake located in Troulloi, Cyprus in 2021 01 with
magnitude greater than 5.1",

    "page": "1"

}
```
