<!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>
      <journal-title-group>
        <journal-title>Anniversary of Alan Turing's Birth, Rome, Italy,
June</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Computer challenges guillotine: how an artificial player can solve a complex language TV game with web data analysis</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Luca Squadrone</string-name>
          <email>luca.squadrone@yahoo.it</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>University TorVergata</institution>
          <addr-line>Rome</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Word definitions, from Dictionary of the Italian language HOEPLI</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2012</year>
      </pub-date>
      <volume>15</volume>
      <issue>2012</issue>
      <fpage>47</fpage>
      <lpage>53</lpage>
      <abstract>
        <p>English. This paper describes my attempt to build an artificial player for a very popular language game, called “The Guillotine”, within the Evalita Challenge (Basile et al., 2018). I have built this artificial player to investigate how far we can go by using resources available on the web and a simple matching algorithm. The resources used are Morph-it (Zanchetta and Baroni, 2005) and other online resources. The resolution algorithm is based on two steps: in the first step, it interrogates the knowledge base Morph-it with the five data clues, download the results and perform various intersection operations between the five data sets; in the second step, it refines the results through the other sources such as the Italian proverbs database and the IMDb. My artificial player identified the solution among the first 100 solutions proposed in 25% of cases. This is still far from systems like OTTHO (Semeraro et al., 2012) that obtained the solution in 68% of the cases. However, their result was obtained larger resources and not only with a simple web analysis.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Italiano. Il contributo descrive il
tentativo di costruire un giocatore
artificiale per un gioco linguistico molto
popolare, chiamato ”La Ghigliottina”,
nell’ambito dell’Evalita Challenge
        <xref ref-type="bibr" rid="ref1">(Basile
et al., 2018)</xref>
        . Ho costruito questo
giocatore artificiale per verificare il
limite raggiungibile utilizzando unicamente
le risorse disponibili sul web e un
semplice algoritmo di matching. Le risorse
utilizzate sono Morph-it (Zanchetta and
Baroni, 2005) e altre risorse online.
L’algoritmo di risoluzione si basa su due
fasi: nella prima fase, interroga la base
di conoscenza Morph-it con i cinque
indizi, scarica i risultati ed esegue varie
operazioni di intersezione tra i cinque set di
dati; nella seconda fase, affina i risultati
attraverso altre fonti come il database dei
proverbi italiani e l’IMDb. Il mio
giocatore artificiale ha identificato la soluzione
tra le prime 100 soluzioni proposte nel
25% dei casi. Il risultato ottenuto e`
ancora lontano da sistemi come OTTHO
        <xref ref-type="bibr" rid="ref2">(Semeraro et al., 2012)</xref>
        che ha ottenuto la
soluzione nel 68% dei casi. Tuttavia, il
loro risultato e` stato ottenuto con risorse
piu` ampie e non solo con una semplice
analisi web.
1
      </p>
    </sec>
    <sec id="sec-2">
      <title>System description</title>
      <p>I have used Morph-it (Zanchetta and Baroni, 2005)
as a basis for knowledge, instead of building one,
as it is free, easy to interrogate and above all
suitable for our purpose. Furthermore, it should not
be underestimated that building a knowledge base
involves an enormous amount of work in terms of
time.</p>
      <p>After querying the knowledge base with the five
data clues, the results are downloaded and various
intersection operations are performed between the
five data sets. This procedure allows us to find all
possible solutions and is the basis for choosing the
solution.</p>
      <p>Then to find the final solution is verified the
existence of proverbs, Aphorisms, movies or books
(etc.) that contain both the clue and the possible
solution.
2</p>
    </sec>
    <sec id="sec-3">
      <title>The memory of the system: Morph-it!</title>
      <p>Morph-it! is a free morphological resource for the
Italian language, a lexicon of inflected forms with
their lemma and morphological features. It was
designed by Marco Baroni and Eros Zanchetta.
The lexicon currently contains 505,074 entries and
35,056 lemmas. Morph-it! can be used as a
data source for a lemmatizer/morphological
analyzer/morphological generator.</p>
      <p>The main source of linguistic data was the
“Repubblica” corpus (approximately 380 million
tokens), from which was extracted lemmas and
inferred morphological information not present in
the original corpus (i.e. gender) using
distributional as well as morphological cues. With that
information then was generated inflected forms for
all extracted lemmas.</p>
      <p>Morph-it includes several corpora. A corpus
(plural corpora) or text corpus is a large and
structured set of texts. In order to make the corpora
more useful for doing linguistic research, they are
often subjected to a process known as
annotation. An example of annotating a corpus is
partof-speech tagging, or POS-tagging, in which
information about each word’s part of speech (verb,
noun, adjective, etc.)</p>
      <p>Since only some of these corpora are publicly
available, I have chosen:</p>
      <p>La Repubblica, a corpus of Italian newspaper
texts published between 1985 and 2000
(approximately 380M tokens);
ItWac Complete, a corpus of web pages in
Italian crawled from Italian university
websites</p>
      <p>These two corpora form our knowledge base
and are united to provide the widest and most
comprehensive knowledge base possible.</p>
      <p>Then, these resources will be used to match the
results found.</p>
      <p>Proverbs and Aphorisms on Italian version
of wikiquotes and on the database of Italian
proverbs by ”Accademia della Crusca”
Books database crawled from ibs web site
Film titles, crawled from the Internet Movie
Database</p>
    </sec>
    <sec id="sec-4">
      <title>The algorithm</title>
      <p>The basic idea of the algorithm1 is to derive a set
of words from MORPH-IT!, using only the 5 clues
given in input. This will be the set of possible
solutions.</p>
      <p>Then the probability of each of these words
being the actual solution will be evaluated. This is
done through a second phase consisting of a
verification of the existence of proverbs, Aphorisms,
movies or books (etc.) that contain both the clue
and the possible solution. The words with the most
associations found are the solutions.</p>
      <p>With the term ”possible solutions” I will
indicate a selection of words where the solution is
contained, while with the term ”final solutions” I will
indicate the 100 words chosen among all the
possible solutions.</p>
      <p>I would also like to point out that the speed of
execution of the algorithm depends on the speed
of the internet connection, since I use an online
knowledge base and different data must be
downloaded each time.</p>
      <p>Here is the pseudo code of the first part of the
algorithm that finds the possible solutions. It is
illustrated in Figure 1:
1. The algorithm takes the 5 clues as input.
2. For each clue it executes two queries, one
respectively in each corpus, Repubblica and
itWac Complete.
3. After downloading, the results from queries
are concatenated as text.</p>
      <p>At the end of this procedure, for each clue,
the algorithm will generate a single text. In
this text there will be all the concepts with a
relation to the clue.
4. Each of the five texts is transformed into a set
of single words. So I get 5 sets of words, one
for each clue.
5. The intersection between these sets (which I
will call ”Final Set”) is made. The solution,
semantically linked to all five clues, in most
cases will be contained in the final set. This
hypothesis will be verified later, in the next
section.</p>
      <p>https://gitlab.com/osiast/computer6. Among the possible solutions there are many
insignificant words such as articles,
conjunctions and prepositions. To delete them, I
subtracted the set of Stop Words from the final
set.</p>
      <p>Stop words are words which are filtered out
before or after processing of natural language
data. Though ”stop words” usually refers to
the most common words in a language, there
is no single universal list of stop words used
by all natural language processing tools, and
indeed not all tools even use such a list. So,
I built a special list of Stop Words
specifically for this purpose, based on two online
resources:</p>
      <p>A collection of stopwords on github 2
A collection of stopwords from the
Snowball site 3
After the stopwords have been removed from
the final set, I finally have the set of possible
solutions.</p>
      <p>The next step is the verification of the existence
of proverbs, Aphorisms, movies or books (etc.)
that contain both one clue and the possible
solution. As already mentioned, the words with the
most associations found are the final solution.</p>
      <p>So, along with each possible solution, I search
for clues within the following repositories:
Proverbs and Aphorisms from two different
resources: Italian version of wikiquotes and
on the database of Italian proverbs by
”Accademia della Crusca”
2github.com/stopwords-iso/stopwordsit/blob/master/stopwords-it.txt
3snowball.tartarus.org/algorithms/italian/stop.txt
Whenever the clue and the solution are found
together, for example in the same proverb or title of
a film, an additional weight of 0.2 is assigned to
that solution. The weight can vary from 0 to 1. It
indicates the probability that this is the solution of
the game.</p>
      <p>Here is the pseudo code of this second part of
the algorithm.</p>
      <p>1. For each of the 5 clues download proverbs,
film and book titles, vocabulary definitions
and aphorisms containing that clue and put
them together in one text.</p>
      <p>At this point we have 5 texts.
2. To all the possible solutions I assign the value
0 as weight.
3. Whenever one of the possible solutions is
found in one of these texts, its weight
increases by 0.2.
4. Finally the first 100 are taken which have the
largest weight in descending order.
4</p>
    </sec>
    <sec id="sec-5">
      <title>Test and Results</title>
      <p>Testing the algorithm is a key step in the validation
process of the proposed solution.</p>
      <p>In the first test below, I will run the algorithm
on 315 instances of the game in order to evaluate
its efficiency and study the results obtained. As
already mentioned, each game is composed of five
clues and a solution.</p>
      <p>The second test will be on the ”knowledge
base”. I’m going to measure how many clues
contains on average. This will be useful to indicate an
upper-bound of efficiency that the algorithm can
not overstep.
4.1</p>
      <sec id="sec-5-1">
        <title>Test the algorithm</title>
        <p>To evaluate the efficiency of the algorithm, I tried
it for 315 different games.4</p>
        <p>4The games used can be downloaded from this link
https://goo.gl/6FpK3p</p>
        <p>The query is limited to 8,000 lines per request,
as statistically I have noticed that it is a good
compromise between the resolution speed and the
efficiency of the algorithm.</p>
        <p>I downloaded the set of games and coded them
into a list. Then I ran the algorithm for each game
in the list and I memorized the results.</p>
        <p>The data has been processed to create table 1.</p>
        <p>In over 76% of cases the exact solution is found
in the ”Possible Solution”. This shows that ”The
solution, semantically linked to all five clues, in
most cases will be contained in the final set”. 5</p>
        <p>Regarding the final solutions, in 24,76% of
cases the solution is among the first 100. I got
a similar result with the test set, where I reached
25,7%.</p>
        <p>Table 2 shows the distributions of the scores for
the correct and missed solutions of our system on
the full set of games in the test set in comparision
with other system.6
4.2</p>
      </sec>
      <sec id="sec-5-2">
        <title>Test the knowledge base: does it always contain the solution?</title>
        <p>To verify that the knowledge base is suitable for
our purpose and that it always contains the
solution, I have performed tests on 1575 clues, that is,
all the ones I had.</p>
        <p>In particular I wanted to know if the knowledge
base contained a relationship between the solution
and each of them. The basic idea was to look for
the clue inside the corpora and then filter the
results. For this task I used the NoSketch Engine, an
open-source tool to perform corpus searches.</p>
        <p>As already mentioned, I did tests with 1575
clues of the game looking for them (one at a time)
5The full results can be viewed at this link
https://goo.gl/BdCee9.</p>
        <p>6MRR (Mean Reciprocal Rank)
inside the corpora ”Repubblica” and ”ItWac
Complete”. The results were very positive. In fact,
out of 1575 clues, 1519 of them were always
connected with one or more correspondences to the
solution.</p>
        <p>We can see that out of 315 games:
18% (56 of them) can not be resolved due to
the absence of 1 or more clues in the chosen
knowledge base;
only 5% (17 of them) can not be resolved due
to the limit set on the algorithm query;</p>
        <p>This means that without limiting the queries, I
will find the solution at most 82% of the time.</p>
        <p>So this result shows that the limit of 8000 lines
per query penalized the efficiency of the algorithm
by only 5% percent.</p>
        <p>This confirms that limiting the query to 8000
rows is a good compromise.
5</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>Analysis of the results and future work</title>
      <p>The algorithm’s execution, both with the training
set and with the test set, produced similar results.
From the data obtained we can notice that the
percentage of the solutions found in the first phase of
the algorithm decreases in the second phase.</p>
      <p>Furthermore the value of the MRR is very low
despite the solution being found 27 times out of
105.</p>
      <p>The reason for these results is that the number of
resources in the matching phase are limited. So the
solution, despite being found, is often not among
first in the output of the 100 proposed solutions.</p>
      <p>As future developments, we could improve the
algorithm to find the solution from the possible
solutions by increasing resources to provide more
accurate results.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <given-names>Pierpaolo</given-names>
            <surname>Basile</surname>
          </string-name>
          , Marco de Gemmis, Lucia Siciliani, and
          <string-name>
            <given-names>Giovanni</given-names>
            <surname>Semeraro</surname>
          </string-name>
          .
          <year>2018</year>
          .
          <article-title>Overview of the evalita 2018 solving language games (nlp4fun) task</article-title>
          . In Tommaso Caselli, Nicole Novielli, Viviana Patti, and Paolo Rosso, editors,
          <source>Proceedings of the 6th evaluation campaign of Natural Language Processing and Speech tools for Italian (EVALITA'18)</source>
          , Turin, Italy. CEUR.org.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <given-names>Giovanni</given-names>
            <surname>Semeraro</surname>
          </string-name>
          , Pasquale Lops, Marco de Gemmis, and
          <string-name>
            <given-names>Pierpaolo</given-names>
            <surname>Basile</surname>
          </string-name>
          .
          <year>2012</year>
          .
          <article-title>OTTHO: an artificial player for a complex language game</article-title>
          .
          <source>In Popularize Artificial Intelligence, Proceedings of the Eros Zanchetta and Marco Baroni</source>
          .
          <year>2005</year>
          .
          <article-title>Morph-it! a free corpus-based morphological resource for the italian language</article-title>
          .
          <source>Corpus Linguistics</source>
          <year>2005</year>
          ,
          <volume>1</volume>
          (
          <issue>1</issue>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>