# A Lexicon-Based Framework for Mining and Analysis of Arabic Comparative Sentences
## 1 Introduction  
A huge portion of comparative opinions in Arabic language is shared daily in social media. Such opinions need to be analyzed for many reasons like improving products and services. In general, comparative opinions are analyzed first by their identification, then by extracting their types [1, 2], followed by extracting their relation elements [2, 3, 4, 5] and finally extracting the preferred entity [2, 6]. Arabic Language has three dialects, namely Modern Standard Arabic (MSA) [7], Quranic Arabic (QA), and Colloquial Arabic [8]. QA is the type of Arabic in which the Quran, the holy book of Islam, is written. In the sixth century A.D., the language was marginally not the same as the Arabic of today. MSA is the most broadly utilized version ofArabic today in Arabic speaking nations. MSA is utilized as a portion of every media outlet from television to films, to daily newspapers and radio broadcasts. The vast majority of books are written in MSA in addition to politicians'opinions in debates, alongside speeches. MSA is the Arabic dialect that is utilized in everyday life in Arabic speaking countries. Colloquial Arabic is frequently the spoken language of most Arabs. This type of Arabic is subject to regional varieties that not only exist across nations, but also occur in the same nation. The focus of this paper is on Colloquial Arabic and MSA. Previous work was proposed in the field of comparative opinion mining and analysis of English [9; 10], Korean [11], Chinese [12] and Vietnamese [5] languages. Related work specialized in comparative opinion mining and analysis of Arabic language was proposed in [1; 3; 4; 6; 7; 8; 13]. The contributions of this paper are outlined as follows. * A comprehensive lexicon-based framework for the detailed mining and analysis of Arabic comparative sentences is proposed and evaluated. * An algorithm for the identification of Arabic comparative sentences is proposed. The algorithm is referred is to referred to as the Arabic Comparative Sentence Identification (ACSI) algorithm. * An algorithm for the identification of Arabic comparative sentences types. The algorithm is referred to as Arabic Comparative Sentence Type Identification (ACSTI) algorithm. All types of Arabic comparative sentences are considered in this algorithm. The identified comparative sentences were classified into four different types, namely non-equal gradable, equative, superlative, and non-gradable. * An algorithm for the extraction of the relation between the different entities in the Arabic comparative sentence is proposed. The algorithm is referred to as the Relation Extraction from Arabic Comparative Sentence (REACS) algorithm. REACS algorithm considers all elements that form any relation which are a relation word, a comparison feature, a first entity, also referred to as entity 1, and a second entity, also referred to as entity 2. * Two algorithms for the extraction of the preferred entity are proposed. These algorithms are referred to as Preferred Entity Extraction from Arabic Non-Equal Comparative Sentence (PEEANCS) and Preferred Entity Extraction from Arabic Superlative Comparative Sentence (PEEASCS) algorithms. * An Arabic comparative keyword lexicon is _specifically_ developed to evaluate the proposed algorithms. This lexicon contains 649 Arabic comparative keywords that cover all the Arabic comparative sentence types. Three different datasets had been used in this work to evaluate the proposed framework. The datasets include a Twitter dataset composed of 10,005 sentences in Egyptian dialect [14], an MSA dataset composed of 100 sentences, and a social media dataset composed of 501 sentences in Egyptian dialect. The MSA and social media datasets were manually developed by the authors for the evaluation of the proposed framework. The evaluation metrics used to evaluate the proposed algorithms include precision, recall, F-score and accuracy. For the ACSI algorithm, the average values of the four evaluation metrics over all datasets were in the range of 92% to 97%.