Add this 3 steps to my Ipython code (CODE WILL BE PROVIDE):
1/ Handle negation :
Sentiment analyses note :
create separate tweet-specific sentiment lexicons for terms in affirmative contexts and in negated contexts :
• automatically determine the average sentiment of a term when occurring in an affirmative context,
• and separately the average sentiment of a term when occurring in a negated context.
2/ Lexicon features :
These features are generated by using three manually constructed sentiment lexicons and two automatically constructed lexicons.
The manually constructed lexicons :
o the NRC Emotion Lexicon
o the MPQA Lexicon
o the Bing Liu Lexicon
The two automatically constructed lexicons :
o the Hashtag Sentiment Lexicon
o the Sentiment140 Lexicon
3/ Text span
With lexicons available, the following features were extracted for a text
span. Here a text span can be a target term, its context, or an entire tweet, depending on the task.
The lexicon features include:
(1) the number of sentiment tokens in a text span; sentiment tokens are word tokens whose sentiment scores are not zero in a lexicon;
(2) the total sentiment score of the text span: SenScore (w);
(3) the maximal score : maxSenScore(w);
(4) the total positive and negative sentiment scores of the text span; (5) the sentiment score of the last token in the text span.
Note that all these features are generated, when applicable, by using each of the sentiment lexicons mentioned above.