OKBQA2‎ > ‎Documentation‎ > ‎

query-generation

Input

Example query: How many students does the Free University in Amsterdam have?
  • one pseudoquery (from the output of template generation)
  • one set of disambiguation (from the output of disambiguation)

{
"template":{
"query": "SELECT ?v2 WHERE { ?v1 ?p1 ?v2 . }", 
"slots":[
{"var": "v1", "form": "Free University in Amsterdam", "annotation": "owl:NamedIndividual" }, 
{"var": "p1", "form": "students", "annotation": "owl:DatatypeProperty" } 
], 
"score": 0.5
},
"disambiguation":{
"score":0.3,
"entities": [
{
"var": "v1", 
"value": "http://dbpedia.org/resource/Free_University_of_Berlin",
"type": "DBpedia:University",
"score": 0.3
}
],
"properties": [
{
"var": "p1",
"value": "http://dbpedia.org/property/students",
"score": 0.7
}
]
}
}

Output

  • list of SPARQL queries
[
    {"query":"SELECT ...","score":0.5},
    ...
]


Execusion command

  • rackup -p PORT_NUMBER -d