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.
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
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:
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:
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 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.
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.
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.
Contributors help the OTTAA Project grow. If you would like to become a contributor, please read Contribute.