<!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>Reputation Pro ling with GATE</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Mark A. Greenwood</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Niraj Aswani</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Kalina Bontcheva</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Univeristy of She eld</institution>
          ,
          <addr-line>She eld</addr-line>
          ,
          <country country="UK">UK</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Brand management has become increasingly di cult in the age of social media as the volume of opinions and discussions surrounding a companies products have swelled beyond the scale at which they can be reviewed manually. In this paper we report details of a system for monitoring Twitter1 to nd tweets relevant to a speci c entity and the classi cation of such tweets based upon their reputational e ect. The system was evaluated as part of the recent RepLab 2012 pro ling task and the results from this evaluation show that our system out performs a number of nave baseline approaches.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>Brand management has always been an important part of any companies public
relations stratergy, but with the recent explosion in social media it has become
more and more di cult to exhaustively monitor the vast amount of information
in a timely fashion. The solution is to employ automatic methods to monitor
social media for opinions. Such algorithms usually involve two stages. Firstly
relevant documents (tweets, forum posts, etc.) have to be identi ed before a
second phase can determine the opinions contained within them. The RepLab
2012 pro lling task accurately mirrors this situation using Twitter; the task
consists of ltering tweets to determine those which are related to a given entity,
and a polarity task in which the tweets are to be labelled according to their
e ect on brand reputation.</p>
      <p>
        In this paper we describe the GATE [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] based approaches to ltering and
polarity we submitted to RepLab 2012 for evaluation. We treated ltering and
polarity classi cation as two independent tasks and as such the majority of this
paper is divided into two sections which detail the approaches we developed
before concluding with a discussion of the the evaluation results.
The rst stage in any approach to reputation pro ling invovles determining
which \documents" (be they tweets, forum posts, etc.) are actually relevant. For
example, a tweet containing the word Apple might refer to the fruit2, the well
1 http://www.twitter.com
2 http://en.wikipedia.org/wiki/Apple
known manufacturer of computers3, or the Beatles record company4 among a
whole host of possibilities5.
      </p>
      <p>
        Our approach to determining relevance is based upon our recent research into
