Tag: sentiment analysis

Fun with Text – Managing Text Analytics

The year is 2016.

I’m a year older than when I designed the text analytics lecture titled “Fun with Text – Hacking Text Analytics“.

Yesterday, I found myself giving a follow on lecture titled “Fun with Text – Managing Text Analytics”.

Here are the slides:

“Hacking Text Analytics” was meant to help students understand a range text analytics problems by reducing them into simpler problems.

But it was designed with the understanding that they would hack their own text analytics tools.

However, in project after project, I was seeing that engineers tended not to build their own text analytics tools, but instead rely on handy and widely available open source products, and that the main thing they needed to learn was how to use them.

So, when I was asked to lecture to an audience at the NASSCOM Big Data and Analytics Summit in Hyderabad, and was advised that a large part of the audience might be non-technical, and could I please base the talk on use-cases, I tried a different tack.

So I designed another lecture “Fun with Text – Managing Text Analytics” about:

  • 3 types of opportunities for text analytics that typically exist in every vertical
  • 3 use cases dealing with each of these types of opportunities
  • 3 mistakes to avoid and 3 things to embrace

And the take away from it is how to go about solving a typical business problem (involving text), using text analytics.

Enjoy the slides!

Visit Aiaioo Labs

Wishful Thinking and Leprechauns

I recently came across a lovely cartoon on Leprechauns and social media.

Fortunately for us, we have a leprechaun in the office.

(So, now you know where we get our startup funding from).

Here’s a picture of the guy (that’s the cubicle he shares with Selasdia):

DSC00227

Just kidding!

One of our business partners brought the little pewter leprechaun in the picture back to India for us from Ireland.

It might have once been popularly believed in Ireland that leprechauns had the ability to grant Wishes.

And we find Wishes immensely interesting because some of the earliest work on Intention Analysis started out as an attempt to detect and classify Wishes.

In fact, one of the loveliest papers on the subject started out with an attempt to study what people wished for (wanted) on New Years Day.

You can read the paper here:  http://pages.cs.wisc.edu/~jerryzhu/pub/wish.pdf

It has a very beautiful title: “May All Your Wishes Come True:  A Study of Wishes and How to Recognize Them”

You also find the word Wishes in the title of one of the first attempts in research literature to find “buy” intentions:

http://www.aclweb.org/anthology-new/W/W10/W10-0207.pdf

It is a paper titled, again quite poetically (what’s with Wishes and beautiful titles!) “Wishful Thinking – Finding suggestions and ‘buy’ wishes from product reviews”.

This paper was written by a research team working at Cognizant (India) in 2010.

Sentiment Analysis, Intention Analysis and the Direction of Fit

Direction of Fit

As you know, for some years now, all of us who form part of the NLP research team at Aiaioo Labs have been working on a technology for text analysis called ‘Intention Analysis‘.

It was something few had heard of when we started.

Today, a lot more people know the term.

But there has been not a great deal of research work published on Intention Analysis in the last 20 years.

So, we’re really happy to be one of the first research teams in ‘recent times’ to delve into the subject again.

We’re also really thrilled to be able to let you know that we’ve just been allowed to demonstrate our work on Intention Analysis at the COLING 2012 conference which will be held in Bombay (now officially known as Mumbai).

I hope I shall get to meet many of you in Bombay in a couple of weeks.

The theory that defines and shapes our work on Intention Analysis is known as ‘Speech Act Theory’.

One of the earlier philosophers to work on it was John Rogers Searle.

He augmented the theory with the concept of Intentional States.  (Incidentally, Intentional States are not even defined in the Wikipedia).

According to Searle, Intentional States could be either Beliefs or Desires.

He differentiated Beliefs from Desires by their direction of fit.

The direction of fit of an intentional state is said to be ‘mind-to-world’ if through the performance of the speech act, a mental state is established, revealed or altered.

The direction of fit of a speech act or intentional state is said to be ‘world-to-mind’ if the performance of the speech act alters the state of the world.

So, sentiment analysis is all about Beliefs.  The direction of fit is mind-to-world.  You see things in the world, and form opinions about them.

Intention analysis on the other hand is all about Desires.  The direction of fit is world-to-mind.  You try to fit the world to a model of how the world should be that resides in your mind.

