09. Mai 2016

I do not love you

I do not love you

For most readers, the title above probably has a strong negative connotation. What if instead of "you", the name of a company was used? The statement still has the same negative connotation, but an opinion of a customer regarding a company might be even more sensitive – at least from a sales point of view. Such public reviews constitute important sources of information for both prospective clients and companies alike. How can one identify, ideally in an automated way, such polarised opinions in the vastness of today’s cyberspace?

For most readers, the title above probably has a strong negative connotation. What if instead of "you", the name of a company was used? The statement still has the same negative connotation, but an opinion of a customer regarding a company might be even more sensitive – at least from a sales point of view. Such public reviews constitute important sources of information for both prospective clients and companies alike. How can one identify, ideally in an automated way, such polarised opinions in the vastness of today’s cyberspace?

Sentiment analysis

A question most product or service suppliers ask themselves is the once concerning their customers' opinion towards their offerings. In the current online landscape, there are several possibilities to find out. Traditionally, online review communities offer and consume information concerning products and services by expressing their opinion as structured ratings and reviews. However, new channels have emerged in the past years, where an important share of consumers chose to express their point of view on a much wider range of topics, exceeding the mere products and services reviews. Channels such as Twitter, blogs or Facebook are offering a much richer experience to the users by not limiting their creativity to structured reviews. Lately, researchers from both academia and industry are trying to tap into these new opinion wells and extract meaningful information which will help with understanding the social dynamics around various topics.

Opinion mining, a computational approach to identifying and categorising opinions in written expressions, could shed light on the matter. This process, also widely known as sentiment analysis, has the goal of determining whether the writer’s attitude (or opinion) towards a particular subject is positive, negative or neutral. Part of the much wider topic of Natural Language Processing (NLP), sentiment analysis focuses only on the polarity of the expressed opinions and it is a good starting point for understanding the social dynamics in today’s online communities.

The basis for sentiment analysis in written expression is generally attributed to the work of M. Bradley and P. Lang (1) who commonly developed the Affective norms for English words (ANEW), a set of normative emotional ratings for a number of words in the English language. The two researchers built this set by asking a series of volunteers to rate, on a scale from 1 to 9, approximately 1'000 English words in terms of affective valence or pleasure (ranging from pleasant to unpleasant) (2).

To exemplify, the responders rated the word love in terms of valence with 8.72 out of 9, a very high value denoting the high positivity of the word (i.e., triggers pleasure). Its antonym, hate, was rated with 2.92, a low valence which implies the word triggers unpleasant feelings to the reader. In the same fashion, the word ink triggers no significant reaction to the reader; it was therefore rated with a valence of 5.00.

In order to extract their overall polarity or sentiment, researchers started applying such collections of classified words to texts. This is the first step in developing sentiment classifiers for written expressions.

The basics of sentiment classifiers

Based on their numeric valence, words can be grouped by their sentiment polarity: words with lower valence are marked as having a negative polarity, whereas words with higher valence are marked as having a positive polarity. This grouping produces a pre-defined lexicon with known typical sentiment polarity which can be used in the lexical methods of sentiment analysis.

Typically, a simple lexical method breaks the written expression into tokens (words) and looks up these tokens in the lexicon. The recognised tokens are collected and the polarity of the given text is determined by the majority of positive or negative tokens, respectively.

Let’s consider the following example:

A [beautiful,7.60] summer day, the perfect way to start my [holiday,7.55].

In a similar fashion, the sentence A plane crash killed many people is classified as negative, given the majority of words with low valence (crash and kill):

A plane [crash,2.31] [kill,1,89]ed many people.

This simple token-matching algorithm can shed some light on the sentiment conveyed by the written expression, but it has several drawbacks. The most important drawback of this approach being that it does not account for the context of the identified tokens. For example, the sentence

I do not love you!

would generally convey a negative feeling to the reader, however it will still be classified as positive, since the negation not which prefixes the token love is simply omitted.

Enhanced classifiers

Lexicon-based classifiers are as strong as their underlying lexicon. If we consider the original ANEW lexicon, it consists of about 1'000 words only, a fairly small amount given the amount of words an educated person can recognise (3).

