<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>A Guided Template-Based Question Answering System over Knowledge Graphs</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Lukas Biermann</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sebastian Walter</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Philipp Cimiano</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Knowledge Engineering Team</institution>
          ,
          <addr-line>Semalytix GmbH</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Semantic Computing Group, Bielefeld University</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Question answering systems provide easy access to structured data, in particular RDF data. However, the user experience is often negatively a ected by questions that are not interpreted correctly. To remedy this, we present a new guided approach to QA that ensures that all questions that can be entered into the system also return a corresponding answer. For this, a template-based approach is used to generate all possible questions from a given RDF dataset using a number of templates. The question/answer pairs can then be indexed to provide autocompletion functionality at querying time. We describe the architecture and approach and present preliminary evaluation results.</p>
      </abstract>
      <kwd-group>
        <kwd>Template based QA</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>QALD</p>
      <p>Knowledge Graph</p>
    </sec>
    <sec id="sec-2">
      <title>Introduction</title>
      <p>Question answering systems over linked data (QALD) often su er from their
brittleness, that is the relatively high probability of not being able to parse and
execute a question correctly. This is problematic as it negatively a ects the user
experience and trust in a system. We hypothesize that user experience would be
signi cantly increased if all questions that can be entered into a query interface
would also produce an answer. Building on this hypothesis, we have developed a
QALD system that provides a controlled interface such that every question
entered is interpretable and returns and appropriate answer. This is accomplished
by a template-based approach that matches basic graph patterns over the data
and, using a lexicon, generates di erent variants of asking the same question. The
question and corresponding answer are stored in an index and used to provide
query writing support using auto-completion to propose possible continuations
of a query. In this paper we present our approach, which has been implemented
in Python and relies on Hbase as database for indexing question/answer pairs.
We illustrate the workings of the system using DBpedia as knowledge graph. A
live demo of the system will be shown during the demonstration session, which
is available at:</p>
    </sec>
    <sec id="sec-3">
      <title>Approach</title>
      <p>Our overall approach is visualized in gure 1. In an o ine process, a set of
prede ned templates are used to generate natural language questions and SPARQL
queries automatically. The SPARQL queries are evaluated and the resulting
question/answer pairs are stored and indexed in HBase3. On the basis of this
index, questions are retrieved while the user is typing a question and possible
completions are proposed in an auto-completion functionality.</p>
      <p>The retrieval of the data and the generation of the questions is displayed in
more detail in gure 2. The templates currently supported by the system are
given in the table below:
Template Example question
Basic Triple (Noun/Verb) Who is the wife of Barack Obama?
Verb with Prepositional Phrase Which team Walter Payton played for?
Participle Construction Basic In which programming language is gimp written?
Numeric Question What is the frequency of BBC Radio She eld?
MaxCount Who has the most alma maters?
Numeric Aggregation Which Educational Institution has the lowest faculty size?
Numeric Filter Give me all ships where the draft is less than &lt;number&gt;?
Ordering Give me all american football players ordered by birth place?
Geographic Give me all west german movies?</p>
      <p>In order to illustrate the behaviour of the system, we focus on the Basic Triple
(Noun/Verb) and the Verb with Prepositional Phrase pattern. We will assume
that for the property dbo:spouse the following lexical variants are in the lexicon:
spouse, marry, wife, husband. In these settings, the template-based question
generation would generate the following questions for the property dbo:spouse:</p>
      <p>The variance in the verbalizations for each template depends on the quality
and coverage of the lemon lexicon. To extend our approach a template with the
3 https://hbase.apache.org/</p>
      <p>Title Suppressed Due to Excessive Length
Who is the spouse of Barack Obama?
Who is the wife of Barack Obama?
spouse of Barack Obama?
husband of Barack Obama?</p>
      <p>
        Who is married to Barack Obama?
Who is the husband Barack Obama?
married to Barack Obama?
wife Barack Obama?
corresponding graph pattern has to be de ned. In the demo session we will show
how straight forward it is to do so.
For the evaluation the training data of QALD-5[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], QALD-6[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and QALD-7[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]
has been used. A total of 226 questions were used for the evaluation. Due to
the limitation of the used lexicon, we were only able to answer questions for
32 out of 62 used properties, corresponding to a set 89 questions answered in
total. Questions in QALD-7 were automatically matched to indexed questions
using Levensthein distance, selecting the question minimizing the distance. By
this, our system received a macro f-measure of 0:89%; outperforming AMAL
(f-measure of 0:75% as presented in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]). The latter was the best participant in
QALD-7.
      </p>
      <p>In addition to the automatic evaluation, we performed a manual evaluation
in which we were able to identify types of questions that can not be answered
given the current system. In particular, this analysis revealed that our system
can not answer questions involving two conditions, such as Give me all actors
who were born in Paris after 1950. One feasible solution for this example would
be to generate a template which combines two kinds of questions, calculating the
intersection between the answers, and using this data to generate new possible
questions.</p>
    </sec>
    <sec id="sec-4">
      <title>Conclusion</title>
      <p>
        In this paper we have proposed a novel approach to guided QA that relies on a