If you would like to learn more, you can find our paper here:  www.aiaioo.com/publications/coling2012.pdf

Discovering intent for retargeting

Text-based Intention Analysis

At Aiaioo Labs, we have been developing text analytics tools for the discovery of intent for a number of years, as explained in the following articles:

  1. Intentions and Opinions
  2. Prior Work on Intentions

In recent months and years, we have seen other firms come up with similar technologies, studies and initiatives:

  1. SocialNuggets offers a study on the ROI of intent analysis
  2. Solariat has been trying to convince Facebook to use intention analysis for ad placement
  3. WisdomTap did a study on the power of intent analysis with us

These are all text-based studies, using the content of conversations on social media to discover intentions.

However, the most recent attempts at improving the targeting of ads have focused on methods for discovering intent without using any unstructured information.  Below, we look at two of the methods.

One of the methods is advertisement retargeting.

Retargeting

Retargeting involves showing ads to customers based on intent discovered from past visits to sales portals.  For instance, if you visited Amazon’s books section, you have demonstrated the intent to purchase books.  It’s clear as crystal, and there is no text analysis involved.

Now if Amazon tells Facebook that a particular user visited Amazon’s books section, Facebook can use the information to show suitable Amazon ads to that user, even after the user has left Amazon.  That is called retargeting.  It is in essence a kind of intention analysis, but without the use of text.

Here is an article about retargeting on Facebook:

It’s Become Tragically Clear That Facebook Chased The Wrong Business For Years

Another method is the use of special purpose social networks.

Special Purpose Social Networks

When most people go on LinkedIn, they have careers or business contacts on their minds.  So, LinkedIn might work well for job ads or B2B branding exercises.

This article on Forbes talks about this type of intent analysis:  Why Consumer Intent Drives The Value Of Social Networks

It’s very interesting to see wholly new ways to guess at social networking users’ intentions.

Text-Based

  • Advantages:  doesn’t need data from outside the website
  • Disadvantages:  might be perceived as an invasion of privacy, needs conversations, low volume, low accuracy

Retargeting

  • Advantages:  high volume, high accuracy, no privacy issues, needs no conversations
  • Disadvantages:  needs data from outside the website

Special purpose networks

  • Advantages:  high volume, no privacy issues, needs no conversations
  • Disadvantages:  low accuracy, the space of intentions that can be assumed is limited per network

Phones can be Personal Assistants

Mobile phones are no longer just communication devices. They are also used as follows:
a) As consoles for entertainment
b) As personal task management and planning tools

Keeping the second use in mind, it would be in the cell phone manufacturers’ best interests to develop highly integrated task management tools for cell-phones.

Cell phones today lack seamless integration between the email and SMS applications and the task management applications.

When SMS messages or Email messages are received by the user about a task, there is little to no assistance in transferring the relevant data to a task management application.

What seems to be needed is a way to assist the user in capturing the information related to the task and moving it to a third-party task management application on the cell-phone.

But intention recognition algorithms can do just that!

If an SMS says “What is the name of the person we met the other day?” it should be possible to detect that this is an inquiry and that the recipient now has the task of sending a response.

Another example is the following SMS “Can you please send me the draft report by 2 pm”. This SMS contains a directive and the recipient now has a task to complete by a deadline.

Yet another example is the following “Would 4 pm work for you?” This is a meeting request.

These categories of tasks can be identified by looking at incoming and outgoing SMS messages and classifying them into various categories of tasks.

There is also an entity extraction task involved (identifying the deadlines and time ranges).

Once task intentions are identified, the phone could take the following steps:
a) The phone confirms with the user whether or not a task needs to be created.
b) The phone passes the task to the user’s preferred task management tool.

I just wanted to point you to an interesting dissenting view from a Google engineer. In the blog post “Will Google fight Apple’s Siri with Alfred?“, Alexei Oreskovic quotes Google’s head of mobile Andy Rubin as saying:

“I don’t believe that your phone should be your assistant. Your phone is a tool for communicating. You shouldn’t be communicating with the phone; you should be communicating with somebody on the other side of the phone.”

However, the same article also says the following:

