#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!