<!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>Traitor: Associating Concepts using the World Wide Web</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Wanno Drijfhout</string-name>
          <email>wrc.drijfhout@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Djoerd Hiemstra</string-name>
          <email>d.hiemstra@utwente.nl</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Information Extraction</institution>
          ,
          <addr-line>Question Answering, MapReduce</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Oliver Jundt Lesley Wevers University of Twente</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>We use Common Crawl's 25TB data set of web pages to construct a database of associated concepts using Hadoop. The database can be queried through a web application with two query interfaces. A textual interface allows searching for similarities and di erences between multiple concepts using a query language similar to set notation, and a graphical interface allows users to visualize similarity relationships of concepts in a force directed graph.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. INTRODUCTION</title>
      <p>What do Apple and Samsung have in common? What
does Java have that PHP does not have? Which terms
could re ne the search query \lance armstrong"? What is
the context of the sentence \Food, games and shelter are
just as important as health"? You may know the answers to
these questions or know where to look for them|but can a
computer answer these questions for you too? This paper
discusses Traitor, a tool that creates a database of
associated concepts, and answers questions similar to our
examples. Traitor was created for submission to the Norvig
Web Data Science Award1, a research challenge organized
by Common Crawl and SURFsara. We won the award.</p>
    </sec>
    <sec id="sec-2">
      <title>MINING CONCEPT ASSOCIATIONS</title>
      <p>have been used for similar purposes before. To do this
mining, we have implemented a map-reduce program in Java
with Hadoop. For simplicity, the program assumes that
one word represents one concept (and vice versa), and for
every pair of words that co-occur in a sentence, the concepts
they represent are associated.</p>
      <p>
        In a few steps our program transforms the raw HTML
responses from the Common Crawl data set to a list of key
value pairs (k; v), where the key k is a word pair (w1; w2)
that co-occurred in some sentence on the page, and the
count v denotes the number of pages on which this
cooccurrence has been found. We consider the count of
cooccurring word pairs a measure of the association's strength.
A more sophisticated approach such as a probabilistic[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]
association measure[
        <xref ref-type="bibr" rid="ref1 ref8">1, 8</xref>
        ], based on the concept of mutual
