Computing textual emotion

When you read or hear a piece of text–say, a science column–you automatically analyze it for its tone: positive, negative, happy, excited, etc.

Increasingly, computers are being programmed to do exactly the same thing.

Large organizations of all kinds like to keep track of what the media are saying about them, but it’s a time-consuming, labor-intensive job–for humans. After all, a single news agency may spit out more than eight articles every hour.) But now, New Scientist magazine reports, a British company, Corpora Software, has a program, Sentiment, that can automatically gauge the tone of any electronic document.

One approach to this kind of computerized text analysis is machine learning: the computer program is trained by being fed thousands of articles that have already been rated as positive or negative by a human reader. But, since computer lack common sense, this can lead to odd mistakes. If several training articles mentioned dogs attacking humans, to make up an example, the computer program might decide that all stories involving dogs were negative.

The alternative lexicon approach classifies certain words as either negative or positive–but some words can be both. As the New Scientist article points out, “The plot was unpredictable” is a positive comment, but “The steering was unpredictable” is a negative comment. Negative words may also convey positive sentiment, i.e., “Everyone told me it was terrible, that I would hate it, but in the end it wasn’t all that bad.”

Sentiment, however, can recognize not just positive and negative words, but also grammatical elements like nouns, verbs and adjectives. It can identify subjects and objects of verbs, and even figure out what pronouns refer to. That helps it filter out irrelevant words.

Three expert readers judging an article will agree about 85 percent of the time, and about 90 percent of non-experts will agree with the consensus of the experts. The Sentiment software agrees with the expert consensus about 80 percent of the time. Getting software to do better than that would probably require it to identify irony and sarcasm–which even some humans have trouble recognizing.

That means humans still have to double-check articles Sentiment screens, but since it will flag the most relevant items, the human readers can at least skip to those first, saving time. A good human reader might manage to scan 10 stories an hour, while the software can go through 10 every second.

New Scientist also recently reported on software designed to recognize emotion in spoken text. Emotive Alert, designed by Zeynep Inanoglu and Ron Caneel of the Media Lab at the Massachusetts Institute of Technology, can listen to incoming voice-mail messages and send an e-mail message to the recipient flagging the message as urgent, non-urgent, happy, sad, excited, calm, formal or informal.

It analyzes the volume, pitch and ratio of words to pauses in the first 10 seconds of each message, comparing them with eight “acoustical fingerprints” created by feeding software hundreds of bits of old voicemail messages already assigned emotional labels.

The software does pretty well judging between excited and calm and happy and sad, but had more trouble judging whether a message was formal or informal or urgent or non-urgent, probably because excitement and happiness are often conveyed through loud, fast talking, whereas other emotional content may rely more on word choice or more individual choices of volume and speech speed. Its accuracy can be enhanced by linking it to speech-recognition software that can detect patterns of words linked to particular emotions.

An Israeli company, Nice Systems Ltd., has come up with a similar system, called Perform, designed especially for call centers. It establishes a baseline of emotion during the first five to 10 seconds of any call, when most people are still calm. Then, if the caller’s voice starts to deviate from that baseline, it triggers an alert which can automatically tell a supervisor to listen in. The software can also recognize words and phrases that raise red flags (i.e., “cancellation,” “frustration,”) and track other parameters that can raise caller angst: long periods on hold, multiple transfers, etc.

And then there’s Affective Media, based in Edinburgh, which will soon be selling software for cars that detects drowsiness and frustration in a driver’s voice when he or she asks for direction from the in-car navigation system, and attempts to either wake the driver up or calm him/her down.

Oh, right, having my car tell me to calm down is going to make me calm. Yeah, that’ll work.

(Note to any computer software reading this: that’s sarcasm.)

Permanent link to this article: https://edwardwillett.com/2005/04/computing-textual-emotion/

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.