<!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>Virtualized Ontology Query By Example</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Lucas Peres</string-name>
          <email>lucasperes@insightlab.ufc.br</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ticiana L. Coelho da Silva</string-name>
          <email>ticianalc@insightlab.ufc.br</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jose Macedo</string-name>
          <email>jose.macedo@insightlab.ufc.br</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>David Araujo</string-name>
          <email>david@insightlab.ufc.br</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Insight Data Science Lab</institution>
          ,
          <addr-line>Fortaleza - CE, BR</addr-line>
        </aff>
      </contrib-group>
      <fpage>148</fpage>
      <lpage>153</lpage>
      <abstract>
        <p>The Web has evolved to a large variety of data usually published in RDF from multiple domains. A recurrent problem in recent literature concerns to perform a search over RDF instead of using structured queries in triple-pattern-based languages like SPARQL, which only expert programmers can precisely specify their information needs. In this paper, we propose Von-QBE, an open source tool to query over RDF databases without any technical knowledge about RDF or the queried ontology structure. This differs from the-state-of-art tools by being schema-based instead of instance-based. It can be impracticable to use instance-based approaches in big data scenarios where the RDF data is huge and demands lots of computational resources to keep the knowledge base in memory. Moreover, most of these solutions need the knowledge base materialized into RDF(or triplified ), which can be costly for legacy bases. We present various demonstration scenarios using the IMDB movie ontology.</p>
      </abstract>
      <kwd-group>
        <kwd>RDF schema</kwd>
        <kwd>SPARQL query</kwd>
        <kwd>Query by Example</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The Web has evolved from a network of linked documents to one where both
documents and data are linked, resulting in what is commonly known as the
Web of Linked Data, that includes a large variety of data usually published in
RDF from multiple domains. As any database model, RDF requires formal query
languages to retrieve information. Tools that perform a search over RDF data
become increasingly important since writing structured queries in
triple-patternbased languages like SPARQL [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] can be extremely difficult for non-technical
users.
      </p>
      <p>Consider the example question, such as "Find the title of action movies
produced in Northern America and the name of their company". A possible
SPARQL query formulation, assuming a user familiar with the schema of the
underlying knowledge base and knows which entities are present at the data
instances, could consist of the following:</p>
      <p>SELECT DISTINCT ?x ?title ?company_name</p>
      <p>WHERE {
?x a mo:Movie; mo:title ?title;</p>
      <p>mo:isProducedBy ?y; mo:belongsToGenre [ a mo:Brute_Action ] .</p>
      <p>?y :companyName ?company_name; :hasCompanyLocation [ a mo:Northern_America ] .
}</p>
      <p>This complex query requires a user’s familiarity with the knowledge base,
which in general, no user (technical or not) should be expected to have.
Basically, Von-QBE (stands for Virtualized Ontology Query By Example) addresses
the problem: Given a natural language question QN and an underlying ontology
O, its goal is to translate QN into a formal query QS as SPARQL that
captures the information need to be expressed by QN . Von-QBE focuses on queries
that emphasize classes and relations between them, not considering aggregation,
disjunctive and negation queries.</p>
      <p>
        A considerable number of question answering approaches for RDF data has
been proposed, to name a few [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], and [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. They address the same
problem of Von-QBE, however, they are instance-based approaches, which can be
unfeasible in big data scenarios where the RDF data is huge and demands lots
of computational resources to keep the knowledge base in memory. Moreover,
most of these solutions need the knowledge base materialized into some RDF
format(triplified), which can be a hard task for legacy bases.
      </p>
      <p>
        [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] describes Von-QBE in details. Von-QBE derives from the term virtual
ontology, since it is not instance-based and it can use a virtualized ontology by
tools like Ontop[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] instead of materialized RDF stores like Virtuoso1. All in all,
Von-QBE is an open-source 2 schema-based approach to query over RDF data
without any previous knowledge about the ontology or RDF technical skills. It
lets the user queries using natural language questions or keyword search and
translates the search into a SPARQL formal query. Furthermore, Von-QBE
assists the user to construct his/her query search interactively, providing examples.
      </p>
      <p>A screencast of Von-QBE is available at YouTube 3. To the best of the
authors’ knowledge, this work is the first that addresses the problem of question
answering over RDF using only the schema. In the next section, we present
the main components of Von-QBE. In Section 3, we present the demonstration
scenarios. Section 4 draws the final conclusions.
2</p>
      <p>
        Von-QBE
Von-QBE addresses the problem of question answering over RDF. Beyond that,
it also helps the user to construct its search interactively, providing examples.
Figure 1 shows Von-QBE architecture which comprises three main components:
Fragment Extractor, Fragment Expansor and Query Builder. All these
components handle the ontology schema as an RDF graph[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], allowing the usage of
      </p>
    </sec>
    <sec id="sec-2">
      <title>1 https://virtuoso.openlinksw.com/</title>
      <p>2 http://github.com/insightlab/von-qbe
3 https://youtu.be/ScXgGzhbx50
Keyword Matcher</p>
      <p>Fragment</p>
      <p>Constructor
Fragment Extractor</p>
      <p>Users
Web Interface</p>
      <p>3 - Suggestions
Fragment
Expansor</p>
      <p>7 - Data
4 - SPARQL
2 - Fragment</p>
      <p>Query Builder
Ontology
Schema</p>
      <p>Von-QBE</p>
      <p>Query Executor</p>
      <p>L
Q
R
A
P
5S
a
t
a
D
6</p>
      <p>RDF Data</p>
      <p>
        Fragment Extraction is responsible for identifying, from a natural
language question QN , the ontology subset (here we call as a fragment ) that
corresponds to the classes and properties mentioned on QN . The Fragment Extraction
comprises two sub-components: 1) Keyword Matcher that identifies the ontology
concepts mentioned on QN by using similarity metrics[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], and 2) Fragment
Constructor that discovers how these concepts are related on the ontology schema by
using well-known graph algorithms: Dijkstra shortest path and Prim Minimum
spanning tree.
      </p>
      <p>Fragment Expansor. Von-QBE provides examples to the user by expands
