A longitudinal study about gradual changes in the I ranian Online Public Sphere pre and post of ‘Mahsa Moment’: Focusing on T witter (2023)

Abstract: Mahsa Amini’s death shocked Iranian society. The effects of this event and the subsequent tragedies in Iran not only in realspace but also in cyberspace, including Twitter, were tremendous and unimaginable. We explore how Twitter has changed after Mahsa Amini’s death by analyzing the sentiments of Iranian users in the 90 days after this event. Additionally, we track the change in word meaning and each word’s neighboring words. Finally, we use word clustering methods for topic modeling.

## introduction clashes broke out throughout iran after mahsa amini, a 22-year-old kurdish iranian woman, died on 16 september 2022 after being detained by "morality police" and taken to a "re-education center" allegedly for not abiding by the country's conservative dress code. although iranian officials have said that mahsa amini died of a heart attack, according to a united nations report, amini collapsed at a detention center in tehran on 13 september 2022, in the custody of iran's morality police and then died three days later after being transferred to a hospital. the report said amini was "severely beaten" by iranian authorities during her detention. (un, 2022) during a crisis, people and the media take over the flow of information, process it, and react to it. the effects of this situation may harm the mental health of the affected population. mahsa amini's death caused widespread reactions on several social networks among iranian and non-iranian users; for example, although twitter is banned in iran and people are having trouble accessing it, mah-saamini and its persian-translated hashtag became one of the most repeated hashtags on twitter and broke a historical record. @xcite the content effects of this tragic incident on twitter, especially among iranian users during the 90-day period following mahsa amini's death, were analyzed. twitter data, including tweets with the hashtag "#mahsa_amini" and relevant hashtags, were collected from september 21, 2022, through december 19, 2022. the dataset comprises a total of 1,944,056 tweets in various languages, primarily persian and english. after preprocessing the tweets, the persian dataset was utilized to assess the sentiment of iranian users and illustrate how events during this period, such as the onset of executions, impacted the emotions of iranian twitter users. subsequently, word embeddings were examined to assess the extent to which the meaning of persian words in tweet content evolved due to the societal changes triggered by mahsa amini's death. cosine similarity was computed between the embedding vector of each word using the original bert @xcite model and a fine-tuned bert model for this purpose. moreover, an analysis of neighboring words for each word before and after mahsa amini's death was conducted. the findings concerning the key protest slogan in iran, "woman, life, freedom," revealed significant changes in the neighboring words of "woman" and "life" on twitter following mahsa amini's death. however, this incident did not lead to notable alterations in the neighboring words of "freedom." the paper's final section employed topic modeling as an unsupervised machinelearning technique to automatically cluster words within the english and persian tweet datasets obtained from twitter. ## related works previously, researchers have computationally investigated diachronic language change in various ways. @xcite use a variation of latent semantic analysis to identify semantic change of specific words from early to modern english. mihalcea and nastase (2012) take a supervised learning approach and predict the time period to which a word belongs given its surrounding context. kim et al. language number of tweets persian 1,445,537 english 317,046 arabic 54,106 urdo 28,880 german 13,919 ## data we use the "snscrape" python library to crawl twitter data tweets "mahsa_amini" and relevant hashtags from 2022-9-21 through 2022-12-19 . our dataset contains about 2 million tweets in different languages. to pre-process the tweets, we removed usernames, hashtags, and urls. according to this pre-processed dataset and the results obtained from the "langdetect" python library, the number of tweets of the five most frequent languages in the dataset is illustrated in ## sentiment analysis for this aim, we use "persiannlp/mt5-smallparsinlu-sentiment-analysis" transformer-based model (daniel khashabi, 2020) to predict the sentiment of sentences in persian tweets; the chart of the results is shown in figure 1 . the events that have happened have led to the growth of negative feelings among iranian twitter users. for example, as can be seen in the chart, negative sentiments among iranian users increased significantly from december 5 until december 10. calls for strikes and protests on december 5, 6, and 7, as well as the media coverage of the execution of "mohsen shekari", who was the first known executed person over anti-government protests, on december 8, in the above chart, red, orange, gray, pale green, and deep green, respectively, represent "very negative sentiment", "negative sentiment", " no sentiment expressed", "positive sentiment" and "very positive sentiment". ## word embedding analysis in this section, the analysis of word embeddings after and before mahsa amini's death is undertaken. first, we calculate the embedding of the persian tweets using the "hooshvarelab/bert-base-parsbert-uncased" (mehrdad farahani, 2020) transformer-based model, we use bert because it offers contextualized embeddings, enabling us to analyze how various word senses change in meaning across different contexts. bert model calculate the context-aware embedding, so each word can have multiple embeddings depending on the context of the text. we calculate the average of all these word embeddings to get each word's unique embedding. ## topic modeling for topic modeling, we used the lda @xcite technique for english tweets and hdbscan @xcite for persian tweets; the reason for this is the better performance of the lda method on english tweets and the hdbscan method on persian tweets. we remove the numbers, double spacing, and stopwords to clean the tweet dataset using the nltk library. after that, we convert the text tweets into vectors. we also filtered any words that appeared in more than 90% tweets or less than 25 tweets. for the number of clusters, we ran the model for @xmath0,7,10 clusters for english tweets and @xmath1, 6,9 clusters for persian tweets, and the results showed better performance on @xmath2, which are illustrated in for english tweets, the first topic related to the news about what has passed during this period, which is why the words republic and islam (which represent the islamic republic) are at the top of this topic. "massacre," "rape," "torture" and "shoot" are also among the frequent words of this cluster. the second topic expresses gratitude for the support of the international community; as seen in in the results obtained in persian tweets, the first topic contains tweets with the main slogans of the protesters, such as "woman, life, freedom" the second topic has hopeful content for the future, "hope", "victory" and "free" are among the most frequent words in this topic. the third topic included tweets directly related to mahsa amini's death and the last topic deals with persian twitter users' protests regarding iran's current situation. ## conclusion and feuture work so far, we have focused on textual analysis of iranian twitter accounts before and after 'mahsa moment'. we will complete these analyses in the future. in addition, another longitudinal study -as a complementary method -has been left for the future due to a lack of time. after completing and updating our databases about different characteristics of iranian 'users' and 'influencers' on twitter, we will test the significance of changes on both sides of 'mahsa moment'. the variables that we are gathering are as follows: location, gender, political tendency, number of followers and join date. in the next step, we will analyze the relationship network between the influencers. for this purpose, by using gephi @xcite , the relationships graph will be visualized, and the main communities within the iranian space of twitter will be detected according to the louvain @xcite method. we also intend to calculate a topic prevalence chart, similar to the one presented in the study by @xcite , and analyze its findings. we will employ delong et al. ( 2023 ) method instead of cosine similarity because this paper serves as a more accurate predictor than cosine similarity based on embeddings when using bert in a sense-disambiguation related task. we also aim to conduct our analysis on the entire dataset of 2 million entries to ensure more accurate results.