Functional Text Dimensions for A rabic Text Classification (2024)

Abstract: Text classification is of paramount importance in a wide range of applications, including information retrieval, extraction and sentiment analysis. The challenge of classifying and labelling text genres, especially in web-based corpora, has received considerable attention. The frequent absence of unambiguous genre information complicates the identification of text types. To address these issues, the Functional Text Dimensions (FTD) method has been introduced to provide a universal set of categories for text classification. This study presents the Arabic Functional Text Dimensions Corpus (AFTD Corpus), a carefully curated collection of documents for evaluating text classification in Arabic. The AFTD Corpus which we are making available to the community, consists of 3400 documents spanning 17 different class categories. Through a comprehensive evaluation using traditional machine learning and neural models, we assess the effectiveness of the FTD approach in the Arabic context. CAMeLBERT, a state-of-the-art model, achieved an impressive F1 score of 0.81 on our corpus. This research highlights the potential of the FTD method for improving text classification, especially for Arabic content, and underlines the importance of robust classification models in web applications.

## introduction text classification is an essential task in natural language processing (nlp) with a wide range of applications. it involves categorizing textual data into predefined labels, enabling efficient information retrieval, content filtering, sentiment analysis, media monitoring, and even critical applications such as fraud detection. however, the classification and labelling of text genres, especially in web-based corpora, presents several challenges that hinder these processes. a prominent problem is the frequent lack of clear and explicit genre information in web corpora. genre labels, when present, tend to be ambiguous and open to interpretation, making it difficult to reliably identify text types. traditional corpora often have their own classification schemes, which may not be consistent with the categories commonly used in web-based texts. this inconsistency poses a challenge when integrating different sources of information. furthermore, the interpretation of genre labels can be subjective, leading to discrepancies between different annotators. the same text may be categorized differently by two people, leading to inconsistencies in large-scale annotation tasks. in addition, texts within the same category can have significant variations in structure, language and content, further complicating the task of genre classification. while genre classification plays a central role in understanding linguistic features and facilitating corpus comparisons, the lack of standardized guidelines and reliable annotation practices hinders progress. web-derived corpora often rely on the origin of the content or limited contextual clues to infer genre information, which can be unreliable and incomplete @xcite . this highlights the complex nature of genre classification, especially when dealing with diverse and dynamic web content. the functional text dimensions (ftd) method has been proposed to address these challenges @xcite . ftds provide a set of universally applicable categories that offer a broad and versatile classification system. by providing a comprehensive set of guidelines, the ftd approach aims to improve the reliability and consistency of annotation practices. the inter-annotator agreement, which refers to the degree of agreement between different annotators for a randomly selected 350 documents per annotator reached a krippendorff's @xcite agreement above 70% @xcite . the reported agreement results suggest that the proposed categories are effective in practice. however, the existing ftd frameworks have been primarily developed and evaluated primarily with english and a few other widely used languages. as one of the most widely spoken languages in the world, with a rich history and diverse dialects, arabic presents unique challenges for text classification. the complexity of the arabic language, including its varied grammatical structures, extensive vocabulary and distinct writing system, requires the development of specialised language resources and models. although arabic has significant differences from english and other european languages, there is a lack of comprehensive arabic text corpora that can be used to effectively evaluate text classification models. to fill this gap, we present the arabic functional text dimensions corpus (aftd corpus) -a carefully curated collection of arabic documents. the aftd corpus is designed to ensure diversity and representativeness, covering different genres and styles relevant to modern arabic literature. by extending the ftd approach to arabic, we aim to improve text classification performance and enable a wide range of applications in the arabic language. the contribution of this work is double. first, we present the aftd corpus, a valuable resource for arabic text classification research and development that will be open and available to the community. second, we perform a comprehensive evaluation of state-of-the-art text classification models using the aftd corpus, providing a benchmark for future comparisons. through this study, we aim to demonstrate the effectiveness of the ftd approach in the arabic context and to emphasise the importance of language-specific resources for accurate and reliable text classification. ## related work text classification has historically been driven by the volume of content that has become available and accessible to the community over the years. the process has gone through various stages, from early manual systems to more modern digital methods. in the late 19th century, m. dewey @xcite proposed the dewey decimal classification (ddc) a system that was one of the earliest attempts to classify books based on their subject matter. it used a numerical system to categorize and organize books in libraries, making it easier for librarians and users to find specific materials. library of congress classification (lcc): developed by the library of congress, this system expanded on dewey's work by providing a more comprehensive classification scheme. lcc is widely used in academic and research libraries, particularly in the united states @xcite . with the advent of computers and the internet, libraries moved from card catalogues to online databases. this allowed for more dynamic and flexible searching and browsing of library collections. the advent of digital libraries enabled libraries to provide access to digital content alongside physical collections. this shift required new classification systems, metadata standards and search algorithms. as the web expanded, the need to classify web content grew, giving rise to the semantic web and knowledge organisation systems. these systems aim to structure and link information on the web in a more meaningful way, using technologies such as resource description framework (rdf), ontology web language (owl) and linked data @xcite . recent advances in machine learning and artificial intelligence have led to more automated methods of classifying and categorizing texts. natural language processing (nlp) techniques are used to analyze and classify large amounts of digital content quickly and efficiently @xcite . modern systems also take into account usergenerated tags, reviews, and recommendations, allowing users to contribute to the classification and organization of texts and web content through social tagging and collaborative filtering @xcite . platforms such as goodreads, for example, rely on user reviews and tags to classify books. this improves discoverability and personalization. crowdsourcing and collaborative tagging systems harness the collective intelligence of users @xcite , improving classification accuracy and relevance. these systems adapt to changing user preferences and emerging trends, providing a dynamic and responsive approach to text classification. while such an approach is very efficient, its consistency and uniformity brings more challenges to data processing @xcite . arabic text classification efforts have gained momentum in recent years due to the growing amount of digital content in the arabic language. arabic presents unique challenges for text classification due to its complex morphology, rich inflection and multiple dialects. early work adopted existing approaches for english and other common languages. the adoption of such approaches resulted in collections such as clara (corpus linguae arabicae) @xcite , the collection of both journals and books. later work expanded both the scope and the variety of genres @xcite . efforts to build large-scale arabic corpora and datasets have been crucial to the advancement of arabic text classification. the arabic gigaword corpus @xcite , for example, provides an extensive collection of newswire texts labelled by the source and type of news. in addition, initiatives such as the open source arabic corpora (osac) @xcite and sanad @xcite aim to make arabic linguistic resources more accessible to researchers and developers. moreover, community driven projects and competitions 2 , such as the arabic sentiment analysis challenge 3 , have simulated innovation by providing benchmarks and encouraging collaboration among researchers. these initiatives have contributed to the development of more robust and accurate arabic text classification systems. ## conclusion and perspectives in this paper, we presented the first functional text dimensions for arabic, a collection of 3,400 documents across 17 categories. we addressed the challenges of genre classification in web-based corpora, highlighting the complexities associated with genre labelling in arabic. our approach used natural language processing techniques, specifically machine learning and language models, to address these challenges. our research demonstrates the potential of neural models, particularly bert-based models, to improve genre classification in web-based corpora, especially for the arabic language. however, there is still room for improvement. we aim to expand the dataset and recruit professional annotators to improve the quality and reliability of the annotations. we will then perform a reliability analysis to ensure the integrity of the dataset. in addition, fine-tuning the models and exploring feature engineering could significantly improve performance. the acquisition of additional labelled data would improve class separability and overall performance. with the emergence of large language models (llms), we plan to explore their use both in extending the dataset and in assessing its quality, comparing their performance with traditional ml and bert models.