Assigning a polarity or a strength to subjective expressions

419 views
Skip to first unread message

SANKAR N

unread,
May 23, 2013, 7:08:09 PM5/23/13
to pattern-f...@googlegroups.com
Hi,

I am looking at an  approach to assigning
a polarity or a strength to subjective expressions to determine the positive/negative/neutral
polarity of an opinion sentence within a document for instance adjectives such as “excessively affluent” in a
opinion carrying sentences. 

I am looking at using Synset sentiment. 

Is there any other method from Pattern that I can use for this sort of thing?

Thanks

Sankar

Tom De Smedt

unread,
May 26, 2013, 6:35:50 PM5/26/13
to pattern-f...@googlegroups.com
Pattern currently has sentiment analysis for English, Dutch and French, with about 75% accuracy:

from pattern.en import sentiment
polarity, subjectivity = sentiment("excessively affluent")
print polarity
print subjectivity

Polarity is a positive/negative score, subjectivity is a neutral/subjective score. Some expressions can be subjective without necessarily being positive or negative.

For English, you can also use SentiWordnet with Pattern. You can request the lexicon (for research purposes) from:
http://sentiwordnet.isti.cnr.it/

And place it in pattern/text/en/wordnet
Then:

from pattern.en import wordnet
print wordnet.sentiwordnet("excessively")
print wordnet.sentiwordnet("affluent")

Some more documentation is here:
http://www.clips.ua.ac.be/pages/pattern-en#wordnet

The differences are that
1) SentiWordnet has a score for all words while the lexicons in Pattern are optimized for the most frequent adjectives,
2) the lexicons in Pattern deal with successive words, e.g., in "excessively affluent", "excessively" boosts or dampens the score of "affluent", instead of having a score itself.

Depending on what you want to do it can be more interesting to have a score for all kinds of words (= SWN), or just adjectives that occur frequently in product reviews (= Pattern lexicons).

Grz,
Tom

noor-ul-huda shaikh

unread,
Sep 16, 2014, 7:26:20 AM9/16/14
to pattern-f...@googlegroups.com
hi i am working on sentiment analysis of tweets can any one tell me how we can create program that assign polarity (positive,negative,neutral) to words or phrases using python
Reply all
Reply to author
Forward
0 new messages