Skip to content
/ lamapi Public

The Learning Analytics API is a REST web API strengthened by an auto-generated swagger documentation offering the possibility to access the content analytics applied on the X5GON OERs based on several implemented AI models.

License

Notifications You must be signed in to change notification settings

X5GON/lamapi

Repository files navigation

Learning Analytics Machine API (LAM API)

Contributors Forks Stargazers Issues License

Logo

Explore the full documentation »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About The Project

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.

Built With

Getting Started

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:

Prerequisites

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

Installation

  1. Clone the repository
    git clone https://github.com/X5GON/lamapi
  2. Install the Python packages
    pip3 install -r requirements.txt
  3. 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...):
   pg_restore -U dbuser -h localhost -d x5gon -Fc -C components/db/init/x5gon.dmp
  • Fill up your "x5gon" DB with your OERs corpus.
  1. Set up the LAM API and the DB configuration by updating the configuration file
  2. 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.
  3. Run your LAM API from the terminal:
    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
    The API is designed to consider the Proxy and SSL functionnalities, so the arguments are as follows:
      -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
    

Troubleshooting

  • 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.

Usage

Once the API is running and all the environment prerequisites are satisfied, you can test your endpoints using one of the following methods:

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}"

Search service request Search service response

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the BSD-2-Clause License. See LICENSE for more information.

Contact

Members

More updates are on going !

The LAM API is composed essentially from 3 principal components:

The Services

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

The X5gonlamtools

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

The X5gonlammodels

Are the AI LA computed models based on the OERs and the X5gonlamtools algorithms. more details >>

More updated version can be found on:

About

The Learning Analytics API is a REST web API strengthened by an auto-generated swagger documentation offering the possibility to access the content analytics applied on the X5GON OERs based on several implemented AI models.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published