Geranium is a system to empower the access to the Politecnico di Torino research activities (available within the IRIS portal) using semantic technologies and deep learning techniques applied on graphs.
The system consists of three main components:
- KG Generator: the goal of this component is to produce a KG from the JSON representation of IRIS data.
- Back-end: the goal of this component is to provide RESTful APIs to access data within the KG.
- Front-end: the goal of this component is to visualize and enable an interactive exploration of the results obtained from the back-end.
To generate the KG from the JSON representation of IRIS data, you can run the map.py
script.
The script offers many options, which can be reviewed by using the help option:
$ cd process
$ python map.py -h
The options for this script are the the following:
-b <json_file> : builds a rdf file starting from a provided json file
-o <output_file> : used to specify the output filename. If not specified, one including the timestamp is automatically provided
-n <number_of_topics> : used to specify the number of topics to extract with TellMeFirst from each abstract
-d : turn on debug messages
-f <file_format> : used to specify the file format (XML by default)
Install Python backend using conda environment
$ conda create -n geranium python=3.6
$ conda activate geranium
$ conda install requests
$ conda install -c conda-forge rdflib
$ conda install -c anaconda flask
$ pip install config
$ pip install langdetect
While in the conda environment:
python app.py
- type: publications
- topic: "Encoded label of topic"
- limit: "Number of lines"
- offset: "Offset within the response"
http://localhost:5000/api?type=publications&topic=Carbon%20nanotube&lines=10000&offset=0
- type: authors
- topic: "Encoded label of topic"
- limit: "Number of lines"
- offset: "Offset within the response"
http://localhost:5000/api?type=authors&topic=Carbon%20nanotube&lines=10000&offset=0
- type: publication
- limit: "Number of lines"
- offset: "Offset within the response"
- url: "Encoded url of a publication"
- type: author
- topic: "Encoded label of topic"
- limit: "Number of lines"
- offset: "Offset within the response"
- url: "Encoded url of a researcher"
- type: topics
- limit: "Number of lines"
- offset: "Offset within the response"
http://localhost:5000/api?type=topics&lines=100000&offset=0
- type: abstract
- topic: DBpedia URI of the topic
http://localhost:5000/api?type=abstract&topic=http://dbpedia.org/resource/2D_computer_graphics
The following commands are written for Debian 9.9, NodeJS v.12.6.0 and should be executed in sequence. Skip those unnecessary for your working environment, if needed.
$ sudo apt install nodejs
$ sudo npm install -g ionic
- Clone the repository
- Navigate to website folder
- Run
$ npm i
- Navigate to website folder
- Run
$ ionic serve
If compiling process is successful (Compiled successfully
in console) a browser window will be automatically opened at the address of the local server. If not try the following address in your browser: localhost:8100
.
To stop the development server press Ctrl-C.