Exploring Author Style in Nakba Short Stories: A Comparative Study of Transformer-Based Models (2025)

Abstract: Measuring semantic similarity and analyzing authorial style are fundamental tasks in Natural Language Processing (NLP), with applications in text classification, cultural analysis, and literary studies. This paper investigates the semantic similarity and stylistic features of Nakba short stories, a key component of Palestinian literature, using transformer-based models, AraBERT, BERT, and RoBERTa. The models effectively capture nuanced linguistic structures, cultural contexts, and stylistic variations in Arabic narratives, outperforming the traditional TF-IDF baseline. By comparing stories of similar length, we minimize biases and ensure a fair evaluation of both semantic and stylistic relationships. Experimental results indicate that RoBERTa achieves slightly higher performance, highlighting its ability to distinguish subtle stylistic patterns. This study demonstrates the potential of AI-driven tools to provide more in-depth insights into Arabic literature, and contributes to the systematic analysis of both semantic and stylistic elements in Nakba narratives.

## introduction a very useful natural language processing (nlp) tool is text similarity. it has many practical applications and allows us to find text that is similar to another text. the recent advancements in nlp have significantly improved the ability to analyze literary and cultural texts, offering new opportunities for exploring the richness of literary traditions. the development of deep learning models such as bert and roberta has made it possible to accurately capture the complexities of arabic texts, a challenge that previous methodologies struggled to address @xcite . nakba short stories, which depict the collective experiences and historical trauma of the palestinian people, are an essential component of palestinian literature and culture. however, analyzing arabic literary texts computationally remains challenging due to the rich morphology, varied dialects, and cultural nuances of the language @xcite . recent studies have shown the efficacy of transformer-based models in capturing these linguistic complexities, making them invaluable tools for semantic analysis @xcite . furthermore, efforts to integrate cultural and historical context into text analysis have underscored the importance of domainspecific datasets and tailored pretraining strategies for effective semantic representation @xcite . this research leverages deep learning models to measure semantic similarity and analyze authorial styles in nakba narratives, aiming to uncover shared themes and stylistic variations among authors in this culturally significant genre. by applying advanced computational techniques, we investigate how well modern nlp models can grasp the nuanced linguistic structures and cultural context embedded within arabic literary works. this study contributes to a more profound understanding of how these narratives convey social and political messages and demonstrates the potential of ai-driven tools to objectively and systematically analyze arabic literature. this work sets a foundation for future research in using ai for cultural and literary studies. this work presents a framework and a database to discover whether new nakba stories are similar to existing ones. to benchmark our results, we utilize tf-idf @xcite as a baseline method, allowing for comparative analysis with advanced transformer-based models. this paper is organized as follows. in section 2, we present prior and recent research on arabic text similarity. section 3 provides a comprehensive analysis of the dataset, our analysis is enriched with visualization. section 4 presents the experimental settings, describes the proposed approach and discusses our reported results. in section 5, we conclude and point out ideas for future search. ## related work semantic similarity measures the extent to which two pieces of text share meaning, a vital task in various nlp applications, such as text classification, information retrieval, and machine translation. arabic, with its complex morphology and diverse genres, presents unique challenges for semantic similarity tasks. this literature review focuses on recent machine learning-based approaches for measuring semantic similarity in arabic text, emphasizing studies by antoun et al. ( 2020), reimers and gurevych (2019), saidi et al. (2024) and ismail et al. (2022) respectively. antoun et al. (2020) introduced arabert, a transformer model pre-trained on large arabic corpora, which has shown effectiveness in various arabic nlp tasks, including semantic similarity. its domain-specific adaptations make it well-suited for handling the morphological complexity of arabic text. author style detection has gained attention in nlp as a means of exploring linguistic patterns unique to individual authors. transformer-based models such as bert and roberta have demonstrated their ability to capture stylistic nuances, as seen in studies such as @xcite that explore sentence embeddings for stylistic comparisons. these methods are particularly relevant for nakba short stories, where narrative styles vary from author to author. @xcite introduced a hybrid model combining bert and a gated recurrent unit (gru) network for capturing semantic similarity in arabic texts. their model exploits bert's powerful contextual embeddings to represent words in their specific contexts, which are then passed through a gru layer to capture sequential dependencies. the study highlights the model's efficacy in handling various arabic genres, demonstrating significant improvements over traditional methods. however, the reliance on large annotated datasets for fine-tuning remains a limitation, particularly given the scarcity of genre-specific arabic corpora. @xcite proposed a semantic-based similarity approach using pre-trained word embeddings and a deep neural network architecture. their model integrates multiple linguistic features, including morphological and syntactic information, to enhance the understanding of semantic relation-ships between arabic texts. this approach has shown promising results in capturing subtle semantic nuances, especially in formal and classical arabic genres. nevertheless, the model struggles with informal and dialectal variations, which are prevalent in contemporary arabic literature. ## data our data represents nakba stories, which were taken from the nakba archive website foot_0 . these narratives have been previously explored in the context of topic classification, as introduced by @xcite , providing a complementary resource for analyzing arabic texts. ## experimental settings in this study, we aim to measure semantic text similarity (sts) and analyze authorial styles in arabic, focusing on nakba short stories. semantic similarity plays a crucial role in various nlp applications, such as text classification, information retrieval, and sentiment analysis, where understanding nuanced linguistic relationships is essential @xcite . recent advancements in transformerbased models like bert @xcite and roberta @xcite have improved the ability to capture complex linguistic patterns, especially in underrepresented languages like arabic. our methodology leverages these pre-trained models to evaluate the semantic similarity across nakba narratives, aiming to uncover recurring themes and patterns embedded within the cultural context of the stories. in addition to semantic similarity, we evaluate authorial style by analyzing linguistic features such as sentence complexity, word usage patterns, and lexical diversity. these features are extracted using embeddings from transformer-based models, enabling a detailed comparison of stylistic elements. to benchmark these models, we use tf-idf as a baseline, allowing for a comparative analysis of traditional versus deep learning approaches. tf-idf was chosen as a baseline method for its traditional approach to measuring semantic similarity through term frequency and inverse document frequency. despite its simplicity, tf-idf provides a foundational perspective for evaluating the performance of more advanced models like bert and roberta. ## conclusion in this paper, we investigated the semantic similarity and authorial styles of nakba short stories using advanced transformer-based models, arabert, bert, and roberta. the high similarity scores achieved by all models underline their effectiveness in capturing nuanced linguistic structures, cultural contexts, and stylistic variations in arabic texts. the slightly superior performance of roberta highlights the impact of optimized pretraining on contextual representation and its ability to differentiate authorial styles within narratives. by comparing stories of similar length, we minimized bias and ensured a fair assessment of both semantic and stylistic relationships. this study demonstrates the potential of transformer-based models in the systematic analysis of arabic literature, providing valuable insights into recurring themes, stylistic diversity, and shared cultural motifs. future work could focus on expanding the dataset to include a wider variety of nakba narratives, allowing for more comprehensive analyses of semantic and stylistic variation. incorporating additional stylistic features, such as syntactic complexity, lexical richness, and punctuation patterns, could provide more in-depth insights into authorial styles. improving the models by fine-tuning on domain-specific corpora, adopting multitask learning approaches, or utilizing advanced architectures like sbert for sentence-level embeddings could enhance their ability to capture subtle stylistic differences.