Sentiment Analysis of Arabic Slang Comments on Facebook

Social networks have become one of our daily life activities not only in socializing but in e-commerce, e-learning, and politics. However, they have more effect on the youth generation all over the world, specifically in the Middle East. Arabic slang language is widely used on social networks more than classical Arabic since most of the users of social networks are young-mid age. However, Arabic slang language suffers from the new expressive (opinion) words and idioms as well as the unstructured format. Mining Arabic slang language requires efficient techniques to extract youth opinions on various issues, such as news websites. In this paper, we constructed a Slang Sentimental Words and Idioms Lexicon (SSWIL) of opinion words is built. In addition, we propose a Gaussian kernel SVM classifier for Arabic slang language to classify Arabic news’ comments on Facebook. To test the performance of the proposed classifier, several Facebook news’ comments are used, where 86.86% accuracy rate is obtained with precision 88.63 and recall 78 .


INTRODUCTION
The revolution of current social networks is affecting our every daily lives, having a vast amount of information through microblogs, review sites, web forums and online discussions. Sentiment analysis of social networks has recently attracted researchers because of its effect on people's behavior whether politically or on any other discipline. In addition, users are free to write whatever they want unlike previous sentiment analysis which targeted product reviews.
Opinion Mining (OM) includes several subtasks, such as subjectivity detection, polarity classification, review summarization, emotion classification, and sentiment analysis [1]. Opinion mining, which is called sentiment analysis, can be viewed as a classification process that aims to determine whether a certain text is written to express a positive or a negative Opinion about certain object (e.g., a topic, product, or person). Sentiment analysis is typically performed using one of two basic approaches: rule-based classifiers, in which rules derived from linguistic study of a language are applied to sentiment analysis and machine learning classifiers [2]. Currently, most of the systems built for sentiment analysis are tailored for the English language [3] but there has been some work on other languages. Two main characteristics shared between many social networking services are the short length of their update messages and language variations. For example, Facebook has a limit of 420 characters for status updates and Twitter has a 140-character limit. In addition, language variations give a large variety of short forms and irregular words, specifically for youth generations. These two characteristics induce significant data sparseness and thus affect the performance of typical sentiment classifiers learned from such noisy data.
In case of Arabic language, Arabic is divided into three types: Classical Arabic, Modern Arabic, and Colloquial Arabic [4]. As the official language of 22 countries, there are 49 million Arab users of Facebook [5]. Arabic language is a high complex language, which embeds five critical challenges for NLP tasks. First, Arabic is not a case-sensitive language; it has no capital letters. Second, Arabic is a high inflectional language; often a single word has more than one affix, such that it may be expressed as a combination of prefix(s), lemma, and suffix(s) [6]. Third, Arabic has some variants in spelling and typographic forms. Fourth, Arabic texts have different sorts of ambiguities (different meanings). For example, " ‫رجب‬ "/"Ragab" in Arabic may be used as a person name, month, or a fear verb. Fifth, Arabic resources, such as corpora, gazetteers, and NLP tools, are either rare or not free [7].
Existing Facebook sentiment analysis focus on the English language but very few focuses on Arabic slang comments.
Classical Arabic is the language used during the period before and during the Islam era and in which the holy Quran was subsequently written. It contains a rich vocabulary and sophisticated grammar. Modern Arabic is derived from the classical type, where it became the formal language for literature, media, and education. It has less sophisticated grammar. Finally, Colloquial (Slang) Arabic is the language used between people in every day communication, which is the focus of this paper. The young Arab generation use some slang words that they create themselves and communicate with each other even on Facebook and Twitter.
In this paper, a sentiment analysis methodology is proposed to classify Arabic slang comments on Facebook, based on Support Vector Machine (SVM). In addition, a Slang Sentimental Words and Idioms Lexicon (SSWIL) is developed, containing words and idioms used by the Arab youth generations. The paper is organized as follows: Section two clarifies previous work. Section three illustrates the opinion mining methodology for Arabic slang comments on Facebook. Section four discusses the results. Finally, section five concludes our work and introduces future work.

