Logo

TGM v2

List
Category Template generation
Description

Description

Module for dependency-driven SPARQL template generation from natural language, for English and Korean. It takes in a question and generates pseudo-queries as well as a list of strings (so-called slots) for which data from the knowledge base is needed.

Approach

First, the question is linguistically analysed, annotating it with part-of-speech tags, dependency relations, and semantic role labels. Second, the resulting parse tree is transformed into a template, covering one possibility of the how natural language expressions correspond to constructs in the target SPARQL query. This is the template that is most faithful to the linguistic structure of the question.

The scoring of the templates follows a simple heuristics computing the number of nodes in the query body that are neither projection variables nor slots.

A documentation of the rule format can be found in the GitHub repository: https://github.com/okbqa/rocknrole/tree/master/src/main/resources/rules

Scope and limit

It relies on hand-crafted rules for transforming dependency parses into templates, so its quality and coverage is only as good as the rules.

How to deploy it

$ git clone https://github.com/okbqa/rocknrole
$ cd rocknrole
$ ./deploy.sh

Contact

For general questions and problems, get in touch with Christina Unger {cunger@cit-ec.uni-bielefeld.de}.
For questions related to Korean, you can also get in touch with Younggyun Hahm {hahmyg@kaist.ac.kr}.
Maintainer cunger@cit-ec.uni-bielefeld.de
Source-code URL https://github.com/okbqa/rocknrole
Homepage URL
Web service URL http://ws.okbqa.org:1515/templategeneration/rocknrole
Sample cURL command curl -H "Content-Type: application/json" -X POST -d '_sample_input_' _ws_url_ Test
Sample input
Sample output
List