Development‎ > ‎Architecture‎ > ‎

Controller

This module links the inputs and outputs of all modules (template generation modules, disambiguation modules, query generation modules) and returns final answers of an input question string using an answer generation module embedded in the control module. This module supports the address configuration of each module and SPARQL endpoints.


Controller v1.0

Input is a question string, a language tag, and configuration that indicates lists of addresses of each module ("tgm", "dm", "qgm" fields in the below example) and SPARQL endpoints ("kb" field in below example):

{
    "string": "question", 
    "language": "en", 
    "conf": {
        "tgm": ["tgm_address_1", ... ], 
        "dm": ["dm_address_1", ... ], 
        "qgm": ["qgm_address_1", ... ], 
        "kb": ["kb_address_1", ... ]
    }
}

The outputs are a log message and a list of answers of a question string:

{ "log": "log_message", "answers": [answer_1, answer_2, ..., answer_n] }

Controller v1.5

The controller v1.5 is enhanced version of the controller v1.0 w.r.t. concurrency control and load control. The capability of load control is achieved by adjusting the number of answers to be returned by the additional configuration field ("answer_num"). By adjusting the number of answers, testers can trade off the output time against the output size.

{
    "string": "question", 
    "language": "en", 
    "conf": {
        "tgm": ["tgm_address_1", ... ], 
        "dm": ["dm_address_1", ... ], 
        "qgm": ["qgm_address_1", ... ], 
        "kb": ["kb_address_1", ... ]
        "answer_num": "5"
    }
}

The outputs are a log message and a list of answers of a question string:

{ "log": "log_message", "answers": [answer_1, answer_2, ..., answer_5] }

Comments