  Sentiment analysis, the automated process of determining emotions or opinions
expressed in text, has seen extensive exploration in the field of natural
language processing. However, one aspect that has remained underrepresented is
the sentiment analysis of the Moroccan dialect, which boasts a unique
linguistic landscape and the coexistence of multiple scripts. Previous works in
sentiment analysis primarily targeted dialects employing Arabic script. While
these efforts provided valuable insights, they may not fully capture the
complexity of Moroccan web content, which features a blend of Arabic and Latin
script. As a result, our study emphasizes the importance of extending sentiment
analysis to encompass the entire spectrum of Moroccan linguistic diversity.
Central to our research is the creation of the largest public dataset for
Moroccan dialect sentiment analysis that incorporates not only Moroccan dialect
written in Arabic script but also in Latin letters. By assembling a diverse
range of textual data, we were able to construct a dataset with a range of 20
000 manually labeled text in Moroccan dialect and also publicly available lists
of stop words in Moroccan dialect. To dive into sentiment analysis, we
conducted a comparative study on multiple Machine learning models to assess
their compatibility with our dataset. Experiments were performed using both raw
and preprocessed data to show the importance of the preprocessing step. We were
able to achieve 92% accuracy in our model and to further prove its liability we
tested our model on smaller publicly available datasets of Moroccan dialect and
the results were favorable.