template-based approach to generate pairs of questions / answers o ine and
indexes them to support real-time auto-completion. Our system is very similar to
a system presented earlier by Rico et al. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], who also provides auto-completion
functionality but relies on a di erent index. If users use the auto-completion
functionality, then they are guaranteed to actually receive an answer to their
question, a crucial feature from a usability point of view. We have shown that
our system is competitive compared to the state-of-the-art. The main
limitation is the need for a large enough lexicon covering di erent lexical variants for
answering the same question. In the future, we plan to investigate if using an
ontology lexicalization system such as MATOLL[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] can alleviate the problem.
Alternatively we could use results from [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] to enrich the existing verbalization
of properties.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>D.</given-names>
            <surname>Gerber</surname>
          </string-name>
          and A.
          <string-name>
            <surname>-C. Ngonga</surname>
          </string-name>
          <article-title>Ngomo. Bootstrapping the linked data web</article-title>
          .
          <source>In Proceedings of the 1st Workshop on Web Scale Knowledge Extraction, workshop colocated with the 10th International Semantic Web Conference (ISWC</source>
          <year>2011</year>
          ),Bonn, Germany,
          <source>October 23-27</source>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>M.</given-names>
            <surname>Rico</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Unger</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Cimiano. Sorry</surname>
          </string-name>
          ,
          <article-title>I only speak natural language: a patternbased, data-driven and guided approach to mapping natural language queries to SPARQL</article-title>
          .
          <source>In Proceedings of the 4th International Workshop on Intelligent Exploration of Semantic Data (IESD</source>
          <year>2015</year>
          )
          <article-title>co-located with the 14th International Semantic Web Conference (ISWC</article-title>
          <year>2015</year>
          ), Bethlehem, Pennsylvania , USA, October
          <volume>12</volume>
          ,
          <year>2015</year>
          ., volume
          <volume>1472</volume>
          <source>of CEUR Workshop Proceedings. CEUR-WS.org</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>C.</given-names>
            <surname>Unger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Forascu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Lopez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. N.</given-names>
            <surname>Ngomo</surname>
          </string-name>
          , E. Cabrio,
          <string-name>
            <given-names>P.</given-names>
            <surname>Cimiano</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Walter</surname>
          </string-name>
          .
          <article-title>Question answering over linked data (QALD-5)</article-title>
          . In Working Notes of CLEF 2015 -
          <article-title>Conference and Labs of the Evaluation forum</article-title>
          , Toulouse, France, September 8-
          <issue>11</issue>
          ,
          <year>2015</year>
          ., volume
          <volume>1391</volume>
          <source>of CEUR Workshop Proceedings. CEUR-WS.org</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>C.</given-names>
            <surname>Unger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. N.</given-names>
            <surname>Ngomo</surname>
          </string-name>
          , and
          <string-name>
            <surname>E. Cabrio.</surname>
          </string-name>
          <article-title>6th open challenge on question answering over linked data (QALD-6)</article-title>
          . In Semantic Web Challenges - Third
          <source>SemWebEval Challenge at ESWC</source>
          <year>2016</year>
          , Heraklion, Crete, Greece, May 29 - June 2,
          <year>2016</year>
          , Revised Selected Papers, volume
          <volume>641</volume>
          of Communications in Computer and Information Science, pages
          <volume>171</volume>
          {
          <fpage>177</fpage>
          . Springer,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>R.</given-names>
            <surname>Usbeck</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. N.</given-names>
            <surname>Ngomo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Haarmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Krithara</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Roder, and</article-title>
          <string-name>
            <surname>G. Napolitano.</surname>
          </string-name>
          <article-title>7th open challenge on question answering over linked data (QALD-7)</article-title>
          . In Semantic Web Challenges - 4th
          <source>SemWebEval Challenge at ESWC</source>
          <year>2017</year>
          , Portoroz, Slovenia, May 28 - June 1,
          <year>2017</year>
          , Revised Selected Papers, volume
          <volume>769</volume>
          of Communications in Computer and Information Science, pages
          <volume>59</volume>
          {
          <fpage>69</fpage>
          . Springer,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>S.</given-names>
            <surname>Walter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Unger</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Cimiano. M-ATOLL</surname>
          </string-name>
          :
          <article-title>A framework for the lexicalization of ontologies in multiple languages</article-title>
          .
          <source>In The Semantic Web - ISWC 2014 - 13th International Semantic Web Conference, Riva del Garda, Italy, October 19-23</source>
          ,
          <year>2014</year>
          . Proceedings,
          <string-name>
            <surname>Part</surname>
            <given-names>I</given-names>
          </string-name>
          , volume
          <volume>8796</volume>
          of Lecture Notes in Computer Science, pages
          <volume>472</volume>
          {
          <fpage>486</fpage>
          . Springer,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>