Examples

Note: For up-to-date sample inputs and outputs, please refer to http://121.254.173.77:30000.

Input:

EN

{ "string": "Which rivers flow through Seoul?", "language": "en" }

KO

{ "string": "어떤 강이 서울을 흐르는가?", "language": "ko" }

Template generation output:

EN

{ "question": "Which rivers flow through Seoul?",

"query": "SELECT ?v2 WHERE { ?v2 ?v6 ?v1 . ?v2 ?v3 ?v5 . }",

"slots": [ {"s": "v5", "p": "is", "o": "owl:NamedIndividual"},

{"s": "v5", "p": "verbalization", "o": "Seoul"},

{"s": "v6", "p": "is", "o": "<http://lodqa.org/vocabulary/sort_of>"},

{"s": "v1", "p": "is", "o": "owl:Class"},

{"s": "v1", "p": "verbalization", "o": "rivers"},

{"s": "v3", "p": "is", "o": "owl:Property"},

{"s": "v3", "p": "verbalization", "o": "flow"} ],

"score": "1.0" }

KO

{ "question": "어떤 강이 서울을 흐르는가?",

"query": "SELECT ?v2 WHERE { ?v2 ?v6 ?v1 . ?v2 ?v3 ?v5 . }",

"slots": [ {"s": "v5", "p": "is", "o": "owl:NamedIndividual"},

{"s": "v5", "p": "verbalization", "o": "서울"},

{"s": "v6", "p": "is", "o": "<http://lodqa.org/vocabulary/sort_of>"},

{"s": "v1", "p": "is", "o": "owl:Class"},

{"s": "v1", "p": "verbalization", "o": "강"},

{"s": "v3", "p": "is", "o": "owl:Property"},

{"s": "v3", "p": "verbalization", "o": "흐르는가"} ],

"score": "1.0" }

Disambiguation output:

EN

{

"question": "Which rivers flow through Seoul?",

"ned": [

{

"classes": [

{

"var": "v1",

"score": 0.25,

"value": "http://dbpedia.org/ontology/River"

},

{

"var": "v1",

"score": 0.2564102564102564,

"value": "http://dbpedia.org/ontology/River"

}

],

"score": 1,

"properties": [

{

"var": "v3",

"score": 0.2564102564102564,

"value": "http://dbpedia.org/ontology/state"

}

],

"entities": [

{

"var": "v5",

"score": 1,

"value": "http://dbpedia.org/resource/Seoul"

}

]

}

]

}

KO

{

"question": "어떤 강이 서울을 흐르는가?",

"ned": [

{

"classes": [

{

"var": "v1",

"score": 0.25,

"value": "http://dbpedia.org/ontology/River"

},

{

"var": "v1",

"score": 0.2564102564102564,

"value": "http://dbpedia.org/ontology/River"

}

],

"score": 1,

"properties": [

{

"var": "v3",

"score": 0.2564102564102564,

"value": "http://dbpedia.org/ontology/city"

}

],

"entities": [

{

"var": "v5",

"score": 1,

"value": "http://ko.dbpedia.org/resource/서울특별시"

}

]

}

]

}

Query generation

Input:

{

"template": {

"query": "SELECT ?v2 WHERE { ?v2 ?v4 ?v1 . ?v2 ?v3 ?v5 . }",

"slots": [

{"s":"v5", "p":"is", "o":"owl:NamedIndividual"},

{"s":"v5", "p":"verbalization", "o":"Gunsan"},

{"s":"v1", "p":"is", "o":"owl:Class"},

{"s":"v1", "p":"verbalization", "o":"rivers" },

{"s":"v3", "p":"is", "o":"owl:Property"},

{"s":"v3", "p":"verbalization", "o":"flow through"},

{"s":"v4", "p":"is", "o":"owl:Property"},

{"s":"v4", "p":"value", "o":"SORTAL"}

],

"score": 1

},

"disambiguation": {

"score": 1,

"classes": [

{

"var": "v1",

"score": 0.25,

"value": "http://dbpedia.org/ontology/River"

},

{

"var": "v1",

"score": 0.2564102564102564,

"value": "http://dbpedia.org/ontology/River"

}

],

"properties": [

{

"var": "v3",

"score": 0.2564102564102564,

"value": "http://dbpedia.org/ontology/city"

}

],

"entities": [

{

"var": "v5",

"score": 1,

"value": "http://dbpedia.org/resource/Gunsan"

}

]

}

}

output:

[

{

"query": "SELECT ?v2 WHERE { ?v2 rdf:type <http://dbpedia.org/ontology/River> . ?v2 <http://dbpedia.org/ontology/city> <http://dbpedia.org/resource/Gunsan> . }",

"score": 1

}

]

...