RELATED WORK
Examples of Arabic opinion mining include helmy and Daud [6], where they apply Bayes Point Machine (BPM) and SVM in classification task in trustworthy and untrustworthy classification of Islamic Hadith Narration. In addition, El-Halees [7] combine classification methods to classify Arabic documents because the accuracy of most methods is law. AbdelRahman et al. [8] present a novel solution for Arabic Named Entity Recognition (ANER) problem, which aims at boosting the identification of extracted named entities. Elarnaoty et al. [9] based their feature analysis on a semi-supervised pattern recognition technique to extract opinion holder in Arabic news. Elhawary and Elfeky [10] apply sentiment analysis on Arabic reviews to extract features by using Arabic lexicon words to identify reviews' polarity (positive, negative or neutral). Zaidan and Callison-Burch [11] work on Arabic Commentary Dataset (AOC) to apply dialect labeling task. They partition news' comments into dialectal sentences which is more accurate than Modern Standard Arabic sentences. Saad and Ashour [12] evaluate text preprocessing on Arabic text mining, stemming and pruning, document normalization and term weighting and enhance text representation. They study the impact of text-preprocessing and different term weighting schemes on Arabic text classification. In addition, they apply Boolean model, TF, IDF and TF-IDF for term weighting and apply C4.5 decision tree in classification task. Hijjawi and Bander [13] represent an approach of identification of opinions based on ontological exploration of texts.
We previously introduced this work but only three Facebook pages' comments are taken [14]. Other previous work on Arabic social networks comments are rarely taken on political examples [15,16]. In case of English language, a large amount of work have been conducted on twitter sentiment analysis, such as Barbosa and Feng [17], Speriosu et al. [18], Bifet and Frank [19]. In addition, Tumasjan et al. [20] presented the political sentiment in microblogs, where they analysed 104,003 tweets before German federal election to predict election results. Diakopoulos and Shamma [21] tracked real-time sentiment analysis during US presidential election in 2008. Conover et al. [22] examined the retweet network of 250,000 political tweets during the six weeks prior to the 2010 U.S. midterm elections. Livne et al. [23] studied the use of Twitter by almost 700 political party candidates during the midterm 2010 elections in the U.S. Our research focuses on free text Arabic written by web users who comment on Facebook and Twitter or news websites. Comments on J a n u a r y 2 5 , 2 0 1 4 those networks are written with new sentiment words and idioms. So, they need new lexicon to facilitate feature extraction and sentiment analysis. In the next section, proposed sentiment analysis approach is explained.

PROPOSED SENTIMENT ANALYSIS APPROACH
In this section, the proposed sentiment analysis approach consists of three phases: data preparation (comments collection, XML View), data preprocessing (remove stop words, data auto correction, stemming) and data classification, as illustrated in Fig. 1. In last phase, the system classifies the data in three types: classifying comments based on classical opinion words lexicon, classifying comments based on classic lexicon and SSWIL and classifying using SSWIL only.

NEW TOOLS EXILES ANALYSIS
Tools exiles in formal Arabic language are " ‫ال‬ , ", which are "la, ln, lm, ma, lays, laysat" mean "No, Not" and negative suffixes and prefixes, which are exiles in English. In slang Arabic language, there is an exile tool " ‫ش‬ , ‫شً‬ " added as a suffix of the Arabic verbs like " ‫ٌحكم‬ " which is "Govern" to get the opposite meaning, which is ‫"ٌحكمش"‬ or ‫,"ٌحكمشً"‬ where it is " ‫ٌحكم‬ ‫"ال‬ in formal Arabic language that means "Not Govern" in English. Sometimes, Egyptians use this exile tool another way, they add character ‫"م"‬ at the beginning of the verb (replace the formal exile tool ‫)"ما"‬ then they add the previous suffix, the previous example will be ‫"مٌحكمش"‬ or ‫"مٌحكمشً"‬ that give the same meaning. To clarify the previous exile tool, for example ‫مصر"‬ ‫"مٌحكمش‬ means "not govern Egypt" since the word ‫"مٌحكمش"‬ contains prefix ‫"م"‬ and suffix ‫."ش"‬ Another exile tool is a suffix ‫"مش"‬ which means ‫"ال"‬ as formal Arabic exile tool and mean "No" in English.

