Skip to content

NSpM Service

Caro edited this page Jul 22, 2018 · 4 revisions

The NSpM Service is a simple API for asking questions to DBpedia. Natural language queries are translated into SPARQL queries using the AKSW/NSpM project.

Endpoints

POST /nspm

Transform natural language question to SPARQL query using NSpM and request DBpedia with the result.

Parameter:

  • question: question (required) - question in natural language
  • preferredLanguage (optional) - answer in this language if possible, default: en

Response:

  • query: the query sent to DBpedia
  • value: the answer for the query, it has the type given in "type"
  • type: boolean | string | uri_list
  • status: ok | error

POST /sparql

Direct SPARQL request on DBpedia.

Parameter:

  • question: question (required) - the SPARQL query
  • preferredLanguage (optional) - answer in this language if possible, default: en

Response:

  • query: the query sent to DBpedia
  • value: the answer for the query, it has the type given in "type"
  • type: boolean | string | uri_list
  • status: ok | error

POST /nspm_training_data

Save a natural language question with it’s corresponding SPARQL query for training the network.

Parameter:

  • question (required) - question in natural language
  • query (required) - SPARQL query

Response:

  • status 400 if question or query not given
  • status 200 else
Clone this wiki locally