Many researchers, including Peter Dodds and his colleagues (4), focused on providing an enhanced lexicon of the English language by contributing 10'000 individual words evaluated in terms of happiness. Of course, enhancing the lexicon can provide better coverage, however, the context in which the word is found can make the difference between interpreting it as positive or negative.

To account for the context, other researchers focused on developing more complex algorithms (such as SentiStrenth (5) and Sentiment Treebank (6)) which also take the sentence structure and grammatical aspects into account. SentiStrength, for example, was developed to extract sentiment strength from informal English text and takes into consideration de-facto grammar and spelling styles found in today’s cyberspace. In addition, this approach considers the booster words (e.g. very) and the negating effect of negatives (e.g. not happy).

Similarly, Sentiment Treebank accounts for the grammatical structure of the analysed sentence and, by using a tree-like representation of the tokens and their co-occurrence in the sentence, considers the amplification or the dampening effects some adjectives and negatives have on the meaning of the text.

Following the previously mentioned example, SentiStrength picks up the fact that the word love is negated and the sentence ends with an exclamation mark. The former changes the polarity of the word love whereas the latter boosts the whole sentence polarity. The sentence is therefore classified as negative.

I do not love [negated multiplier] you ! [punctuation emphasis] [overall result: negative]

In the same fashion, the sentence

You are beautiful and not awful as you say.

is classified overall as positive since enhanced classifiers identify the word beautiful and, in the same time, dampen the effect of the word awful (given the negation not).

Accuracy

Most likely, the concern which comes to one’s mind most frequently when discussing sentiment analysis algorithms, is their accuracy. Fundamentally, the research community agrees that sentiment classifiers are not and will never be 100% accurate. The problem lays in the fact that humans themselves cannot always agree on the meaning or the polarity of words. Coming back to the original ANEW lexicon, the word love was rated as positive and most of the responders agreed on how positive it is (a corresponding standard deviation of 0.70). Differently, the word rifle is rated as negative, however there is a significant difference of opinion on how negative the word actually is (the standard deviation is 2.76, a large value given the 1 to 9 rating scale, denoting a larger spread of the responders' ratings).

Another aspect which must be taken into account in sentiment analysis is the language itself. Studies, such as the one conducted by David Garcia on English, German, and Spanish languages (7) or the one of Isabel Kloumann on the English language (8), show that human-perceived positivity of the most frequently used words exhibits a clear positive bias. This confirms a tendency which was noticed as early as 1969 and which was coined as the Pollyanna Hypothesis (9).

If the clear positive bias in the English and other languages can be taken into account by enhancing the observed negative tokens, sarcasm, for example, is still a challenge. Although some work was done in this direction (10), it still affects the quality and accuracy of sentiment classifiers as it induces noise in the training data. But, as noted by Roberto González (11), not even the human judges perform very well in this regard.

Finally, most of the sentiment classifiers were trained on the English language. Although lexicons for other languages also exist (such as the BAWL-R (12) lexicon), there is still a lot of work to be done to improve their accuracy and coverage.

Implications and applications

Understanding the opinion of the masses as expressed informally online is a desideratum. Many projects, including large-scale multi-institution ones (such as EU-founded project "CyberEmotions" (13)) contribute to the topic of sentiment analysis as it is an important block in understanding the social dynamics in online communities.

Marketing departments find, by monitoring these communities, relevant information about how their products and services are perceived by the consumers and about the image of the company as seen by prospective customers. Automated observers, tools which combine sentiment analysis with other NLP techniques, can therefore help companies to alway have an overview over the evolution of their brand and products. Following this idea, ti&m developed a prototype for a Social Media Monitoring tool for a major Swiss bank. This automated observer collects data from social media channels (such as Twitter) and analyses it in terms of sentiment.

Other corporate departments can also benefit from understanding the sentiment of the masses. Artificial Intelligence (AI)-based Customer Service Applications will perform better if they account for the human aspect. The happiness of the customer needing help could serve as an input for tools such as ManMachine, another outcome of ti&m garage described here.

 

  1. Bradley, M.M., & Lang, P.J. (1999). Affective norms for English words (ANEW): Instruction manual and affective ratings. Technical Report C-1, The Center for Research in Psychophysiology, University of Florida.
  2. The analysis conducted by Bradley and Lang covers three major dimensions of the affective norms: affective valence, arousal and dominance. Since the latter two are usually not used in sentiment analysis, their coverage was skipped.
  3. Zechmeister E.B. et al (1999). Growth of a Functionally Important Lexicon. Journal of Reading Behavior 27(2)
  4. Dodds P.S., et al. (2011). Temporal Patterns of Happiness and Information in a Global Social Network: Hedonometrics and Twitter. PLoS ONE 6(12)
  5. Thelwall, M., et al. (2010). Sentiment strength detection in short informal text. Journal of the American Society for Information Science and Technology, 61(12)
  6. Socher R., et al (2013). Recursive deep models for semantic compositionality over a sentiment treebank. Proceedings of the conference on empirical methods in natural language processing (EMNLP). Vol. 1631
  7. Garcia D. et al. (2012) Positive words carry less information than negative words. EPJ Data Science 1
  8. Kloumann I.M., et al. (2012) Positivity of the English Language. PLoS ONE 7(1)
  9. Boucher J., Osgood C.E. (1969) The Pollyanna hypothesis. Journal of Verbal Learning and Verbal Behavior 8: 1–8
  10. Peng, C.C, et al. Detecting Sarcasm in Text.
  11. González-Ibánez, R., et al. (2011) Identifying sarcasm in Twitter: a closer look. Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics, Volume 2
  12. Vo, M. et al (2009). The Berlin Affective Word List Reloaded (BAWL-R). Behavior Research Methods, 41(2)
  13. http://www.cyberemotions.eu/

Dorian Tanase
Dorian Tanase

Dr. Dorian Tanase has more than 15 years of IT experience. His current focus is on big data and analytics solutions. He graduated from ETH Zurich with a degree in complex systems.

Related Articles

HackZurich: This Is How 565 Techies Spent the Weekend
HackZurich: This Is How 565 Techies Spent the Weekend

565 registered participants, 152 submitted projects and 20280 hours of coding – the occasion was of course Hack Zurich, Europe’s biggest hackathon and one of the most anticipated events for ambitious hackers. The rainy weekend was the perfect opportunity for hackers from all over the world to get together in the Technopark and develop innovative solutions and new apps for the sponsor’s challenges. The goal: develop an amazing prototype and maybe, even disrupt a whole industry.

Mehr erfahren
Trust 750x410
Assurance nach ISAE 3000 für das ti&m Hosting.

ti&m hat das Hosting nach dem ISAE 3000 Standard auf Wirksamkeit der FINMA Rundschreiben RS 2018/3 RS 2008/21 prüfen lassen. Im Interview erklärt Karsten Burger, und Head Innovation Hosting & Application Management bei ti&m, die Hintergründe und welche Vorteile ti&m-Kunden davon bekommen. Zudem gibt er einen Einblick in die Erfolgsgeheimnisse des Hostings von ti&m.

Mehr erfahren
Homeoffice_work_business
Banking – made in Swiss Homeoffices

Wandelt sich das Homeoffice nun auch für die Schweizer Bankenwelt zur Normalität? Zumindest ist sicher, dass die Covid-Krise langfristige Auswirkungen auf die Bankenkultur haben wird. Anhand von vier Hypothesen zeigen wir mögliche Veränderungen auf.

Mehr erfahren
murer_lead
Eine Einführung in Open Banking

Open Banking // Schweizer Banken müssen sich zwar nicht mit Open Banking auseinandersetzen, sollten es aber auf jeden Fall tun. Wenn Open Banking richtig umgesetzt und implementiert ist, dann sind Banken besser für die Zukunft gerüstet. Dabei gibt es auch kulturelle Fragen zu bedenken.

Mehr erfahren
Blog 1_Titelbild
AI ist gekommen um zu bleiben

Seit der Geburtsstunde des Computers hat der Mensch Programme entwickelt und perfektioniert. Fast immer mit dem Ziel effizienter zu werden und die Lebensqualität zu erhöhen. Die Informatik hat sich seither in viele Spezialgebiete aufgeteilt und jüngst ist ein neues Gebiet hinzugekommen: Die Künstliche Intelligenz oder kurz AI für das englische «artificial intelligence».

Mehr erfahren
Setup eines Maven-basierten Multi-Modul-Build incl. RCP- (OSGI-) Komponenten<br/>
Setup eines Maven-basierten Multi-Modul-Build incl. RCP- (OSGI-) Komponenten

Mehr erfahren