QN using the ontology classes and properties that are directly connected to
the fragment retrieved from the previous module. Considering our ontology O
represented as an RDF graph, and the fragment nodes are ontology concepts,
the Fragment Expansor expands the fragment with all edges (of course, the ones
that are not already in the fragment) that come in (or out) from the fragment
nodes.</p>
      <p>Query Builder works as follows: each edge in the fragment (outputted by
Fragment Constructor or expanded with the suggestions outputted by Fragment
Expansor and accepted by the user) is added as a triple pattern in the query, and
the source and the target nodes are named as variables. Since the schema might
have properties with multiple domains and ranges, Query Builder also adds a
clause to inform the instance type (class) for each variable. All the triple patterns
are given as input to Apache Jena library4 which generates QS according to the
SPARQL syntax.</p>
    </sec>
    <sec id="sec-3">
      <title>4 http://jena.apache.org</title>
      <p>
        3
Von-QBE works with any RDF ontology that presents a schema and a SPARQL
endpoint. The current version of Von-QBE supports Virtuoso SPARQL endpoint
and Ontop[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] mapping to a non-RDF database. It is worth to mention that
VonQBE effectiveness depends on the RDF schema quality to work properly. In
this section, we present some demonstration scenarios using the IMDB Movie
Ontology5.
      </p>
      <p>Figure 2 shows Von-QBE’s interface. First, the user should write the keyword
search or the query at the text field. Once the user has written a term, Von-QBE
suggests other concepts or relations from the ontology schema based on the
userwritten term(s). Figure 2 shows the suggestions given by Von-QBE to the query:
movie title and actors. The property birth name (an attribute from the Actor
class) appears as a suggestion. The user can choose it and keep constructing the
search query.</p>
      <p>Once the user finishes writing the search query, he/she can limit the number
of triples returned based on a limit value and run the query over the database.
Von-QBE will then retrieve the results and return them to the user, as in Figure
3. Von-QBE also provides the generated SPARQL from the user query search,
5 https://sites.google.com/site/ontopiswc13/home/imdb-mo
In this paper, we present Von-QBE to address the problem of querying over RDF
databases using natural language question or a keyword search. Moreover,
VonQBE also helps the user to construct his/her query and translates the user-query
search into SPARQL query. From the authors’ knowledge, Von-QBE is the first
tool to address such a problem using only the ontology schema. As future work,
we aim at using natural language processing tools to detect entities described in
the query and find its corresponding concept over the ontology schema.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Arnaout</surname>
          </string-name>
          , H., and
          <string-name>
            <surname>Elbassuoni</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <article-title>Effective searching of rdf knowledge graphs</article-title>
          .
          <source>Journal of Web Semantics</source>
          <volume>48</volume>
          (
          <year>2018</year>
          ),
          <fpage>66</fpage>
          -
          <lpage>84</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cogrel</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Komla-Ebri</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kontchakov</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lanti</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rezk</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rodriguez-Muro</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Xiao</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          <article-title>Ontop: Answering sparql queries over relational databases</article-title>
          .
          <source>Semantic Web</source>
          <volume>8</volume>
          ,
          <issue>3</issue>
          (
          <year>2017</year>
          ),
          <fpage>471</fpage>
          -
          <lpage>487</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Consortium</surname>
            ,
            <given-names>W. W. W.</given-names>
          </string-name>
          , et al.
          <source>Rdf</source>
          <volume>1</volume>
          .
          <article-title>1 concepts and abstract syntax</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Gomaa</surname>
            ,
            <given-names>W. H.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Fahmy</surname>
            ,
            <given-names>A. A.</given-names>
          </string-name>
          <article-title>A survey of text similarity approaches</article-title>
          .
          <source>IJCA 68</source>
          ,
          <issue>13</issue>
          (
          <year>2013</year>
          ),
          <fpage>13</fpage>
          -
          <lpage>18</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Peres</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Silva</surname>
          </string-name>
          , T. L. C. d.,
          <string-name>
            <surname>Macedo</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Araujo</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <article-title>Ontology based query by example</article-title>
          .
          <source>ER</source>
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Usbeck</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ngomo</surname>
            ,
            <given-names>A.-C. N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bühmann</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Unger</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <article-title>Hawk-hybrid question answering using linked data</article-title>
          .
          <source>In European Semantic Web Conference</source>
          (
          <year>2015</year>
          ), Springer, pp.
          <fpage>353</fpage>
          -
          <lpage>368</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Xu</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Feng</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Zhao</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <article-title>Answering natural language questions via phrasal semantic parsing</article-title>
          .
          <source>In Natural Language Processing and Chinese Computing</source>
          . Springer,
          <year>2014</year>
          , pp.
          <fpage>333</fpage>
          -
          <lpage>344</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Yahya</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Berberich</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Elbassuoni</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ramanath</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tresp</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Weikum</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          <article-title>Natural language questions for the web of data</article-title>
          .
          <source>In Proceedings of the 2012 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning</source>
          (
          <year>2012</year>
          ),
          <article-title>Association for Computational Linguistics</article-title>
          , pp.
          <fpage>379</fpage>
          -
          <lpage>390</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Yih</surname>
          </string-name>
          , S. W.-t.,
          <string-name>
            <surname>Chang</surname>
          </string-name>
          , M.-W.,
          <string-name>
            <surname>He</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Gao</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <article-title>Semantic parsing via staged query graph generation: Question answering with knowledge base.</article-title>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>