information[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] could have been used instead|the limited
time to submit our solution to the Norvig Award jury
pressured us to use simpler methods.
      </p>
      <p>
        We chose sentences as the semantic unit (rather than the
same paragraph, document or a sliding window[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]) for
generating word pairs for two reasons. A technical reason is
to constrain the result size. Pairing every non-trivial word
with every other produces results in the order O n2 . The
second reason is based on human language semantics[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. We
suppose that words within a sentence are more likely to
represent actual concept associations than words that are far
apart in a document (or in di erent sentences).
2.1
      </p>
    </sec>
    <sec id="sec-3">
      <title>Implementation</title>
      <p>In the mapping phase we extract distinct word pairs from
documents. We extract \interesting" text from the raw
HTML documents using the BoilerPipe library; i.e., text
in navigation menus, headers and footers is omitted. We
then split each sentence in the text into a set of words
and normalize these words by converting them to
lowercase ASCII characters (e.g., a and A become a). This
reduces the number of generated word pairs and compensates
for small notation di erences between words. Moreover,
we discard words from non-English sentences2, words
containing non-alphabetic characters, and stop-words such as
\the" and \that". For each normalized and ltered sentence
S, the mapper creates a word pair p for each3 pair of words
(w1; w2) where w1; w2 2 S, w1 &lt; w2 (lexicographically).
Finally, for every web page, the mapper emits tuples (p; 1)
for each distinct word pair p on that page.</p>
      <p>In the reduction phase, we sum the counts of the word
pairs produced by the mapper. Because the distribution of
words follows a Zipf distribution, we nd that the majority
of the resulting pairs have a very low count. To reduce
2Our heuristic is rather crude: we check if a sentence
contains at least two English `stop-words'.
3We limit the number of pairs produced for excessively long
sentences.
storage costs of the nal output, we can discard pairs with
a count less than some N ; e.g., if N = 2, we discard all
pairs that only occur once. Essentially, this allows us to
reduce the output to any size that is practical for use in
the presentation layer. Unfortunately, pairs containing rare
words are cut indiscriminately due to this policy, even if
these co-occurring words are still usable associations.
3.</p>
    </sec>
    <sec id="sec-4">
      <title>QUERYING CONCEPT ASSOCIATIONS</title>
      <p>The resulting tuples from the map-reduce step are
imported into a database which can be queried through a web
application with two query interfaces.
3.1</p>
    </sec>
    <sec id="sec-5">
      <title>Textual interface</title>
      <p>Users of the textual interface can search for similarities
and di erences between multiple concepts using a query
language similar to set notation or boolean algebra. For
each search term in the query, associated words and
cooccurrence counts are fetched from the database, and a
score is assigned to each associated word based on the
structure of the query expression.</p>
      <p>A sequence of words separated by whitespace denotes a
conjunction and yields the words that are associated with
all words in the sequence. A sequence of words separated
by plus-symbols, denotes a disjunction and yields the words
that are associated with any word in the sequence. A word
preceded by a minus-symbol denotes the complement. To
illustrate: the query (a + b) -c yields all words that are
associated with a or b, and not with c.
3.2</p>
    </sec>
    <sec id="sec-6">
      <title>Graphical interface</title>
      <p>
        A graphical interface allows users to visualize
similarity relationships of concepts in a force directed graph using
D3.js. Users can enter a list of words which become labeled
nodes in the graph. The graphical size of the nodes
indicates the number of associations a concept has; the more
associations a concept has, the bigger the node. For each
word in the query the system retrieves the 50 strongest
related concepts, which can be interpreted as an estimate of
the concept's context. For each word pair we apply the
RBO metric[
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] to estimate the similarity. A link is
created between two nodes if the similarity is more than 5%.
The length and thickness of the link indicate the
similarity. If two nodes are connected by a short thick line the
corresponding concepts share a very similar top 50
ranking. Conversely, distant nodes and nodes without any link
between them have very few (or no) concepts in common.
      </p>
    </sec>
    <sec id="sec-7">
      <title>RESULTS</title>
      <p>Using our map-reduce program, we populated an
association database with over 43 million distinct word pairs. We
attempted to assess the quality of the Traitor's query
results by answering questions from this paper's introduction
(and others). For the sake of brevity, table 1 shows a few
query results produced by Traitor. Additionally, to
illustrate the disjunctive operator, we could `deduce the context'
of a sentence; the query \food + games + and + shelter
+ are + just + as + important + as + health" produces
the union of each word's associations: care, insurance,
information, play, good. The reader is encouraged to try
Traitor on-line for more example queries (see the
Aboutpage) and for a live demonstration of the visualization
interface.</p>
    </sec>
    <sec id="sec-8">
      <title>CONCLUSIONS AND FUTURE WORK</title>
      <p>apple
iphone
ipod
ipad
store
mac
apple samsung
phone</p>
      <p>tv
mobile
battery
iphone
java -php
applet(s)
alden
jvm
co ee
marketplace
samsung
phone
galaxy
mobile
battery</p>
      <p>tv
lance armstrong
tour
cancer
france
foundation</p>
      <p>team
java coffee -php
cup
bean
beans</p>
      <p>tea
espresso
java
code
application(s)
games
software
programming
political party
information
parties
policy
third
government
wii -xbox
balance</p>
      <p>kart
nunchuk</p>
      <p>resort
motionplus
data to about 10 gigabytes of uncompressed word
associations by aggressive ltering of the input, and dropping all
pairs with a count less than 100. By means of a query
language and a simple scoring algorithm, we can express and
answer queries about the concepts and associations stored
in this database. A visualization interface allows for
comparison of concepts by the similarity of their associations.</p>
      <p>Despite the simplistic methods used, Traitor can
provide reasonable results thanks to the large data corpus. As
discussed in Section 2, we expect that a probabilistic
scoring model can further improve the quality of our results.
Moreover, Traitor only supports `concepts' described by
single words; one could extract n-grams from sentences to
identify concepts described by multiple words. Future work
can include further normalization of words; e.g., equating
plural and singular words, or applying word stemming.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>K. W.</given-names>
            <surname>Church</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>Hanks</surname>
          </string-name>
          .
          <article-title>Word association norms, mutual information, and lexicography</article-title>
          .
          <source>Computational linguistics</source>
          ,
          <volume>16</volume>
          (
          <issue>1</issue>
          ),
          <year>1990</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Stefan</given-names>
            <surname>Evert</surname>
          </string-name>
          .
          <article-title>The statistics of word cooccurrences</article-title>
          .
          <source>PhD thesis</source>
          , Dissertation, Stuttgart University,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Robert</surname>
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Fano</surname>
          </string-name>
          .
          <source>Transmission of Information: A Statistical Theory of Communication</source>
          . The MIT Press,
          <year>March 1961</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Hu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Qian</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Jiang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Pei</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Q.</given-names>
            <surname>Zheng</surname>
          </string-name>
          .
          <article-title>Mining query subtopics from search log data</article-title>
          .
          <source>In Proc. of the 35th int. ACM SIGIR conf. on IR</source>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>C.</given-names>
            <surname>Lioma</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Larsen</surname>
          </string-name>
          , and
          <string-name>
            <given-names>W.</given-names>
            <surname>Lu</surname>
          </string-name>
          .
          <article-title>Rhetorical relations for information retrieval</article-title>
          .
          <source>In Proc. of the 35th int. ACM SIGIR conf. on IR</source>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Kevin</given-names>
            <surname>Lund</surname>
          </string-name>
          and
          <string-name>
            <given-names>Curt</given-names>
            <surname>Burgess</surname>
          </string-name>
          .
          <article-title>Producing high-dimensional semantic spaces from lexical co-occurrence</article-title>
          .
          <source>Behavior Research Methods</source>
          , Instruments, &amp;
          <string-name>
            <surname>Computers</surname>
          </string-name>
          ,
          <volume>28</volume>
          (
          <issue>2</issue>
          ),
          <year>June 1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Matsuo</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Ishizuka</surname>
          </string-name>
          .
          <article-title>Keyword extraction from a single document using word co-occurrence statistical information</article-title>
          .
          <source>International Journal on Arti cial Intelligence Tools</source>
          ,
          <volume>13</volume>
          (
          <issue>01</issue>
          ),
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>T.</given-names>
            <surname>Sugimachi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ishino</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Takeda</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Matsuo</surname>
          </string-name>
          .
          <article-title>A method of extracting related words using standardized mutual information</article-title>
          .
          <source>In Discovery Science</source>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>William</given-names>
            <surname>Webber</surname>
          </string-name>
          , Alistair Mo at, and
          <string-name>
            <given-names>Justin</given-names>
            <surname>Zobel</surname>
          </string-name>
          .
          <article-title>A similarity measure for inde nite rankings</article-title>
          .
          <source>ACM Trans. Inf</source>
          . Syst.,
          <volume>28</volume>
          (
          <issue>4</issue>
          ),
          <year>November 2010</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>