disambiguation [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. In this work we have been interested in determining which
of a given set of DBpedia entries which share a common lexalization is actually
being referred to. Similar to state-of-the-art methods, our algorithm uses the
textual context, in which the particular candidate entity appears, in order to
calculate a number of similarity metrics. In the current case this textual content
includes the tweet itself, the expanded form of any hashtags6 and any pages the
tweet explicitly links to. Then an overall score is produced for each candidate
URI, based on a weighted sum of the following similarity metrics:
{ String similarity : edit distance between the text string (such as Paris), and
the lexicalisations of the entity URIs (e.g. Paris and Paris, Texas ).
{ Structural similarity : calculated based on the ontology and instance property
values in the Linking Open Data7 (LOD) resource.
{ Contextual similarity : calculated based on the probability that two words
have a similar meaning, based on random indexing [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
{ Commonness : number of mentions of a speci c URI as anchor text in Wikipedia
(based on the commonness metric for Wikipedia pages [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], also referred to as
popularity [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]). This is the equivalent to assigning the most frequent sense
in word sense disambiguation. However, unlike [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], for e ciency we do not
use Google queries as additional evidence.
      </p>
      <p>Tie-breaks, i.e. candidate URIs with the same overall score, are resolved based
on which one has the highest commonness score. If nevertheless more than one
candidate remains, the instance which is more speci c according to the LOD
ontology is preferred.</p>
      <p>Unfortunately, because of the nature of tweets, it often isn't possible to
distinguish a noun (the fruit) from a proper noun (either of the two companies) due
to the lack of case information etc. Due to this we assume that any reference to
the entity, using any case, might be relevant and then disambiguate. This has
the unfortunate side e ect of assigning a URI to every mention. Our approach
needs to be improved to incorporate the null assignment to handle cases where
it is clear that the mention is not related to any of the known options.
3</p>
    </sec>
    <sec id="sec-2">
      <title>Polarity</title>
      <p>We treated the polarity task as a standard text classi cation problem and
classied every tweet regardless of whether or not we deemed the tweet to be relevant8.
3 http://en.wikipedia.org/wiki/Apple_Inc.
4 http://en.wikipedia.org/wiki/Apple_Corps
5 http://en.wikipedia.org/wiki/Apple_(disambiguation)
6 Hashtags were expanded via http://tagdef.com/
7 http://linkeddata.org/
8 This also makes sense given that in RepLab 2012 the two tasks are evaluated
separately as well as in combination.</p>
      <p>We experimented with two di erent classi cation approaches; k-Nearest
Neighbours and Nave Bayes. Both approaches utilised the same GATE pipeline for
pre-processing of the tweets. The rest of this section is split into three parts.
Firstly we outline the pre-processing pipeline and then we detail the two
classiers we built for this task.
3.1</p>
      <sec id="sec-2-1">
        <title>Pre-Processing</title>
        <p>Both approaches to polarity classi cation are based (primarily) upon simple
tokenization of the individual tweets. We have implemented a simple GATE
pipeline which performs tokenization, taking in to account a number of token
types speci c to the way in which tweets are often written. This pipeline consists
of the following processing resources (PR):
{ Document Reset: a standard GATE PR which simply deletes existing
annotations, allowing an application to be run multiple times for development
purposes.
{ Tokenizer: the standard GATE UNICODE tokenizer.
{ Sentence Splitter: As each document contains a single tweet, which we
assume to be a single sentence, simply creates a single annotation spanning
the entire tweet. When processing the training data features are created on
each annotation recording the polarity and language of the tweet.
{ Hashtag Processor: a simple JAPE grammar which recognises hashtags,
ensuring that a single hashtag is represented as a single token and a HashTag
annotation.
{ Emoticon Processor: a combination of a gazetteer and a JAPE grammar
which recognises emoticons, normalises them (see below) and ensures that
they are represented as a single token and an Emoticon annotation.
{ Part-of-Speech Tagger: a standard GATE PR which assigns
part-ofspeech (POS) tags to token annotations.</p>
        <p>The only non-standard GATE component in this pipeline is the emoticon
processor. The motivation behind this component is that with limited training data
it is vital that we reduce, or eliminate, variation in expression of emoticons which
may well be pivitol in conveying polarity. This normalization was performed by
building a gazetteer of known emoticons9. Each entry in the gazetteer was paired
with a normalized form of the emoticon. For example :-), :), and :] are all
normalised to :). The JAPE grammar then ensures a single token annotation spans
the emoticon using the normalised form rather than the underlying characters.</p>
        <p>The result of running this pre-processing pipeline is a document annotated
with a sequence of tokens which can be used by a machine learning algorithm
to learn a polarity classi er. The same pipeline is also used to pre-process the
unseen tweets before the classi ers are applied.
9 http://en.wikipedia.org/wiki/List_of_emoticons was used as a starting point
3.2</p>
        <p>
          k-Nearest Neighbours Classi cation
The standard GATE distribution provides a number of machine learning tools
which can be used to perform text classi cation10. For these experiments into
polarity classi cation we used the Batch Learning PR con gured to perform
kNearest Neighbours (k-NN) classi cation using an implementation from Weka[
          <xref ref-type="bibr" rid="ref4">4</xref>
          ].
Whilst space constraints preclude full details of the implementation (which can
be found in [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]) the algorithm is con gured to use the following features for
learning: POS tags both 1-gram and 2-gram, emoticons, hashtags and the
language of the tweet. Whilst it may seem strange that the words themselves (or
at least their root forms) were not used to train the classi er, experimentation
showed that including them led to a drop in performance of up to 5%. The reason
behind this rather odd result is as yet unclear but may be related to both the
small amount of training data (and hence only a small number of words occuring
frequently) and the mixture of both English and Spanish text.
3.3
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>Nave Bayes Classi cation</title>
        <p>
          Whilst the machine leanring PRs provided with GATE are easy to use and highly
con gurable we decided to implement a second polarity classi er to allow for
more ne grained control over the entire process. We chose to build a Nave Bayes
classi er following the example in [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. This approach essentially reduces down to
using uni-grams to classify text as the algorithm assumes that the probability
of a word occuring is independent of it's position within the document.
        </p>
        <p>Our speci c implementation used lowercased versions of tokens as well as
emoticons and hashtags as the input to the learning algorithm. In an attempt
to improve classi cation due to the small amount of text present in the training
tweets we also made use of the supporting documents (i.e. pages linked to from
tweets). Rather than blindly including these pages in to the training set, the
algorithm was tweaked to include the word counts but to ignore the document
lengths. This simple change to the Nave Bayes algorith was made in an attempt
to not skew the distributions, especially given that we classi ed each tweet in
the test set using the tweet alone, and these are of a common length (i.e. usually
short and never more than 140 characters).
4</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Results and Discussion</title>
      <p>We submitted two runs for the pro ling task; each run paired one of the
polarity approaches with our disambiguation based approach to relevance ltering;
GATE 1 used the k-NN classi er for polarity classi cation while GATE 2 used the
Nave Bayes classi er. Unfortunately due to an error in the script used to
combine the approaches for GATE 1 all tweets were classi ed as positive with respect
to polarity. Whilst we list the results for this run below, we also detail a third
submission, GATE 3, which we have evaluated (using the supplied gold standard)
10 see http://gate.ac.uk/userguide/chap:ml for details</p>
      <p>Accuracy R S F(R,S)
GATE 1 0.44 0 0 0
GATE 2 0.33 0.27 0.28 0.26</p>
      <p>GATE 3 0.41 0.25 0.21 0.22
All positive 0.44 0 0 0
All neutral 0.33 0 0 0
All negative 0.23 0 0 0</p>
      <p>
        Table 2. Polarity Classi cation Results
independently. For comparison we have also included the baseline results. For
full details of other submissions and the evaluation metrics used see the RepLab
2012 overview paper [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
4.1
      </p>
      <sec id="sec-3-1">
        <title>Relevance Filtering</title>
        <p>As we submitted the same relevance judgements for each of our runs Table 1
shows just a single GATE run instead of duplicating the values. Note that the
all relevant baseline has an accuracy of 0.71 which shows the large bias within
the evaluation set towards relevant tweets. A similar bias can also be found
within the training data which results in only a small amount of non-relevant
examples. This bias may be a general occurance or may be due to the speci c
entities chosen for this evaluation, i.e. many of the entities do not actually require
disambiguation.
4.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Polarity Classi cation</title>
        <p>Table 2 shows the results of our two attempts at polarity classi cation. Note
that as previously mentioned we also report the results of the GATE 3 run, which
while not an o cially evaluated run, shows how our GATE 1 run should have
performed.</p>
        <p>We believe that relatively low performance of our classi ers is due to two
things: the small amount of training data used and the di erence in language use
when expressing opinions across entities of di erent types. This second problem
is probably more relevant than the lack of training data. During development
we tested the algorithms using k-fold cross validation in two ways. In both cases
we used six folds. One approach used the training data from one entity as a fold,
and in the other data from all six entities were randomly split equally between
the six folds. The average accuracy of the two approaches showed a di erence
of around 25%, with better performance being achieved when the folds were
generated randomly. We belive that this is due to the fact that none of the six
entities in the training data overlap in the products or services they provide and
as such the language used to talk about them di ers greatly. The six entities
were:
{ Alcatel: a provider of backend communications equipment, usually sold to
governments or telecommunication companies rather than end-users
{ Apple: a seller of consumer electronic goods including computers, phones
and MP3 players
{ Armani: a high-end fashion label
{ Barclays: a British multinational banking and nancial services company
{ Lufthansa: the largest airline in Europe
{ Marriott: a large chain of hotels and leisure resorts</p>
        <p>As you can imagine complaining about a late ight (Lufthansa) would use
very di erent language to complaints about short battery life in a consumer
electronics product (Apple). This suggests that when building a classi er the
training data should contain tweets about a variety of di erent entities.
4.3</p>
      </sec>
      <sec id="sec-3-3">
        <title>Combined Pro ling Performance</title>
        <p>The results of combining our approaches to relevance ltering and polarity
classi cation can be seen in Table 3. The combined evaluation was carried out by
assuming a four class classi cation: not relevant, relevant and positive, relevant
and neutral, and relevant and negative. As you can see from the results tables
our combined approach to pro lling out performed any of the three baseline
systems included for comparison. While a system with accuracy of 0.35 (our best
result obtained by the GATE 1 run) can not be considered a strong performer we
feel that it provides an ideal basis for our ongoing work in this area. As noted
above we have already highlighted a number of areas where the approach could
be improved and work is already going on to move the algorithms forward.
This research is partially supported by the EU-funded FP7 TrendMiner11 project.
Kalina Bontcheva is supported by the Engineering and Physical Sciences
Research Council (grant EP/I004327/1).</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Amigo</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Corujo</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gonzalo</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Meij</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rijke</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <year>d</year>
          .: Overview of RepLab 2012:
          <article-title>Evaluating Online Reputation Management Systems</article-title>
          .
          <source>In: CLEF 2012 Labs and Workshop Notebook</source>
          Papers (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Cunningham</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maynard</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bontcheva</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tablan</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aswani</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Roberts</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gorrell</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Funk</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Roberts</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Damljanovic</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Heitz</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Greenwood</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Saggion</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Petrak</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Peters</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          :
          <source>Text Processing with GATE (Version 6)</source>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Damljanovic</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bontcheva</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Named Entity Disambiguation using Linked Data</article-title>
          .
          <source>In: Proceedings of the 9th Extended Semantic Web Conference</source>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Frank</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hall</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Holmes</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kirkby</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pfahringer</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Witten</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Weka: A machine learning workbench for data mining. Data Mining and Knowledge Discovery Handbook: A Complete Guide for Practitioners and</article-title>
          Researchers pp.
          <volume>1305</volume>
          {
          <issue>1314</issue>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Milne</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Witten</surname>
            ,
            <given-names>I.H.</given-names>
          </string-name>
          :
          <article-title>Learning to link with wikipedia</article-title>
          .
          <source>In: Proc. of the 17th Conf. on Information and Knowledge Management (CIKM)</source>
          . pp.
          <volume>509</volume>
          {
          <issue>518</issue>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6. Mitchell, T.:
          <article-title>Machine Learning</article-title>
          .
          <source>McGraw-Hill</source>
          , New York (
          <year>1997</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Rao</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McNamee</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dredze</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Entity linking: Finding extracted entities in a knowledge base. In: Multi-source, Multi-lingual Information Extraction and Summarization (</article-title>
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Sahlgren</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>An introduction to random indexing</article-title>
          .
          <source>In: Proc. of the Methods and Applications of Semantic Indexing Workshop</source>
          . Copenhagen, Denmark (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>