Algorithm 1. Algorithm of sentiment orientation analysis based on sentiment dictionary |
1. |
// Calculation of sentiment value |
2. |
if in sentiment_dict |
3. |
then
|
4. |
if in privative_words |
5. |
then
|
6. |
// the sentiment tendency of each sentence scores |
7. |
// total score of sentiment tendency of single comment text on Weibo |
8. |
// Analysis of sentiment tendency. The rules of classification are as follows. |
9. |
if E > 0 |
10. |
then E is positive |
11. |
else if E = 0 |
12. |
then E is neutral |
13. |
else E is negative |