dice-group / NEBULA

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nebula Application

Running the Application

To run the application, simply execute the main.py file using the command:

python main.py

The application will provide an API endpoint at:

http://127.0.0.1:5000

Methods

The Nebula application provides three methods: check ,status, test or default.

Check Method The check method accepts both POST and GET requests, and requires a text input to check for accuracy. Optional language input can also be provided for the text.

For POST requests, the text [text] input and optional language input [lang] should be passed in the request body. For GET requests, the text [text] input should be passed in the URL arguments along with the optional language input [lang].

    - English : en
    - German : de

The check method will return a JSON object containing an ID for the text input. Here is an example of the JSON response:

{
    "id": "123"
}

Status Method The status method also accepts both POST and GET requests, and requires an ID input to check the status of a previously submitted text input.

For POST requests, the ID input should be passed in the request body. For GET requests, the ID input should be passed in the URL arguments. The status method will return a JSON object containing information on the status of the checked text input. Here is an example of the JSON response:

{
    "id": "http://nebula.cs.uni-paderborn.de/id/123",
    "status": "Done",
    "text": "Text that has been checked",
    "lang": "Given language or detected language",
    "result": "The check result (WP5.1, either true / false or a numerical value)",
    "explanation": "Explanation generated by the explanation component (WP5.2)",
    "provenance": {
        "check-timestamp": "time at which the check has been started",
        "knowledge-date": "date of the latest news article known to the system",
        "model-date": "date of the model that has been used for classification"
    }
}
Note that the result value may differ during development phase.

test or default accept Get and if the service is running answer with this

{
  "test": "ok"
}

About


Languages

Language:Python 100.0%