# Appendix A3: Twitter Data Analyses

We collect tweets in Arabic from 2009 to mid-2020. However, our dataset starts from 2011 due to data availability issues for the 2009-2010 period. To filter data related to reforms from Twitter, we use four keywords in Arabic, as presented below. These four keywords refer to the word ‘reform’ in Arabic in its singular and plural forms as well as with and without an article.<sup>14</sup>

|**اصلحات**|**لصلحات**|**لصلح**|**اصلح**|
|---|---|---|---|

Using these four keywords as a filter, we collect more than **16 million tweets in Arabic** over the 20112020 period.

**Overcoming lexical issues: Multiple meanings to the word ‘reform’ in Arabic:** The first hurdle was not directly related to the data but rather to the multiple meanings of the word ‘reform’ in Arabic. We found out that information collected from Twitter using the term ‘ _reform’_ in Arabic is not necessarily related to social and economic reforms, as the term ‘ _reform’_ in Arabic has many different meanings such as ‘repair’, ‘rehabilitation’, ‘correction’, or ‘reconciliation’. Consequently, the Arabic term for ‘ _reform’_ can also talk about religious topics related to reconciliation. The word ‘ _reform’_ is also the name of many political parties in the region. For instance, we found information referring to the Yemeni war using this filter since ‘reform’ is the name used to call the Yemeni political party ‘Yemeni Congregation for Reform’, ‘ ’التجمع ال�مي ي لإلصالحin Arabic. Consequently, these tweets are excluded. To select the meaning of ‘ _reform’_ we are interested in, we relied on specific topical keywords (see Appendix A5) to keep the relevant tweets and delete the others. After applying this filter, we are left with about 2 million tweets in Arabic about economic reforms.

**Breaking down the data set by country:** To break down the collection of tweets into six data sets (one per country), we link a tweet to a country by detecting keywords such as the country's name (both in Arabic and English) and the name of its capital city. If a tweet contains two GCC countries, it is included in both countries’ data sets. As there are many tweets in which we could not detect the country of origin using these keywords, we leverage the user’s location. Our assumption is when a user declares a country when the user first registers, the user will probably tweet about this country. Nevertheless, to avoid the situation in which a user located in “Country A” is talking about another “Country B” – be it in the GCC or not - we dropped all tweets made by a user containing the name of a country other than its declared location. For example, suppose a user is located in Saudi Arabia in our user’s database. In that case, the tweet will be used if it mentions no other countries and will be deleted if “Egypt” or “United States” appears in the post since the user may be talking about reforms in these countries rather than in Saudi Arabia. To detect the presence of other countries in tweets, we used Name Entity Recognition (NER), a technique that identifies specific entities in the text of each tweet (e.g., person, organization, location, etc.). By adding this technique, we increased our database of tweets from around 420,000 to 635,000 (see Figure III.1).

**Cleaning vocalization marks:** In the Arabic alphabet, each letter can have a vocalization mark. A vocalization mark is an optional symbol giving a hint to the reader on the pronunciation of a letter. However, in our analyses, the same word was considered as two different words depending on if it has

> 14 Note that using these four keywords, we include tweets containing these words written with vocalization marks or any other characters above or below a letter.

32