Explore the full documentation »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
The X5GON project stands for easily implemented freely available innovative technology elements that will converge currently scattered Open Educational Resources (OER) available in various modalities across Europe and the globe.
X5GON's Learning Analytics Machine (LAM) is capable of dealing with multi-lingual collections of OER. We can give you insight into the usage of your resources across different languages, make your content seen across the world and see how your resources are being used in different cultures.
The X5GON LAM API (models API) is a REST Flask Python web API strengthened by an auto-generated swagger documentation which offers the possibility to test the endpoints directly on a nice web page. Through the different offered endpoints, the users can consult the latest results and findings of the learning analytics work package. The endpoints give the possibility to access and fetch the content analytics made on the OERs based on the AI models implemented and tested on the X5gon corpus composed by the different OERs collected by the pipeline.
To get a local copy up and running follow these simple example steps:
- Install the environment python packages.
- Install the X5GON DB.
- Run your API.
Follow the instructions in the following sections:
Make sure you install the necessary python packages(and their related dependencies), on your activated environment:
- Create your environment(using conda for example), activate it.
- Run this on your terminal:
pip3 install -r requirements.txt python3 -m spacy download en
- Clone the repository
git clone https://github.com/X5GON/lamapi
- Install the Python packages
pip3 install -r requirements.txt
- Prepare the DB environment by creating the 'x5gon' database where all the data will be stored and from where the LAM API will source the OERs data (transcriptions, traductions, representations...):
- Follow the instructions mentioned in the platform-api, Installation section, 7th point about "creating x5gon DB".
- Create a DB user, having the select/update previleges (will be used by the API).
- Create the needed tables if not automatically added. The "x5gon DB schema" can be consulted in the delivrable D 3.2, section 6. In order to create the missing tables if needed, refer to the simplified x5gon db schema:
pg_restore -U dbuser -h localhost -d x5gon -Fc -C components/db/init/x5gon.dmp
- Fill up your "x5gon" DB with your OERs corpus.
- Set up the LAM API and the DB configuration by updating the configuration file
- Build the models & update the DB with the needed OERs representations, to do that:
- Move to the lamapi root folder:
- Execute the python commands found in the models updater file, in the order, in your terminal.
- Run your LAM API from the terminal:
The API is designed to consider the Proxy and SSL functionnalities, so the arguments are as follows:
python3 lamapi.py -hs wp3.x5gon.org -p 5000 -ct /etc/letsencrypt/live/blind.x5gon.org/cert.pem -ky /etc/letsencrypt/live/blind.x5gon.org/privkey.pem -bdh 192.168.1.7 -bdn x5gon -bdu wp3lam -bdpw 'mal3pw#51!&#prod' -bdp 5432 -d
-hs localhost : The API host/domain name -p 5000 : The API port name -ct /path/to/your/cert.pem : SSL certificate file -ky /path/to/your/privkey.pem : SSL private key file -bdh localhost : DB host/domain name -bdn x5gon : DB name -bdu x5gondbuser : DB user name -bdpw 'x5gondbuserpassword' : DB user password -bdp 5432 : DB port -d : debug mode or not
-
If there are issues while executing the "models update commands", please run the API with a minimum configuration of models activated, then run the "update endpoints" instead.
-
To configure the activated models:
- Refer to the modelloader file
- Enable/Disable the needed models by commenting the suitable lines.
Once the API is running and all the environment prerequisites are satisfied, you can test your endpoints using one of the following methods:
- Visit the swagger documentation on : localhost:5000
- Execute in your terminal one of the requests mentionned on the lamapi_routes_test file
- Execute one of the Python/Shell scripts to launch a bench of tests.
Here is how it's looking the swagger documentation once the LAM API is up and running, the [Official X5GON LAM API](https://wp3.x5gon.org/lamapidoc.
An example of endpoint execution, the SEARCH SERVICE:
curl -X POST "https://wp3.x5gon.org/searchengine/v1" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"text\": \"machine learning applied on health sector\", \"type\": \"pdf\", \"page\": 1, \"model_type\": \"doc2vec\", \"remove_duplicates\": 1, \"nb_wikiconcepts\": 5, \"return_wikisupport\": 0}"
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the BSD-2-Clause License. See LICENSE for more information.
- Victor Connes - victor.connes@gmail.com
- Walid Ben Romdhane - @walidbrw - walid_benromdhane@hotmail.fr
- Colin de la Higuera - cdlh@univ-nantes.fr
The LAM API is composed essentially from 3 principal components:
Are the endpoints implemented above the Learning Analytics(LA) heureustics and models in order to be able to use them as independant services. Many services types are implemented to treat many LA problems, more details >>
More updated version can be found on X5GON LAM API repository of the X5GON-University of Nantes team
Are the algorithms behind the core of the Services that are using the OERs, in their different format (transcriptions, translations, metadata) to be able to compute the LA heurestics/metrics and generate the LA models needed for the Services. These algorithms designed to solve many intersting Learning Ananlytics problems such as: Difficulty, order, concept continuity within an OER... more details >>
More updated version can be found on X5GON LAM Tools repository of the X5GON-University of Nantes team
Are the AI LA computed models based on the OERs and the X5gonlamtools algorithms. more details >>
More updated version can be found on: