<!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>Mining Wikipedia's Snippets Graph: First Step to Build A New Knowledge Base</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Koln</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Germany</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>andias.wira-alam</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>brigitte.mathiak}@gesis.org http://www.gesis.org/</string-name>
        </contrib>
      </contrib-group>
      <abstract>
        <p>In this paper, we discuss the aspects of mining links and text snippets from Wikipedia as a new knowledge base. Current knowledge base, e.g. DBPedia[1], covers mainly the structured part of Wikipedia, but not the content as a whole. Acting as a complement, we focus on extracting information from the text of the articles. We extract a database of the hyperlinks between Wikipedia articles and populate them with the textual context surrounding each hyperlink. This would be useful for network analysis, e.g. to measure the in uence of one topic on another, or for question-answering directly (for stating the relationship between two entities). First, we describe the technical parts related to extracting the data from Wikipedia. Second, we specify how to represent the data extracted as an extended triple through a Web service. Finally, we discuss the usage possibilities upon our expectation and also the challenges.</p>
      </abstract>
      <kwd-group>
        <kwd>knowledge extraction</kwd>
        <kwd>wikipedia</kwd>
        <kwd>knowledge base</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>In the recent years, the development of the Semantic Web Technologies has been
growing very fast. A lot of research e orts aimed to develop ontology-based
reasoning frameworks as the foundation of the Semantic Web's infrastructure.
Nevertheless, building and maintaining good ontologies are such intellectual e orts
that they have to be done mostly by humans (known as gold standard).</p>
      <p>One of the major breakthroughs in the Semantic Web is to extract facts
based on the structured information provided using ontologies. For instance, a
structured data set such as DBPedia can be queried using SPARQL endpoint to
list all cities in Europe with more than one million inhabitants.</p>
      <p>The answer of such query lies both in the completeness and the relevance of
the information provided. However, there is no guarantee that the answer given
is always accurate, since it just represents the current state of the entities. A
typical property, namely a time factor, is generally considered in increasing the
complexity of the problems, thereby it has been typically excluded. Whereas, we
note that \omitting a time factor" can reduce the accuracy, especially in stating
historical facts. As a common case, a name of a city might be changed, a capital
of a country might be moved from one to another, or a number of inhabitants
might change over time.</p>
      <p>Let us assume another query that tries to nd \things in common" between
two cities in Germany, namely Bonn and Berlin. Obviously, it is simple to extract
information that both cities are located in Germany since both belong to the
same class, e.g. by querying any ontology which contains this information.
Nevertheless, since the time factor is not considered, one of the most striking facts is
missing: Bonn was also capital of Germany which moved to Berlin subsequently.</p>
      <p>DBPedia provides structured information extracted from Wikipedia, but
since it does not consider all parts of the article, the information in the body
of the article remains \hidden". However, the text of the article is missing or
rather not being extracted. As an analogy, a simple query in DBPedia to return
all places that have a connection to Barack Obama only returns four locations1:
the United States, Northern Mariana Islands, Virgin Islands, and Puerto Rico,
with the relationship types leader and isLeaderOf. Other important locations
such as Washington, D.C. or Chicago are missing. In contrast, if we have a look
at the article of Barack Obama in Wikipedia, there are many links to places,
e.g. a place where he was born, where he had lived, studied, worked, etc.
1.1</p>
      <p>Links and Snippets
As we mentioned above, our work complements the current knowledge base
such as DBPedia. But however, we do not attack these two problems: adding
time factor and vocabulary completeness of the current available ontologies. We
rather focus on the providing textual information attached in a simple ontology.
Extracting information from the text of articles also produces many potential
bene ts and can reveal many interesting facts. To encompass this, we need to
mention our starting point for this work. Strictly speaking, each Wikipedia
article has a unique title and contains terms that point out to other articles.</p>
      <p>Naturally, since the terms depict the title of the referenced articles, which
are explicitly hyperlinked, they drive the walk of the readers from one to the
other articles. Therefore, we believe that most readers pay more attention to
such an area around the hyperlinks of the articles rather than the whole parts.
This particular area is usually an excerpt or paragraph in the article, which we
call it as snippet, with hyperlinks in it. By reading the snippets and following
the links, the readers expect to get useful, coherent information e ectively.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Experiments and Data</title>
      <p>Wikipedia provides static dump- les2 regularly in their website http://dumps.
wikimedia.org/. For our purpose, we import four dump- les, which are
pagesarticles.xml.bz2, pagelinks.sql.gz, redirect.sql.gz, and category.sql.gz. The rst
1 retrieved in Jan 2011.
2 we currently focus only on the English and German Wikipedia, dump used
enwiki20110526 and dewiki20120225.
dump- le contains the page IDs, page contents (text of the articles), and other
information regarding to the page. The second contains the linkage / linking
between all pages. The last two are also needed since it contains mapping
information of the redirected pages and category respectively.</p>
      <p>
        We use Debian/GNU Linux running on dual Intel R CoreTM2 CPUs with
2TB Harddisk and 3GB RAM. In order to import the XML dump into the
database, pages-articles.xml.bz2, we use mwimport3 to transform it into SQL
format. Overall, the import process and indexing took place in several hours,
but still in acceptable range. Table 1 shows the overview of the table records
and the space usage after the dump- les had been imported.
The Web Service provides a public API in order to get access to the data. The
data will be provided in an N-Quads[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] format as (subject; predicate; object; context).
As an explanation, subject and object denote the titles of the articles, while
context is the text snippet. Since we only consider outlinks of the articles, we
only have one predicate, namely has link to. As an example, the following is an
extended triple containing the relationship between Bonn and Berlin:
(&lt;Bonn&gt; &lt;has link to&gt; &lt;Berlin&gt; "Bonn is the 19th largest city in Germany. . . it
was the capital of West Germany from 1949 to 1990 and. . . government
institutions were moved from Bonn to Berlin. . . ").
      </p>
      <p>More importantly, we continually develop the web service not only to provide
access to the data, but also to add with some features, e.g. measuring similarity
scores between entities based on various algorithms. This might interest other
researchers in this eld.
3 mwimport is a Perl script to import WikiMedia XML dumps, details see: http:
//meta.wikimedia.org/wiki/Data_dumps/mwimport</p>
      <p>To extract the snippets, we use mwlib4 to parse the Wikitext5 and decompose
it into text segments6. As we mentioned above, the snippet is simply expected
as a paragraph. But however, as a trade-o , the snippets could be meaningless,
e.g. if a snippet extracted from a link that is located in a table or item list.
Eventually, the Web service processes a query posed by users, e.g. Bonn and
Berlin with a maximum hyperlink distance7, and gives the extended triples in
N-Quads format as a result.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Discussions</title>
      <p>
        Since the links graph is also accessible, it can be used to calculate the ranking of
the articles by using PageRank or HITS algorithm, as part of network analysis
reported by [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. As we provide the data in such way that it is easy to be reused,
it would be simple to compute it.
      </p>
      <p>
        Recently, [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] developed such methods to compute the in uence of a document
to another. These methods are also supposed to reveal the track of the knowledge
ows. However, the users have to read through all provided documents, instead of
only reading a useful summary, which is not e cient. Analogous to entity linking
task, e.g. [
        <xref ref-type="bibr" rid="ref10 ref9">9, 10</xref>
        ], we aim not only at the linking between entities but also how
to describe their relationships. Moreover, in contrast to a question-answering
system, e.g. IBM Watson[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and YAGO2[
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], which gives one speci c answer
to a complex question, our aim is to give a description about the relationships
between two entities - in other words, to give a complex answer to a simple
question.
      </p>
      <p>
        By describing the relationships between two articles, we expect that the in
uence of an article to another article can be computed. As an illustration, Figure
1 shows how an article, Arti cial Intelligence, might have an in uence to
another article, Semantic Web. In this earlier work[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], we evaluated the possibility
of enriching the description of the relationships between two entities, which are
Wikipedia articles, by leveraging the link snippets. However, it is an early phase
of this work and a further approach to analyze the snippets must be further
investigated. In our recent studies [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], we showed that describing a relationship
between entities helps users to gain a better understanding.
4
      </p>
    </sec>
    <sec id="sec-4">
      <title>Challenges</title>
      <p>A big challenge is that we need to research on how to rank the snippets
according to the relevancy and accuracy. For instance, in a query asking about the
4 mwlib is a Python library for parsing MediaWiki articles, details see: http://code.</p>
      <p>pediapress.com/wiki/wiki/mwlib
5 Wikitext is a markup language used to write pages in Wikipedia.
6 to the date of the submission, we are still working on the Web service and we expect
to nish it before the conference.
7 according to our test, the maximum distance of 2 or 3 can be processed in a
reasonable time.
connection between Barack Obama and Kenya, one of the most desired results,
intuitively, is that his father was originally from Kenya. Most search engines
can provide good results explaining that relationship, but however the results
are provided by relying on individual documents. If no single document on the
Web covers both particular entities, the results are rather ropey. Unlike in most
search engines, where the results provided are relied on individual documents,
we believe that our approach will contribute to ll this gap.</p>
      <p>Furthermore, we are still left with the problem on how to justify how good
the snippets are. To best of our knowledge, this problem is novel and there is
no general solution for this problem. We need to specify criteria or objectives
in order to determine the quality of a snippet. The length of the snippet is an
important objective; we consider a paragraph is an ideal length. Intuitively, each
paragraph in an article represents a sub topic or idea, hence a paragraph could
be meaningful to substantiate the relations. Using a simple technique such as
Automated Content Extraction (ACE), we could extract basic relations between
entities. Nevertheless, in order to extract richer relations, we need to nd patterns
that can recognize the relations between entities.</p>
      <p>YAGO2 covers the anchor texts from the hyperlinks to add a textual
dimension, however the snippets that more than just anchor texts are not further
investigated. Most types of relation are extracted from the sentences by
recognizing entities and their properties. Nevertheless, a type of relation such as
formerCapital, as of the previous example about Bonn and Berlin, might not
be extracted from the sentence, therefore the snippets are useful in this sense.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments.</title>
      <p>We would to thank many colleagues at our Institute for the fruitful discussions
as well as the reviewers for their useful inputs and advice on improving our work.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>DBPedia</given-names>
            <surname>Project</surname>
          </string-name>
          . http://www.dbpedia.org/.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Shahaf</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Guestrin</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Connecting the Dots Between News Articles</article-title>
          .
          <source>In Proceedings of the 16th Conference on Knowledge Discovery and Data Mining (KDD-2010)</source>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3. Watson:
          <article-title>IBM DeepQA Project</article-title>
          . http://www-03.ibm.com/innovation/us/watson/.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Wira-Alam</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zapilko</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mayr</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>An Experimental Approach for Collecting Snippets Describing the Relations between Wikipedia Articles</article-title>
          .
          <source>Web Science Conference (WebSci10)</source>
          .
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>N-Quads</surname>
          </string-name>
          :
          <article-title>Extending N-Triples with Context</article-title>
          . http://sw.deri.org/
          <year>2008</year>
          /07/ n-quads/
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Dean</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ghemawat</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <source>MapReduce: Simpli ed Data Processing on Large Clusters. In Proceedings of the 6th Symposium on Operating Systems Design and Implementation</source>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Bellomi</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bonato</surname>
          </string-name>
          , R.:
          <article-title>Network Analysis for Wikipedia</article-title>
          . http://www.fran.it/ articles/wikimania_bellomi_bonato.pdf
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Mathiak</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Martinez-Pena</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wira-Alam</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>WHAT IS THE RELATIONSHIP ABOUT? Extracting Information about Relationships from Wikipedia</article-title>
          .
          <source>In Proceedings of the 8th International Conference on Web Information Systems and Technologies.</source>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Lehmann</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Monahan</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nezda</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jung</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shi</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>LCC Approaches to Knowledge Base Population at TAC 2010</article-title>
          .
          <source>In Proceedings of the Third Text Analysis Conference (TAC</source>
          <year>2010</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Fernandez</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fisteus</surname>
            ,
            <given-names>J. A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sanchez</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Martin</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          :
          <article-title>WebTLab: A cooccurrencebased approach to KBP 2010 Entity-Linking task</article-title>
          .
          <source>In Proceedings of the Third Text Analysis Conference (TAC</source>
          <year>2010</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Ho</surname>
            <given-names>art</given-names>
          </string-name>
          , J.,
          <string-name>
            <surname>Suchanek</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Berberich</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Weikum</surname>
            ,
            <given-names>W.:</given-names>
          </string-name>
          <article-title>YAGO2: A Spatially and Temporally Enhanced Knowledge Base from Wikipedia. Special Issue of the Arti -</article-title>
          cial
          <source>Intelligence Journal</source>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>