Taking into account opinions and statements about the most recent conflict in Gaza Strip published on Twitter X, along with the advances in the development of deep learning models capable of performing textual categorization, this work developed a series of experiments that we to evaluate the performance of these approaches in the task of evaluating support bias (pro-Israel and pro-Palestine) in tweets published in X about the war between Israel and Hamas.
To carry out the training and evaluation of the sentiment analysis models, 220 tweets were collected on X published from October 7, 2023, whose content discusses the war between Israel and Hamas. These tweets were labeled according to their support bias into pro-Israel and pro-Palestine. For ethical reasons, texts mentioning support for Hamas' terrorist actions were not added to the dataset.
Messages in support of Israel in the conflict were mostly collected from:
- State of Israel's official Twitter account
- Official twitter channel of Israel's Ministry of Foreign Affairs
- Official Twitter account of the Office of the Prime Minister of Israel
- Official Israel Defense Forces Twitter account
- The official Twitter account of the Embassy of Israel to the United States
Messages in support of Palestine in the conflict were mostly collected from:
- Antรณnio Guterres, secretary-general of the UN, official Twitter account
- Muhammad Smiry, a palestinian who tweets from Gaza during the war, twitter account
- Shahd Abusalama, a palestinian activist, twitter account
- Zachary Foster, a palestinian historian and journalist, twitter account
- Mondoweiss, an independent news portal for people taking action for Palestine
After collecting and labeling the tweets, the dataset was then divided between the training set and the test set in a proportion of 90% and 10% respectively.
Due to pricing changes in X's API the data was collected manually, so to increase the dataset size nplpaug
was used - specifically the ContextualWordEmbsAug
augmenter with BERT.
Both original and augmented dataset are available in the data
directory.
This project essentially uses Tensorflow
. So if you want to run it locally, an environment with python's data science base packages (numpy
, pandas
, scikit-learn
and matplotlib
) and Tensorflow should be enough. Unless you're also trying to run the data augmentation then you should follow nlpaug
installation instructions (that would require PyTorch and transformers
and to locally download BERT).