Description |
Description
It is an implementation of the control module on the OKBQA architecture. The module gets question, language, and configuration as an input (JSON format) and returns the output (JSON format) with a list of answers corresponding to the input question with SPARQL queries for getting the answers. Each modules for being used to answer the question can be configured by giving the "conf" field of the input JSON. The example is shown right below.
{
"string": "Which rivers flow through Seoul?",
"language": "en",
"conf": {
"tgm": ["tgm_address_1", "tgm_address_2", ..., "tgm_address_a"],
"dm": ["dm_address_1", "dm_address_2", ..., "dm_address_b"],
"qgm": ["qgm_address_1", "qgm_address_2", ..., "qgm_address_c"],
"agm": ["agm_address_1", "agm_address_2", ..., "agm_address_d"],
"kb": ["kb_address_1", "kb_address_2", ..., "kb_address_e"],
"graph_uri": "graph_uri_1",
"timelimit": time_limit
}
}
The value of the "timeout" field limits the responding time of each module.
If configuration is not provided, the default configuration will be used. The default setting of the configuration is as follows:
{
"conf": {
"tgm": ["http://121.254.173.77:1555/templategeneration/templator/"],
"dm": ["http://121.254.173.77:2357/agdistis/run"],
"qgm": ["http://121.254.173.77:38401/queries"],
"agm": ["http://121.254.173.77:7744/agm"],
"kb": ["http://dbpedia.org/sparql"],
"graph_uri": "",
"timelimit": 10
}
}
The implementation returns not only answers, but also log messages can be useful for debugging each module by developers.
The implementation fully support concurrency control as well.
Scope and limit
This implementation is an almost initial version of a control module, so there are many functionalities can be added to the implementation.
The implementation provides only limited configuration fields in an input JSON, e.g., only addresses of each module. There can be many configuration fields that can be useful for the entire pipeline to be efficiently tested.
Currently, KB addresses and a graph URI can be configured independently, which could be undesirable for users who want to specify graph URIs for each KB. It will be revised in the next version of the implementation.
|