<!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>Using Word Embeddings for Search in Linked Data with Ontodia</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Gerhard Wohlgenannt</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nikolay Klimov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dmitry Mouromtsev</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Daniil Razdyakonov</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dmitry Pavlov</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yury Emelyanov</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Intern. Lab. of Information Science and Semantic Technologies, ITMO University</institution>
          ,
          <addr-line>St. Petersburg</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Vismart Ltd.</institution>
          ,
          <addr-line>St. Petersburg, Russia https://vismart.biz</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>Ontodia is an open-source diagramming and visual exploration tool for linked data and ontologies. Here, we present an extension of the Ontodia data query functionalities. We evaluate di erent types and con gurations of word embeddings for improving recall and exibility of the Ontodia natural language interface. The demonstration will focus especially on the new query functionalities, where Ontodia will be applied to Wikidata as underlying dataset.</p>
      </abstract>
      <kwd-group>
        <kwd>Ontodia</kwd>
        <kwd>word embeddings</kwd>
        <kwd>Wikidata</kwd>
        <kwd>Linked Data</kwd>
        <kwd>visual interface</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        One of the key challenges of the Semantic Web and Linked Data is to make
the contents of datasets available to users which lack the skills to write semantic
queries and understand the underlying data schemata [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Ontodia [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] provides
visual data exploration for Linked Data in a step-by-step diagrammatic approach.
In this demonstration, we combine Ontodia with Wikidata as a knowledge graph.
Wikidata3 is a free and open knowledge base and the central data storage for
projects like Wikipedia.
      </p>
      <p>Ontodia allows users to understand and explore datasets, and to answer
information needs in a diagrammatic way. It combines its visual interface with
textual search for entities and properties in the dataset. Currently the retrieval of
entities and properties is limited to exact lexical matches with the labels de ned
in the dataset. As a simple example, if a user searches for persons married with
a given person, they might not get any results if they did not use the correct
label spouse for their query.</p>
      <p>In this work, we describe and evaluate improvements to the natural language
(NL) interface of Ontodia. The system nds and ranks properties related to a
user query using distributional semantics. We evaluate various types of word
embeddings against the pre-de ned set of aliases for the Wikidata properties. In
the demonstration, we plan to present Ontodia and its improved search features,
and to discuss our experiences of using word embeddings in querying linked data.</p>
      <sec id="sec-1-1">
        <title>3 https://www.wikidata.org</title>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Related Work</title>
      <p>
        We utilize distributional semantics in the form of word embeddings to enrich
the Ontodia NL interface. Word embeddings are language modeling techniques
that transform the vocabulary of a given corpus into a continuous and
lowdimensional vector space representation. Word embeddings have been applied
successfully to many NL processing problems, from word similarity estimations
to more complex tasks [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Shekarpour et al. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] describe the challenges in
Question Answering on Linked Data. Word embeddings and deep learning techniques
are prominently listed as promising techniques for future investigation.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>System Description</title>
      <p>Ontodia4 is a free online RDF and OWL diagramming tool. One of its main
usecases is the visual exploration of linked data sets, and the sharing of information
found. In the presented application, Ontodia is used inside the metaphacts5
platform to explore the Wikidata dataset.</p>
      <p>The application described in this demonstration paper is found at:
http://ontodia-prop-suggest.apps.vismart.biz/wikidata.html. To use
the system, a user can search eg. for \Van Gogh" among the Instances, and
then pull the entity onto the canvas in the center of the window.
In this demo, we focus on improving the NL interface of Ontodia. After
searching instances and classes in the left-hand side of the interface, users can
lter the list of properties of the entities displayed on the canvas. Previously,
only properties with labels exactly matching the search term were found. For
this demo, we experimented with di erent word embedding models to nd and
rank properties related to the user input. In a nutshell, using models trained</p>
      <sec id="sec-3-1">
        <title>4 http://www.ontodia.org 5 http://www.metaphacts.com</title>
        <p>Word Embeddings for Search in Linked Data
on a Wikipedia corpus, a representation of every Wikidata property is created
by the vectorial sum of the words in its label (and description text). Then we
compute the similarity of the user input (represented by the vectorial sum of its
words) with the entity properties, and rank the properties by similarity to the
user input. The goal is to make the NL interface more powerful and improve user
experience and ease-of-use. Figure 1 shows the result of searching for \family"
relations for entity Van Gogh.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Evaluation</title>
      <p>In this section we give an overview of the evaluation results for various word
embedding models for the task of property suggestion for user input terms.
4.1</p>
      <sec id="sec-4-1">
        <title>Evaluation Setup</title>
        <p>Wikidata includes 3323 di erent properties and 4603 property aliases. Although
the data quality of the aliases is sometimes questionable, the aliases are a su
ciently large gold standard dataset to evaluate our property suggestion modules.</p>
        <p>Like for user input, for any of the aliases, rst we extract the contained words,
and remove stopwords. Then the tool creates the vectorial sum of the alias words
using the pre-trained word embedding models (see below), and ranks all 3323
Wikidata properties by cosine similarity with the alias vector. We apply various
evaluation metrics. Due to space limitations, here we include only the ratio of
correct property suggestions for aliases in the top-N of the property ranking,
and the mean reciprocal rank (MRR).</p>
        <p>
          Also, we conduct experiments with many types, settings and di erent training
corpora for the word embeddings. The best results are encountered with
fastText [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] embeddings trained on a Wikipedia corpus, and LexVec [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] embeddings
trained on Wikipedia and a news corpus, both with vectors of 300 dimensions.
4.2
        </p>
      </sec>
      <sec id="sec-4-2">
        <title>Results</title>
        <p>In Table 1 we present the evaluation results for the fastText and LexVec
embeddings. We distinguish models which use only the words from the property label
to create the property vector (not using description) and property
representations that build the vectors by making vectorial sums which include both the
words from the property labels and the property descriptions.</p>
        <p>Using the property description text to create the property representations
improves service quality. Over all metrics, the fastText models perform best. This
may result from fastText using word morphology together with the word2vec
skipgram model, which is well suited for the task at hand.</p>
        <p>In the real world application in visual data exploration in Ontodia the task
is much easier as compared to the evaluation in Table 1. When we randomly
pick entities from Wikidata { we evaluated with 1154 random entities, these
have on average 29:5 properties per entity. When evaluating randomly picked</p>
        <p>Top 1
entities using the same gold standard data, 70:5% of rst ranked properties are
the correct ones, the Top-3 score is 85%, and the MRR is 0:80. The runtime of
queries is below 0.01 seconds, fast enough for interactive systems.
5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusions</title>
      <p>In this demonstration paper we present and evaluate the improved query
functionalities of Ontodia, which apply vector similarity with word embeddings
between query terms and entity properties. Extensive evaluations show the method
is su ciently accurate for integration in Linked Data visualization tools. In
future work we apply the method to other datasets, and the search for entities.
6</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgments</title>
      <p>This work was supported by the Government of the Russian Federation (Grant
074-U01) through the ITMO Fellowship and Professorship Program.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Augenstein</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gentile</surname>
            ,
            <given-names>A.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Norton</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ciravegna</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Mapping keywords to linked data resources for automatic query expansion</article-title>
          . In: Cimiano, P.e.a. (ed.)
          <article-title>The Semantic Web: ESWC 2013 Satellite Events</article-title>
          , Montpellier, France. pp.
          <volume>101</volume>
          {
          <fpage>112</fpage>
          .
          <string-name>
            <surname>Springer</surname>
            <given-names>LNCS</given-names>
          </string-name>
          , Berlin, Heidelberg (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Bojanowski</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grave</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Joulin</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mikolov</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Enriching word vectors with subword information</article-title>
          .
          <source>arXiv preprint arXiv:1607.04606</source>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Ghannay</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Favre</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Estve</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Camelin</surname>
          </string-name>
          , N.:
          <article-title>Word embedding evaluation and combination</article-title>
          . In: et al., N.C. (ed.)
          <source>Proc. of the Tenth International Conference on Language Resources and Evaluation (LREC</source>
          <year>2016</year>
          ). ELRA, Paris, France (May
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Mouromtsev</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pavlov</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Emelyanov</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Morozov</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Razdyakonov</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Galkin</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>The simple web-based tool for visualization and sharing of semantic data and ontologies</article-title>
          .
          <source>In: International Semantic Web Conference (Posters &amp; Demos)</source>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Salle</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Idiart</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Villavicencio</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Enhancing the lexvec distributed word representation model using positional contexts and external memory</article-title>
          .
          <source>CoRR abs/1606</source>
          .01283 (
          <year>2016</year>
          ), http://arxiv.org/abs/1606.01283
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Shekarpour</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lukovnikov</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kumar</surname>
            ,
            <given-names>A.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Endris</surname>
            ,
            <given-names>K.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Singh</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thakkar</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lange</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Question answering on linked data: Challenges and future directions</article-title>
          .
          <source>CoRR abs/1601</source>
          .03541 (
          <year>2016</year>
          ), http://arxiv.org/abs/1601.03541
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>