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

In the Futuristic with AI and Tech blog, Nidhika Yadav covers topics of and related to Future of World with Artificial Intelligence. She primarily talks about AI applications for good. She also talks about how AI can become harmful. She manages two independent blogs here, and one is hobby blog you can subscribe one or all of them. 1. Blog on Artificial Intelligence and future. https://nidhikayadav.org 2. In Blog on Global Issues and future, she covers important international issues and their future implications. https://nidhikayadav.com/ 3. Blog on cooking. This is a hobby blog. Here she describes some delicious innovations and nutritious food. https://nidhikasrecipes.com/ Do subscribe to one or all of them.

Leave a comment