This is a System that used memorized queries to simulate a question answering system.
Before you can start the system you have to configure the following properties in the application.properties file.
qado.resultset.maxrows=10000
-
qado.resultset.maxrows: The maximum number of rows that the system will return. If the database can only handle less than 10.000 rows you should change this value.
stardog.url=
stardog.database=
stardog.username=
stardog.password=
-
stardog.url: The url of the triplestore. For example: http://localhost:7200
-
stardog.database: The name of the database in the triplestore. For example: qado
-
stardog.username: The username of the triplestore. For example: admin
-
stardog.password: The password of the triplestore. For example: admin
virtuoso.url=
virtuoso.graph=
virtuoso.username=
virtuoso.password=
-
virtuoso.url: The url of the triplestore. For example: http://localhost:7200
-
virtuoso.graph: The name of the graph in the triplestore. For example: urn:bulkload:general
-
virtuoso.username: The username of the triplestore. For example: admin
-
virtuoso.password: The password of the triplestore. For example: admin
You can change the following properties in the application.properties file if necessary.
qado.question.knowledgebase=wikidata
qado.question.user=open
-
qado.question.knowledgebase: The knowledgebase that is used to answer the questions. For example: wikidata
-
qado.question.user: The user that is used to answer the questions. For example: open
You can ask a question by sending a POST request to the following url: http://demos.swe.htwk-leipzig.de:40165/mem-qa-system
.
The body of the request should contain a JSON object with the following properties:
-
question: (required) The question that you want to ask. It musst be a question in the QADO dataset.
-
language: (required) The language of the question. It musst be a language in the QADO dataset
-
number_of_results_items: The number of results that you want to receive. If this field is 0 or not in the request the system will return all results.
-
dataset: The dataset that you want to use. It musst be a dataset in the QADO database. If this field is not in the request the system will use datasets.
BE CAREFUL: If you send a request without number_of_results_items
and dataset
(Minimum Example) the system will
respond with all possible results. This can take a very long time.
{
"question": "What is the revenue of IBM?",
"language": "en",
"number_of_results_items": 5,
"dataset": "QALD-9-plus-test-wikidata"
}
{
"question": "What is the revenue of IBM?",
"language": "en",
"number_of_results_items": 5
}
The system has a Swagger UI. You can use it to test the system and to see the documentation of the endpoints.
The Swagger UI is available at the following url: http://demos.swe.htwk-leipzig.de:40165/swagger-ui/index.html
Swagger UI is available at the following url: http://demos.swe.htwk-leipzig.de:40165/swagger-ui.html