“On Tuesday Google said it had acquired the tech company that has developed Alfred, a smartphone app that acts as a “personal assistant” to make recommendations based on your interests and your “context,” such as location, time of day, intent and social information.”

Event and Fact Analysis

In the post “Intent on Intentions”, I’d talked a bit about the Speech Act Theory of Searle and Winograd.

In this blog post, I’d like to look at all other utterances. What purpose do utterances have if they are meaningful, but are not a Speech Act?

It turns out that meaningful utterances that do not convey Speech Acts, typically convey information. Information in turn comes in two flavours – events and facts. Facts represent states of the world (they describe relations between entities or describe properties of entities). Events represent changes.

For example, “London is in England” is a fact, whereas “London Bridge is falling down” is an event.

Entities are the things being talked about. In the sentences used to illustrate events and facts above, the following entities may be observed: “London”, “England” and “London Bridge”.

The distinction between intentions, events and facts is not watertight. There are times when utterances can cross the boundaries and fall into more than one of these categories.

Interestingly, there are different uses for the three kinds of text analysis (analysis of intention, analysis of events, and analysis of fact) and types of data that they may be applied to.

Data Sources

  • Event Analysis: News articles, because news
    reports are always about important happenings or changes in the state of the world, and
    hence are rich with events and also with facts.
  • Fact Analysis: Wikipedia, other Encyclopedias and Knowledge Bases are full of facts,
    but don’t necessarily report current events.
    They may contain information on events that
    took place in another age.
  • Intention Analysis: Emails Messages, Customer Feedback, Social
    Media Messages

Enterprise Applications

  • Event Analysis: Media Monitoring Tools,
    Opportunity Identification Tools, Conformance and Discovery Tools
  • Fact Analysis: Enterprise Search, Semantic
    Web, Logic and Inference Engines
  • Intention Analysis: CRM Tools, Collaboration Tools, Task Management Tools, Communication Devices

Here is a link to a whitepaper on the topic of doing a 360 degree analysis of text.

Intentions and Opinions

In the last blog post, I talked about intention analysis and what it does.

Intention analysis is the identification of intentions from text. Some examples of intentions are:

a) intention to complain
b) intention to inquire
c) intention to issue a directive
d) intention to buy

In this post, I am claiming that Sentiment Analysis needs Intention Analysis.

Yes, the results of sentiment analysis will be inaccurate unless you know that the intent of the speaker is to express an opinion.

Background

When sentiment analysis was initially proposed by researchers, they applied it to the analysis of product reviews.

The intention of a reviewer is obvious. Reviewers have only one intention: the intention to opine (either to praise or to criticize).

However, with the growth of social media, especially Twitter, the same sentiment analysis methods began to be applied to the analysis of twitter streams and other social media streams.

Now that’s where there is a problem.

Not every message on Twitter that mentions a particular product or brand intends to express an opinion about the brand!

Below are a few illustrative examples.

Example 1: “Is the Canon EOS 5 a good camera?”

This sentence is not an expression of positive opinion, but an inquiry about the Canon EOS 5.

In other words, the intent of the speaker is not to express an opinion, but to inquire.

Example 2: “I am looking to buy me a good Canon camera”

Here, the intention of the user is to purchase a product (people only indicate a preference for good things … no one really looks to buy a bad camera).

However, most sentiment analysis tools will identify this sentence as an expression of positive sentiment.

Example 3: “Take me to a good movie.”

Here, the speaker’s intent is to direct someone to do something.

A directive is not an assertion, and so does not always imply an intention to opine.

Example 4: “My good old Porsche for sale (cheap)”

Here, the speaker’s intent is to talk up something they’re selling.

The intent here is not to express sentiment about the brand.

Conclusion

So, what we can learn from the above examples is that sentiment analysis is not meant to be applied without reservations to Social Media Analysis.

In other words, for sentiment analysis to be accurate when applied to social media, it needs to be supported by intention analysis.

Demonstration

We recently released a sentiment analysis API that has the ability to filter out many kinds of intention including the ones listed above. We’d love to get your thoughts on our work. The demo is available at the following URL:

Demonstration of VakSent (a Sentiment Analysis API from Aiaioo Labs)

Do write me at cohan@aiaioo.com with intent to opine!