<!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>Linking Historical Data on the Web?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Valeria Fionda</string-name>
          <email>fionda@mat.unical.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giovanni Grasso</string-name>
          <email>giovanni.grasso@cs.ox.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science, Oxford University</institution>
          ,
          <country country="UK">UK</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Department of Mathematics, University of Calabria</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Linked Data today available on the Web mostly represent snapshots at particular points in time. The temporal aspect of data is mostly taken into account only by adding and removing triples to keep datasets up-to-date, thus neglecting the importance to keep track of the evolution of data over time. To overcome this limitation, we introduce the LinkHisData framework to automatize the creation and publication of linked historical data extracted from the Deep Web.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>LOD Interrogator
Data Extractor
Integrator</p>
    </sec>
    <sec id="sec-2">
      <title>The LinkHisData framework</title>
      <p>
        LinkHisData (Linked Historical Data) is a configurable framework that builds
on well-established semantic technologies and tools (e.g., SPARQL, RDF), as
well as languages for Deep Web data extraction that have already been
successfully employed by the LOD community (i.e., OXPath [
        <xref ref-type="bibr" rid="ref3 ref5">3, 5</xref>
        ]).
      </p>
      <p>Fig. 1 shows the LinkHisData architecture. Its main components are: the
LOD Interrogator, the Data Extractor, the Integrator, and the Linked Historical
Dataset (LHD). The LOD Interrogator uses the SPARQL query and the endpoint
address provided in input by the user to retrieve from the Web of Linked Data
entities’ URIs and related information. These data feed the Data Extractor that
runs the OXPath wrapper, again provided in input by the user, to extract
transient information from the Deep Web directly into RDF. OXPath is a modern
wrapping language able to execute actions (e.g., click, form filling) and schedule
periodic extraction tasks. The query and the wrapper may share variable names
so that the wrapper is instantiate with the actual values provided by the LOD
Interrogator. The RDF data generated by the Data Extractor populates LHD
and are published on the Web. A single execution of the extraction and
publication process produces RDF data with temporal information that represent a
snapshot at the time of extraction. To produce historical data, the whole process
is repeated at the frequency set by the user and for each repetition the Integrator
is responsible for the integration of the fresh triples (with temporal validity set
to the time of extraction) with the data already stored in LHD (whose validity
dates back to a prior extraction) by executing the (set of) SPARQL query
provided in input. Different inputs supplied by the user configure LinkHisData to
extract and publish historical datasets in different domains.
3</p>
    </sec>
    <sec id="sec-3">
      <title>LinkHisData: Book Price Example</title>
      <p>We instantiate the LinkHisData framework for the extraction and publication
of linked historical data about books prices extracted from Barnes&amp;Noble (www.
bn.com). The next query retrieves from DBpedia books and relative attributes3:
SELECT ?b ?t ?ab ?an WHERE {</p>
      <p>?b dbp:name ?t. ?b rdf:type dbo:Book. ?b dbp:author ?ab. ?ab foaf:name ?an. }
3 The prefixes used in the paper are taken from www.prefix.cc
doc("www.bn.com")//*[@id=’keyword’]/{?t ?an/}//*[@id=’quick-search’]/{"Books"/}
2 //*[@id=’quick-search-1’]//button/{click /}//li#search-result</p>
      <p>[jarowrinkler(./li#title, ?t)=1][jarowrinkler(./li#auth, ?an)&gt;.7]/{click /}/
4 /html:&lt;(schema:Book(isbn))&gt; [.: &lt;owl:sameAs(?b)&gt;]</p>
      <p>
        [.//*[starts-with(.,"ISBN")][
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]/text()[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]: &lt;schema:isbn=string(.)&gt;]
6 [.:&lt;schema:author(schema:Person(?authorName))&gt; [.: &lt;owl:sameAs(?a)&gt;]]
[.: &lt;schema:offers(schema:Offer lhd:HistoricalEntity)&gt;
8 [? .//::*[@itemprop="price"][
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]: &lt;schema:price=substring(.,2)&gt; ]
      </p>
      <p>
        [? .//::*[@itemprop="price"][
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]: &lt;schema:priceCurrency=substring(.,1,1)&gt; ]
10 [? .:&lt;schema:validFrom = now()&gt; ]
      </p>
      <p>This query returns a set of tuples containing the URI of a book (?b), its
title (?t), the URI of its author (?ab) and the author’s name (?an). For instance, for
the book “The Firm” of J. Grisham the retrieved tuple is hdbpedia:The_Firm_(novel);
\The Firm"; dbpedia:John_Grisham; \John Grisham"i. The remainder of the
example uses the values of this tuple to instantiate the various components.</p>
      <p>The tuples returned by the LOD Interrogator constitute the input for the
Data Extractor which runs the OXPath wrapper shown in Figure 2 (for space
reasons some parts are simplified or omitted). Here, the variables (e.g., ?b) refer
to the corresponding ones in the LOD Interrogator SPARQL query. We assume
some familiarity with XPath to illustrate the wrapper. It comprises three parts:
(i) navigation to the pages containing relevant data, (ii) identification of data
to extract, and (iii) RDF output production. In our example, we use types and
properties from schema.org (e.g., Book, Offer, price). For instance, for our
example tuple about “The Firm”, the wrapper produces the following RDF output:
lhd:b9780440245926 a schema:Book ; owl:sameAs dbpedia:The_Firm_(novel);
schema:isbn "9780440245926"; schema:author lhd:John_Grisham;
schema:offers lhd:off_123.
lhd:off_123 a schema:Offer,lhd:HistoricalEntity ; schema:price "9.21";
schema:priceCurrency "$"; schema:validFrom "2014-06-28".
lhd:John_Grisham a schema:Person ; owl:sameAs dbpedia:John_Grisham.</p>
      <p>
        The wrapper encodes part (i) in lines 1–2. Firstly, the website is loaded,
then, the search form is filled with (\The Firm John Grisham") i.e., book title
and author name, plus the search is restricted to the book category. Finally, the
submit button is clicked and all the books on the result page are selected by the
expression //li.search-result. However, many of the results may not refer to the
book of interest (e.g., also collections/sets of books containing it are retrieved)
and it is absolutely crucial to identify the correct entities as these will be linked
back to the original entities in DBpedia. We address this problem (part (ii))
by using the Jaro-Winkler distance [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] to match author name and book title.
This metric has been widely used in record linkage and performs particularly
well on person and entity’s names. Our wrapper (line 3) demands for a perfect
matching on the title and a significant similarity (&gt;0.7) on the author’s name
to deal with different variations (e.g., “J. Grisham” or “John Ray Grisham, Jr”).
This strategy prevents our framework from overtaxing the site by extracting (a
possibly huge quantity of) data on non-interesting books, that would be only
later discarded by a costly post-processing linking phase. For example, for “The
Firm” we correctly identify only 2 books out of the original 22 results.
      </p>
      <p>Part (iii) is realized by visiting the detail page of each selected book via
the action {click/}. An RDF extraction marker is used to create a schema:Book
instance (line 4) and by explicitly linking it to the corresponding DBpedia URI
via owl:sameAs. The unique URI for the created book instance relies on the
functional dependency to its isbn (schema:Book(isbn)). This ensures that this URI will
be always the same within the subsequent extractions, allowing to refer to the
right entity in the integration phase. The wrapper also creates one linked data
entity for the book author (line 6) and one for the offer (line 7), respectively.
The former is of type schema:Person; its URI is created on the basis of the author
name (?an) and is linked via owl:sameAs to the author on DBpedia. The latter
is of type schema:Offer and lhd:HistoricalEntity, type used to mark entities with
temporal validity. Its URI is randomly generated to ensure different URIs for
consecutive extractions. Some properties of the offer are also extracted (e.g., the
schema:price) and the schema:validityFrom is set to now(), the current date.</p>
      <p>The Integrator takes in input, for each book (?b), the set of triples T as
produced by the Data Extractor and it is responsible for integrating them with those
already present in LHD. In particular, it deals with entities having a temporal
validity, e.g., book offers and their prices in our example. Each book in LHD
may have associated several offers that represent the evolution of the price over
time. However, only one of them provides the current selling price (i.e., the one
not having a schema:validThrough triple). Therefore, for each book (?b), the
Integrator instantiates the query template (provided by the user) to retrieve such
current price (?p) and its corresponding offer (?o) from the historical dataset. If
?b is not already present in the historical dataset, the triples in T are added to
it. Otherwise, the Integrator compares the current price (?p) with the price of
the offer in T (freshly extracted). If they differ, the price validity is updated by
adding to the dataset both the triple (?o, schema:validThrough, now()) and the
offer in T. Together they provide a new piece of historical information.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>O.</given-names>
            <surname>Alonso</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Strötgen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. A.</given-names>
            <surname>Baeza-Yates</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Gertz</surname>
          </string-name>
          .
          <article-title>Temporal information retrieval: Challenges and opportunities</article-title>
          .
          <source>In TWAW</source>
          , volume
          <volume>813</volume>
          , pages
          <fpage>1</fpage>
          -
          <lpage>8</lpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>W.W.</given-names>
            <surname>Cohen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.D.</given-names>
            <surname>Ravikumar</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.E.</given-names>
            <surname>Fienberg</surname>
          </string-name>
          .
          <article-title>A comparison of string distance metrics for name-matching tasks</article-title>
          .
          <source>In IIWeb</source>
          , pages
          <fpage>73</fpage>
          -
          <lpage>78</lpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>T.</given-names>
            <surname>Furche</surname>
          </string-name>
          , G. Gottlob, G. Grasso,
          <string-name>
            <given-names>C.</given-names>
            <surname>Schallhart</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <surname>A.J. Sellers.</surname>
          </string-name>
          <article-title>OXPath: A language for scalable data extraction, automation, and crawling on the deep web</article-title>
          .
          <source>VLDB J</source>
          .,
          <volume>22</volume>
          (
          <issue>1</issue>
          ):
          <fpage>47</fpage>
          -
          <lpage>72</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>T.</given-names>
            <surname>Käfer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Abdelrahman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Umbrich</surname>
          </string-name>
          ,
          <string-name>
            <surname>P.</surname>
          </string-name>
          <article-title>O'Byrne, and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Hogan</surname>
          </string-name>
          .
          <article-title>Observing linked data dynamics</article-title>
          .
          <source>In ESWC</source>
          , pages
          <fpage>213</fpage>
          -
          <lpage>227</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>J.</given-names>
            <surname>Lehmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Furche</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Grasso</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.C.</given-names>
            <surname>Ngonga Ngomo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Schallhart</surname>
          </string-name>
          , and
          <string-name>
            <surname>C.</surname>
          </string-name>
          et al.
          <article-title>Unger. deqa: Deep web extraction for question answering</article-title>
          .
          <source>In ISWC</source>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>A.</given-names>
            <surname>Rula</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Palmonari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Harth</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Stadtmüller</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Maurino</surname>
          </string-name>
          .
          <article-title>On the diversity and availability of temporal information in linked open data</article-title>
          .
          <source>In ISWC</source>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>