<!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>What's New in SPARKLIS</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>User Experience</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Univ Rennes, CNRS, IRISA Campus de Beaulieu</institution>
          ,
          <addr-line>35042 Rennes cedex</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Sparklis is a SPARQL query builder that can connect to any endpoint, and that interacts with users in natural language only. Users are guided in the building of their queries so that they do not have to know the schema, and so that empty results are almost completely avoided. This demo paper presents a number of recent extensions to Sparklis. Most notably, it now supports analytical queries, Wikidata statement quali ers, and the display of results on a map or as a slideshow.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Sparklis1 [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] addresses the key problem of semantic search, striving to
reconcile the expressivity of SPARQL, and the usability of point-and-click user
interfaces. It succeeds in doing so by combining principles and techniques from
query builders, faceted search, and natural language interfaces. It supports
exploratory search [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] by guiding users in the incremental construction of queries,
avoiding empty results, and showing both queries and suggestions in natural
language only. Complex queries can be built safely because intermediate results
and relevant suggestions are shown at all steps.
      </p>
      <p>
        Sparklis is based on theoretical work that started in 2010 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], and was rst
released online in 2014. Since then, it receives in the range of 200-2000 hits per
month, and was o cially adopted as the main search tool by two French
institutions who had developed SPARQL endpoints for their data: Persee2 and INIST3.
A startup, Askelys, has even been recently created to develop customized UI and
other services on top of Sparklis.
      </p>
      <p>
        The purpose of this demonstration paper is to shortly present the main
features that have been added to Sparklis since the last publication in 2016 [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
They improve it by signi cantly increasing the coverage of SPARQL, by hiding
some complex structures in RDF data, and by improving user experience.
      </p>
    </sec>
    <sec id="sec-2">
      <title>Coverage of SPARQL</title>
      <p>In 2016, Sparklis covered basic graph patterns (including cycles), UNION,
OPTIONAL, NOT EXISTS, basic lters, basic aggregations, ORDER BY, SELECT
1 Web application and screencasts at http://www.irisa.fr/LIS/ferre/sparklis/
2 http://data.persee.fr/explorer/sparklis/
3 https://www.loterre.fr/sparklis/
and ASK queries. The newly covered constructs are those related to expressions
(FILTER, BIND, GROUP BY, aggregators) and named graphs (FROM, GRAPH).
Apart from CONSTRUCT and DESCRIBE queries and updates, which are not
yet covered, only a few features are still missing: transitive closures in property
paths (partly covered by hierarchies of terms, see next section), SERVICE for
federated queries, explicit LIMIT and OFFSET, and separator speci cation in
GROUP CONCAT. The only serious limit in expressivity is that graph patterns
must be connected at all steps, for the sake of tractability of query evaluation.
Expressions. SPARQL expressions, which are found in the FILTER and BIND
constructs, and in the SELECT and GROUP BY clauses, bring a considerable
increase in expressivity. They enable to derive values that are not explicitly
present in data (e.g., people age from their birth date), and to answer analytical
queries based on aggregations. Examples of analytical queries over geographical
data are (permalinks to are provided as short URLs):
1. How many countries are there in Europe? (simple aggregation) http://bit.</p>
      <p>ly/2OMxbJw
2. Give me the average population and the average area of countries, for each
continent. (grouping and multiple aggregations) http://bit.ly/2OMwKPm
3. What is the average GDP per capita, for each continent? (aggregation over
a BIND) http://bit.ly/2OJsErj
4. Which continents have an average agricultural GDP smaller than 10% of
their average service GDP? (FILTER over two aggregations) http://bit.
ly/2OLAQaM
5. Give me the distribution of the number of islands in archipelagos.
(aggregation over an aggregation) http://bit.ly/2NV71QF
For all those questions, an equivalent Sparklis query can be built over the
MONDIAL dataset4. See the Learn/Examples page to try them live.
Named Graphs. Named graphs are found in the GRAPH construct, and in
FROM clauses. They allow for controling the source of triples, and are required
on some endpoints that put triples in di erent named graphs. Sparklis o ers
two ways to specify named graphs. The rst way is to add FROM clauses in
SPARQL queries by setting two con guration options: the default graph URI
for retrieving factual triples, and the schema graph URI (if di erent from the
default graph) for retrieving schema triples. The second way is to produce
GRAPH-constructs in SPARQL queries for a ner control. Those constructs are
introduced by the new query construct according to ..., which can be applied
to any subquery to declare that this subquery should be matched on a named
graph. The possible named graphs are shown in the results, and the ellipsis in
the construct can be re ned to select the desired named graphs. For
example, the query: give me a city that according to a census whose year
&gt; 2000 has a population &gt; 1000000 returns \the cities with over 1M
inhabitants, according to a named graph that is a census posterior to 2000".
4 http://dbis.informatik.uni-goettingen.de/Mondial</p>
    </sec>
    <sec id="sec-3">
      <title>Complex Structures in RDF Graphs</title>
      <p>Sometimes RDF datasets contain complex structures that, although covered by
Sparklis 2016, generate ugly verbalizations, and are di cult to explore. We
have added new constructs that abstract over those complex structures, so that
they become more intuitive to query and explore.</p>
      <p>
        Rei ed Relationships. Because RDF is limited to binary relationships
(properties), a common solution to represent n-ary relationships or to add metadata
to binary relations is to reify those relationships into statements or events.
Unfortunately, various representations are used without consensus (e.g., standard
rei cation, custom rei cation, singleton properties, named graphs, Wikidata
predicates [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]), and it is di cult for Sparklis to automatically discover rei ed
relationships through endpoints. Because of the importance and peculiarity of
the Wikidata modeling, we have added a Wikidata mode as an option. In other
cases, schema-level triples have to be added to declare which combinations
of properties and classes represent rei ed relationships. For example, in the
MONDIAL dataset, the relationships between countries and languages are
rei ed into \spoken language" statements, and percentage values are attached
to those statements to qualify the relationship. We have added the triple
(mondial:ofCountry, nary:subjectObject, mondial:onLanguage) to declare
that in the \spoken language" relationship, property mondial:ofCountry points
to the subject, and property mondial:onLanguage points to the object. Every
other property de ned on the rei ed relationship (e.g., mondial:percentage)
can be discovered by Sparklis, and suggested as a relation modi er that
is verbalized similarly to prepositions. As a consequence, the verbose query
give me every country that is the country of a spoken language
whose language is English and whose percentage is &gt; 25 can now be
expressed more directly as give me every country that has as a language
English at a percentage &gt; 25 (http://bit.ly/2PHT0pD).
      </p>
      <p>
        Hierarchies of Terms. Some properties code for the child-to-parent
relationship of a hierarchy. Their range is equal to their domain, and in SPARQL queries
it is usually their transitive closure that is used. General-purpose and well-known
examples are rdfs:subClassOf or skos:broader. Domain-speci c hierarchies
exist for geographical locations, historical periods, anatomical parts, etc. We
have added the construct (hierarchy) in ... that uses the last selected
property as a hierarchical relationship. The e ects are to apply transitive closure
to the property in the generated SPARQL query, and to display the values
of that property as a hierarchical tree. When a value in the tree is selected,
it is equivalent to select all values under the selected value in the tree. It is
possible to select several values and combine them by and/or. For example,
the verbose and approximate query give me every place that is the part
of the part of California or Arizona (assuming two levels between places
and states) can now be expressed as give me every place (hierarchy) in
California or Arizona.
User experience is important and we have also made improvements on this side.
{ Responsive design. The UI has been given a responsive design with
Bootstrap. It becomes therefore easier to use Sparklis on smaller screens.
{ Map view. When entities in the query have standard properties for
latitude/longitude, they are detected and a special property has geolocation
is suggested. If selected, this property triggers the display of the entities in
the query results on a Google map (ex., http://bit.ly/2NT2Vs9).
{ Slideshow view. When the results contain images, those are collected
and displayed as a slideshow. To provide context for the images inside the
slideshow, the result row that contains the image is displayed under the
image. For example, in DBpedia, a slideshow of scientist depictions can be
obtained, along with biographic information http://bit.ly/2NRSwwT.
{ Full-text search. In order to provide a better experience when using the
dynamic ltering features, support has been added for the full-text search
capabilities of a few RDF stores (Jena/fuseki and Virtuoso so far). It assumes that
full-text indices have been set up on the endpoint. For example, cities with
name similar to \petersbourg" are retrieved by http://bit.ly/2OH8sqg.
{ YASGUI editor. For advanced users who want to see and edit the
generated SPARQL query, the well-known YASGUI editor [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] has been integrated
to Sparklis. It also brings useful tools for the download of query results in
di erent formats, and for the visualization of results (pivot table and charts).
{ Dataset-speci c UI customization. Properties of schema.org can be
used to customize the appearance in Sparklis. Property schema:position
can be de ned for classes, properties and entities to control their ordering in
lists of suggestions. Property schema:logo can be de ned on entities with
small images to be used as icons, in addition to the label (e.g., the logo of a
company, the conservation status of a species).
{ Multilinguality. The UI is now available in four languages: English, French,
      </p>
      <p>Spanish, and Dutch. Similar languages would be easy to add.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Ferre</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Conceptual navigation in RDF graphs with SPARQL-like queries</article-title>
          . In: Kwuida,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Sertkaya</surname>
          </string-name>
          ,
          <string-name>
            <surname>B</surname>
          </string-name>
          . (eds.)
          <source>Int. Conf. Formal Concept Analysis</source>
          . pp.
          <volume>193</volume>
          {
          <fpage>208</fpage>
          . LNCS 5986, Springer (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Ferre</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          : Sparklis:
          <article-title>An expressive query builder for SPARQL endpoints with guidance in natural language</article-title>
          .
          <source>Semantic Web: Interoperability, Usability, Applicability</source>
          <volume>8</volume>
          (
          <issue>3</issue>
          ),
          <volume>405</volume>
          {
          <fpage>418</fpage>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Hernandez</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hogan</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          , Krotzsch, M.:
          <string-name>
            <surname>Reifying</surname>
            <given-names>RDF</given-names>
          </string-name>
          :
          <article-title>What works well with wikidata</article-title>
          .
          <source>In: Int. Work. Scalable Semantic Web Knowledge Base Systems</source>
          . vol.
          <volume>1457</volume>
          , pp.
          <volume>32</volume>
          {
          <issue>47</issue>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Marchionini</surname>
          </string-name>
          , G.:
          <article-title>Exploratory search: from nding to understanding</article-title>
          .
          <source>Communications of the ACM</source>
          <volume>49</volume>
          (
          <issue>4</issue>
          ),
          <volume>41</volume>
          {
          <fpage>46</fpage>
          (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Rietveld</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hoekstra</surname>
          </string-name>
          , R.: YASGUI:
          <article-title>Not just another SPARQL client</article-title>
          .
          <source>In: The Semantic Web: ESWC 2013 Satellite Events</source>
          , pp.
          <volume>78</volume>
          {
          <fpage>86</fpage>
          . Springer (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>