PROPOSED SLANG SENTIMENTAL WORDS AND IDIOMS LEXICON (SSWIL)
Annotated corpora for training and testing are very important to make sentiment analysis possible. A number of research groups have developed Arabic sentiment analysis corpora [1,24,25]. Furthermore, Abdul-Mageed and Diab [26] use a machine translation procedure to translate available English lexicons into Arabic, retrieving 229,452 entries, including expressions commonly used in social media. In addition, Rushdi-Saleh et al. [27] have developed Opinion Corpus for Arabic (OCA), including a parallel English version called EVOCA. Comments perform a binary classification problem, having people "satisfied" and "dissatisfied" with particular news. After surveying comments of 1846 comments of famous Arabic Facebook pages, as shown in Table 1, new 43 words and new 27 idioms are collected, having a "Satisfied" class, and about new 91 words and new 31 idioms means, having "dissatisfied" which do not exist in Arabic lexicon. This way of writing has new opinion words that describe the satisfaction or dissatisfaction of comments like " ‫حلو‬ , ‫كوٌس‬ , ‫تظبٌط‬ , ‫جامد‬ " , which are "Helw, kowyes, tazbeet, gamed" which means "Satisfy". " ‫وحش‬ , ‫فاكس‬ , ‫تعبان‬ , ‫زفت‬ " which are "wehesh, fakes, ta'ban, zeft" which means "Dissatisfy" are also added, as shown in Table 2. There are also new idioms in this way of writing that describe the satisfaction or dissatisfaction of comments like " ‫طحن‬ ‫روش‬ , ‫الفل‬ ‫زي‬ " which are "Rewesh tahn, zay elfol" which means "Satisfy" and " ‫فالحلل‬ ‫ٌخبط‬ , ‫فالجبل‬ ‫هبل‬ " which are "yehkabat felhelal, habal felgabal", which mean "Dissatisfy". J a n u a r y 2 5 , 2 0 1 4

DATA PREPARATION
The objective of this phase is to collect Arabic slang comments from different sites. In addition, since thse comments these comments are into XML format.

1) Comments collection:
To collect comments, the dataset is collected from news websites like: Aljazera 1 , bbcarabic 2 , Alyoum Alsabe 3 and Alarabia 4 , Constitution Facebook Page, People's Opinion Facebook page, where these portals are very popular in the Arabic countries. We collected 1846 comments from previous websites, where the number of comments taken from each website is shown in Table 3. People's Opinion Facebook page 294

Fig.1 Proposed system phases
The comments are written in Arabic language with free text format. Different point of views about the news from the Middle East is written, showing satisfaction or dissatisfaction. Taking Egyptian presidential elections as an example, the percent of satisfaction and dissatisfaction on Egyptian presidential election in 2012 are taken. Taking the comments of J a n u a r y 2 5 , 2 0 1 4 same news from various news websites. The comments are written freely, without grammar rules, unstructured and with slang language that have non lexicon words and idioms. Example is: This example indicates that there are new idioms not included in Arabic lexicon, such as ‫علٌك"‬ ‫"حرام‬ which shows that the commenter is not satisfied with what is happening. The comments are written in many forms.


