Skip to content

Repository for OTTAA's realiser algorithm, previously known as NLG, used for the OTTAA Labs option on the app.

License

Notifications You must be signed in to change notification settings

OTTAA-Project/Realiser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image

Welcome to OTTAA Project's Realiser

The realisation process consists of creating a coherent sentence out of a sequence of individual components, such as nouns, adjectives, subjects or verbs. OTTAA Project's Realiser carries out this process over the cloud providing an API service. This repository contains all the files and scripts necessary for its development.

How does it work?

The Realiser server recieves different types of API requests and responds with the results of the realisation process at different stages or carried out under different parameters. For a detailed explanation on the endpoints of the service and their corresponding request types, see the API Reference

Getting started:

For users:

We recommend everyone to start testing the service on an API platform or enviroment such as POSTMAN for web or desktop or Thunder Client for VSCode. Once the usecases have been tested and the expected outcome achieved they can be implemented on any app that has access to internet and a Native or External package for managing API requests, such as:

For developers:

Since the server is mounted on Firebase Cloud Functions, most of the code is NodeJS (Javascript). Therefore, to contribute with the development, it is required:

  • proper knowledge of the NodeJS Javascript programming language;
  • Node Package Manager (NPM), or other package manager for NodeJS;
  • a Firebase account (Google Accounts can be used) and a Firebase Project created, follow these steps;

Once your Firebase Project is created, generate a new Service Account and use the credentials on the provided JSON with the provided script. Most of the logic of the Realiser is based on a lexicon saved on an instance of the Firebase Realtime Database, for which we provide a simple example here. Build up on it as you wish, following these rules.

You are free to choose upgrading your Firebase plan to Blaze to be able to upload your own version of the Realiser to the cloud using Firebase Cloud Functions, but you can also develop and test new functionalities on a local server, propose those changes on a pull-request and see them applied on our side once it is merged. Keep in mind, though, that a local server might take longer to access data from resources like Realtime Database and Firestore Database.

After forking and cloning this repository, remember installing every necessary package, since the packages files are not commited or pushed because of their size. To do it, run npm i or npm install on the CLI after installing NPM. There is no need to specify which packages to install because they are already listed on the package.json file.

Still, there is a package that needs manual installation because it is generally installed globally: firebase-tools. To be able to run the server you will need to install it and initialize it following this tutorial, which also shows how to upload your first cloud function (remember you do not need to do this, you can develop and test the methods on a server deployed locally).

Testing

Testing is done using mocha and chai. To evaluate the testing process, run npm test on the functions folder. The results will be printed on console and outputted to a graphical report on functions/tests/results/ powered by mochawesome.

Resources

Libraries & tools

As commented above, the code for the Realiser is written in NodeJS, Javascript. The packages needed for development are listed on the package.json file, except for firebase-tools which is installed globally, see above. Some Python scripts might be used at some point for local actions like Data Analysis and/or Machine Learning model training or testing.

API reference

We use Swagger to create the API reference. More specifically, we use the module swagger-ui-express and the structure is build on functions/docs/swagger.config.json.

Contributing

Contributors help the OTTAA Project grow. If you would like to become a contributor, please read Contribute.

About

Repository for OTTAA's realiser algorithm, previously known as NLG, used for the OTTAA Labs option on the app.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages