FactGenerator is a s-p-o-g facts generator (s for subject, p for predicate, o for object and g for graph). It is written in C.
- The
src
folder which contains the differents sources files - The
executable
folder which will contains the executable file (Main) - The
data_Input
folder which contains three (03) files "observations.txt" (for the observations), "observations_externes.txt" (for external temperature observations) and "fichier_input_20s.txt" (which contains more observations ) - The
data_Output
folder which contains three (03) files "facts_observations.ttl" in relation to the "observations.txt" input file, "facts_observations_externes.ttl" in relation to the "observations_externes.txt" input file and "fichier_output_20s.ttl" in relation to the "fichier_input_20s.txt" input file.
These files represents the s-p-o-g facts that are generated after execution of the program
- The
serd folder
which will contains the differents files of the serd library - The
sord
folder which will contains the differents files of the sord library - The
makefile
file - The
src
readme.txt file - The
.gitignore
file - The
.gitmodules
file
The lines of the input files must respect at least one of the following formats:
year/month/day hour:minute:second emse/fayol/stair/room/sensors/sensorID/metrics/sensorType ObservedValue
for a principal observation
Example 2022/03/23 19:14:16 emse/fayol/e4/S405/sensors/6bd134b6-339c-4168-9aeb-ae7d0f236851/metrics/TEMP 27.37
year-month-day hour:minute:second emse/fayol/stair/room/sensors/sensorID/metrics/sensorType ObservedValue
for a principal observation
Example 2022-03-23 19:14:16 emse/fayol/e4/S405/sensors/6bd134b6-339c-4168-9aeb-ae7d0f236851/metrics/TEMP 27.37
year/month/day hour:minute:second emse/fayol/stair/room/sensorType/outside ObservedValue
for an external observation
Example: 2022/03/23 19:15:20 emse/fayol/4ET/409/TEMP/outside 13.36
year-month-day hour:minute:second emse/fayol/stair/room/sensorType/outside ObservedValue
for an external observation
Example: 2022-03-23 19:15:20 emse/fayol/4ET/409/TEMP/outside 13.36
To use this program in a Linux environment, one first needs to install its dependencies. These dependencies are git
and clang
. The installation procedure depends on one's Linux distribution. On a Ubuntu setup, this would be:
sudo apt-get install git
sudo apt-get install clang
Once the dependencies are installed, open a terminal and clone the repository:
https://github.com/digitsarl/devC.git
Then enter the devC directory:
cd devC
Now download FactGenerator submodules:
git submodule init
git submodule update
We provide a Makefile to compile FactGenerator. To compile and run the code presented in this readme, in the root folder run the following commands:
make
./executable/Main data_Input/nameOfFile_Input data_Output/nameOfFile_Output
-
nameOfFile_Input
represent the name of the input file (with extension .txt) which must first be contained in the folderdata_Input
-
nameOfFile_Output
represent the name of the output file (with extension .ttl) that will be created in the folderdata_Output
After, go in the folder data_Output
and take the file where is written the differents s-p-o-g facts generated.