Direct Comments: are comments that are related with the topic and it is useful in our study, where they are written directly with expressive words. ‫بور‬ ‫ص‬ ‫م‬ ‫صرىال‬ ‫عب‬ ‫ش‬ ‫ال‬ ‫كن‬ ‫ل‬ ... ((( ‫حدود‬ ‫بر‬ ‫ص‬ ‫ل‬ ‫ل‬

Patience has limiations but Egyptians have patience
 Direct Modern Comments: Some commenter may use non lexicon idioms and words to create their comments; they write comments in slang Arabic language so the sentiment of the sentence will be understand by human analysis. For instance, instead of comment an item, the user may replay to another commenter, another comments may written sentimentally and subjectively in Arabic but with English characters, for instance the following comment: "da ragel koyes ya gedaan w nsebo yakhod forsetoh" which means "This is a good man give him a chance". Comments are written sentimentally and subjectively in Arabic but with English characters and numbers, which is called Franco-Arab Language. Many Egyptians' web users use numbers instead of Arabic characters like "3" to replace ‫"ع"‬ and "7" instead of ‫."ح"‬ For instance, comment may be like this: "mosh hayenfa3 yo7ko" which means "cannot govern".
The system focuses on the comments written in Arabic language and ignores comments written in Franco-Arab language.


Indirect Comments: Many comments in different web pages are not related to the topic. People attempt to comment on anything, even with unrelated words or nonsense. For example, Which means "this is the same episode which happened with Eng. Essam Sharaf " 2) XML View: Comments are collected manually from different news websites, which are opinions of a specific topic (in this case: Egyptian presidential election in 2012). The system extracts the comments from the web pages and organizes the data in XML view to facilitate the manual analysis and system process. The system builds an XML, as shown in Fig. 2, schema for the data.

REMOVE STOP WORDS:
A list of Arabic stop words is used to remove unwanted words to facilitate the data processing, where 613 words are used for removing unneeded words ( ). Removing unwanted words is a basic operation when mining unstructured data. For example, after removing stop words, the comment " ‫مصر‬ ‫خدمة‬ ‫على‬ ‫مرسً‬ ‫محمد‬ ‫ٌا‬ ‫ٌقدرك‬ ‫ربنا‬ ‫مبرووووك‬ ‫"والف‬ will be " ‫مبرووووك‬ ‫والف‬ ‫مصر‬ ‫خدمة‬ ‫مرسً‬ ‫محمد‬ ‫ٌقدرك‬ ‫."ربنا‬ J a n u a r y 2 5 , 2 0 1 4

DATA AUTO CORRECTION:
As the web users write comments in free text, ungrammatically and unstructured Arabic language, comments always contains many syntax errors that make the mining process very difficult. As example of errors, web users may repeat a character in a word like ‫"مبرووووووووك"‬ instead of ‫,"مبروك"‬ which means "Congratulation". Our system solves these problems to repack words to its correct syntax. After making data auto correction on the previous example, it will be " ‫مبروك‬ ‫والف‬ ‫مصر‬ ‫خدمة‬ ‫مرسً‬ ‫محمد‬ ‫ٌقدرك‬ ‫."ربنا‬

STEMMING:
Arabic stemmer is used to stem the yield words of each comment to get the words' root. We use stemmer of [28] to stem the words to return its root to extract features and identify satisfaction classification. The system tokenizes the comments into words and stems the words. The stemmer does not stem unknown words which may be new modern words or not stems the words not written well in syntax. After stemming the previous example it will be " ‫رب‬ ‫مبروك‬ ‫والف‬ ‫مصر‬ ‫خدم‬ ‫مرسً‬ ‫محمد‬ ‫."قدر‬

DATA CLASSIFICATION:
Support Vector Machines is a classification technique that has been used in a variety of applications; a detailed explanation of SVM can be found in [33]; in the classification phase, three techniques are performed: classifying comments without applying SSWIL, classifying comments after the creation of SSWIL, and classifying comments using SSWIL only. All three are based on SVM classifier.

Comments classification Using Classical Lexicon without SSWIL:
The system classifies the comments using SVM technique into two classes: satisfaction and dissatisfaction classes. The system uses a list of 613 satisfaction words to classify the comments as a satisfaction comments and a list of 700 dissatisfaction words to classify the comments as dissatisfaction comments. The comments of six news websites, as described previously and in Table 3, are used as a dataset to test the classification method. All the words in the two lists are lexicon words, which are formal Arabic language words without SSWIL. Table 4 illustrates the results of satisfaction, dissatisfaction, and outliers when applying the proposed sentiment analysis approach using classical lexicon. For example, having Youm7 news comments source, number of collected comments are 490 on Egyptian presidential election: 240 of them are satisfied, 81 are dissatisfied, 169 are outliers . Comments' Classification using Classic Lexicon and SSWIL: The number of outliers' comments is more than any of the two target classes as the web users use modern sentimental words, which does not belong to Arabic lexicon. After using the SSWIL as lists of sentimental words with SVM, we get better results than the first classification process, as shown in Table 5. People's Opinion page 294 198 40 56 J a n u a r y 2 5 , 2 0 1 4 Classification Using SSWIL only: Applying SSWIL only in the classification process, it is noticed that the SSWIL affects positively the classification process, as shown in Table 6.

EXPERIMENTAL EVALUATION
Evaluating results, 1355 random comments are taken, applying the three types of classification; as seen in the three types of classification, web users write the comments with a new syntax, which affect the results of classification processes. Extraction techniques fail to extract the opinion words at the first classification type but it performs well at the second classification type after adding the SSWIL. Applying the proposed mining in all comments, the percent of classified comments in the first type (using classic lexicon) produce 75.35%, accuracy rate while the second classification type (using SSWIL with classic lexicon) produce 86.86%, as illustrated in Table 7. In addition, applying the system using SSWIL only, it gives 43.02% as a percent of comments classification and 56.98% not classified. The results are enhanced in the second type after applying SSWIL lists. In addition, in the first case, precision and recall give the highest rate in case of classifying comments with SSWIL, which are 88.63% and 78%, respectively, having F-measure of 82.9% , sensitivity of 78%, and specificity of 54.54%. This is due to the reason that microblogs users use both slang language mixed with classical Arabic.

CONCLUSION AND FUTURE WORK
In this paper, a sentiment analysis approach was proposed to mine unstructured and ungrammatical customers' Arabic slang comments based in new Arabic Slang Sentiment Words and Idioms Lexicon (SSWIL). The new lexicon was collected manually from micro blogs websites. In addition, SVM technique was applied with SSWIL to classify comments as satisfy or dissatisfy comments. In a future study, we will improve classification accuracy results of web users Arabic slang comments. In addition, SSWIL will be updated with new sentiment words and idioms and working on Franco-Arab comments.