Sentiment Analysis with SentiWordNet- Part II

#AI, #ArtificialIntelligence #NLP

This article is an application of sentiwordnet lexical database. In last article I provided with the code to access the sentiment, here are some more details on sentiwordnet with examples.

Sentiwordnet is a nice database for looking up to sentiment of a word given its POS tag. So you can look up to sentiment of a word with its POS tags, or you can also look up for sentiment of a word in a sentence. The lookup of a word in this database yields 3 values, positive sentiment score, negative sentiment score and neutrality score. Moreover, all this is stored in a simple text file that can be parsed as well. However, this python package allows for lookup with quick API, given you provide them with POS tag. This POS tag can be extracted from tagging the text with a tagger.

Let us see some examples of sentiwordnet outputs before analyzing the files with sentimentanalysis with sentiwordnet

Example 1: Sentiment of beautiful. There are two entries in the sentiwordnet database for word beautiful. Here are both the entries extracted. See below the scores of PosScore means positive score and NegScore means the negative scores.

Example 2. Here is the word try

Example 3. Word bass

Example 4. Word frequency with no positive sentiment and no negative sentiment

Example 5. Word good

Thank You!

Published by Nidhika

Hi, Apart from profession, I have inherent interest in writing especially about Global Issues of Concern, fiction blogs, poems, stories, doing painting, cooking, photography, music to mention a few! And most important on this website you can find my suggestions to latest problems, views and ideas, my poems, stories, novels, some comments, proposals, blogs, personal experiences and occasionally very short glimpses of my research work as well.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: