TD_SentimentExtractor uses a dictionary model to extract the sentiment (positive, negative, or neutral) of each input document or sentence.
The dictionary model consists of WordNet, a lexical database of the English language, and these negation words such as no, not, neither, never, and so on.
The function handles negated sentiments as follows:
- -1 if the sentiment is negated. For example, I am not happy.
- -1 if one word separates the sentiment and a negation word. For example, I am not very happy.
- +1 if two or more words separate the sentiment and a negation word. For example, I am not saying I am happy.