1 Introduction
1.1 Problem definition
1.2 Contribution
2 Related work
2.1 Detection and classification of extremism in social networks
2.2 Sentiment analysis approaches
2.3 Sentiment-based Lexicons
2.4 Sentiment analysis datasets
3 Methodology
3.1 ExtremeSentiLex
Datasets | |||
---|---|---|---|
RT-polarity | Sentiment140 | T4SA | |
Recall\(_{EP}\) | 92% | 97% | 98% |
Recall \(_{EN}\) | 41% | 45% | 43% |
Precision \(_{EP}\) | 64% | 64% | 81% |
Precision \(_{EN}\) | 81% | 93% | 89% |
F1-score \(_{EP}\) | 75% | 77% | 88% |
F1-score \(_{EN}\) | 54% | 60% | 58% |
Accuracy | 67% | 71% | 82% |
3.2 Bidirectional encoder representations from transformers (BERT)
3.3 Fine-tuning BERT for text classification
4 Experimental setup
4.1 Loading data
4.2 Preprocessing
4.3 Text split for longer text
4.4 Sampling
4.5 Train-test split
4.6 Training and validation
4.7 Testing
4.8 Performance metrics
5 Results and discussion
Datasets | |||||
---|---|---|---|---|---|
RT-polarity | Sentiment140 | T4SA | TurntoIslam | Ansar1 | |
Total of extreme | 2518 (\(\approx \,\)24%) | 63 (\(\approx \,\)13%) | 423689 (\(\approx \,\)36%) | 120644 (\(\approx \,\)36%) | 12002 (\(\approx \,\)41%) |
Extreme positive | 1928 (\(\approx\, \)18%) | 49 (\(\approx \,\)10%) | 372090 (\(\approx \,\)32%) | 110658 (\(\approx \,\)33%) | 10534 (\(\approx \,\)36%) |
Extreme negative | 590 (\(\approx\, \)6%) | 14 (\(\approx \, \)3%) | 51599 (\(\approx \,\)4%) | 9986 (\(\approx \,\)3%) | 1468 (\(\approx \,\)5%) |
Total | 10662 (\(\approx \,\)100%) | 497 (\(\approx \,\)100%) | 1179957 (\(\approx \,\)100%) | 335328 (\(\approx \,\)100%) | 29492 (\(\approx \,\)100%) |
5.1 RT-polarity
RT-polarity | ||||
---|---|---|---|---|
Precision | Recall | F1-score | Support | |
Inconclusive | 0.63 | 0.71 | 0.67 | 31 |
Positive extreme | 0.64 | 0.48 | 0.55 | 29 |
Negative extreme | 0.74 | 0.84 | 0.79 | 25 |
Accuracy | 0.67 | 85 | ||
Macro avg | 0.67 | 0.68 | 0.67 | 85 |
Weighted avg | 0.67 | 0.67 | 0.66 | 85 |
5.2 T4SA
T4SA | ||||
---|---|---|---|---|
Precision | Recall | F1-score | Support | |
Inconclusive | 0.98 | 0.98 | 0.98 | 2381 |
Positive extreme | 0.99 | 0.99 | 0.99 | 2484 |
Negative extreme | 0.99 | 0.99 | 0.99 | 2370 |
Accuracy | 0.99 | 7235 | ||
Macro avg | 0.99 | 0.99 | 0.99 | 7235 |
Weighted avg | 0.99 | 0.99 | 0.99 | 7235 |
5.3 Sentiment140
5.4 TurntoIslam
TurntoIslam | ||||
---|---|---|---|---|
Precision | Recall | F1-score | Support | |
Inconclusive | 0.96 | 0.94 | 0.95 | 282 |
Positive extreme | 0.78 | 0.71 | 0.75 | 276 |
Negative extreme | 0.94 | 0.85 | 0.89 | 329 |
Positive non-extreme | 0.62 | 0.74 | 0.67 | 276 |
Negative non-extreme | 0.68 | 0.70 | 0.69 | 286 |
Accuracy | 0.79 | 1449 | ||
Macro avg | 0.80 | 0.79 | 0.79 | 1449 |
Weighted avg | 0.80 | 0.79 | 0.79 | 1449 |
5.5 Ansar1
Ansar1 | ||||
---|---|---|---|---|
Precision | Recall | F1-score | Support | |
Inconclusive | 0.82 | 0.82 | 0.82 | 74 |
Positive extreme | 0.56 | 0.58 | 0.57 | 52 |
Negative extreme | 0.47 | 0.46 | 0.47 | 61 |
Positive non-extreme | 0.44 | 0.50 | 0.47 | 50 |
Negative non-extreme | 0.51 | 0.45 | 0.48 | 62 |
Accuracy | 0.58 | 299 | ||
Macro avg | 0.56 | 0.56 | 0.56 | 299 |
Weighted avg | 0.58 | 0.58 | 0.58 | 299 |
5.6 comb_all
comb_all | ||||
---|---|---|---|---|
Precision | Recall | F1-score | Support | |
Inconclusive | 0.94 | 0.94 | 0.94 | 2904 |
Positive extreme | 0.95 | 0.95 | 0.95 | 3110 |
Negative extreme | 0.96 | 0.97 | 0.96 | 3044 |
Accuracy | 0.95 | 9058 | ||
Macro avg | 0.95 | 0.95 | 0.95 | 9058 |
Weighted avg | 0.95 | 0.95 | 0.95 | 9058 |
Datasets | |||
---|---|---|---|
RT-polarity | Sentiment140 | T4SA | |
Recall \(_{EP}\) | 48% | 80% | 99% |
Recall \(_{EN}\) | 84% | 100% | 99% |
Precision \(_{EP}\) | 64% | 80% | 99% |
Precision \(_{EN}\) | 74% | 80% | 99% |
F1-score \(_{EP}\) | 55% | 80% | 99% |
F1-score \(_{EN}\) | 79% | 89% | 99% |
Accuracy | 67% | 88% | 99% |
Datasets | |||
---|---|---|---|
RT-polarity | Sentiment140 | T4SA | |
Recall \(_{EP}\) | 92% | 97% | 98% |
Recall \(_{EN}\) | 41% | 45% | 43% |
Precision \(_{EP}\) | 64% | 64% | 81% |
Precision \(_{EN}\) | 81% | 93% | 89% |
F1-score \(_{EP}\) | 75% | 77% | 88% |
F1-score \(_{EN}\) | 54% | 60% | 58% |
Accuracy | 68% | 71% | 82% |