# Authorship Attribution on Short Texts in the Slovenian Language
## 1 Introduction  
In the field of natural language processing (NLP), authorship attribution (AA) is the task of determining the authorship of a specific piece of text. The process uses the information we can retrieve from the text itself and the information we have about the author. Stylometric or other features allow us to tell apart the texts of different authors [1]. There are two types of the AA problem: closed-class (here, we want our system to attribute some text to one person from a group of a limited size) or open-class (we want to attribute the text either to a person from a group of a limited size or predict that it does not belong to any of them) [2]. Algorithms that tackle the AA task have a wide variety of uses, ranging from plagiarism detection to forensic investigations [3]. More recently, such methods have been used to analyze the authors of online misinformation [4]. Slovenian is an Indo-European Slavic language with about 2.5 million speakers, the majority of whom reside in Slovenia, a country in central Europe. In the field of natural language processing, it can be considered a less-resourced language. Various datasets and substantial language corpora have only appeared recently [5], which allow various new computational methods to be examined. Despite belonging to the Slavic language group, it features a number of peculiarities. The most notable is the use of the dual grammatical number, a very rare feature among living languages [6]. Additionally, Slovenian has at least 48 dialects, some of which can be mutually almost unintelligible, each featuring uniquelinguistic features. Dialects and colloquial Slovenian are used in informal speech in person or online [7], which presents a unique challenge for natural language processing tasks. To date, most of the research on the topic of AA has been conducted using English texts. Therefore, in this study, we propose an approach to tackle this task for Slovenian texts. We collect short texts from a Slovenian news website comment section and fine-tune a number of models that differentiate between a different number of authors (5, 10, 20, 50, 100). The models are based on the monolingual SloBERTa model [8] and the multilingual BERT model [9]. We show that this technique performs well on the smaller datasets and that the F1 score gradually falls with the increasing number of users. The custom datasets we created (and the models that were fine-tuned on those datasets) are also published online (datasets ([[https://huggingface.co/datasets/gregorgabrovsek/RTVCommentsTop5](https://huggingface.co/datasets/gregorgabrovsek/RTVCommentsTop5) UsersWi]([https://huggingface.co/datasets/gregorgabrovsek/RTVCommentsTop5](https://huggingface.co/datasets/gregorgabrovsek/RTVCommentsTop5) UsersWi) thoutOOC) (accessed on 12 August 2023) and models ([[https://huggingface.co/gregorgabro](https://huggingface.co/gregorgabro)]([https://huggingface.co/gregorgabro](https://huggingface.co/gregorgabro)) vsek/SloBertAA_Top5_WithoutOOC_082023) (accessed on 25 August 2023) are available on Hugging Face) to allow further studies to compare their results. In addition, we fine-tune the multilingual BERT model on an existing IMDb1m dataset in English to compare our approach to an existing method [10; 11]. We make the following main contributions:  
* We show for the first time that it is possible to perform authorship attribution on very short texts in the less-resourced Slovenian language. * We demonstrate the difference in F1 score for models solving the authorship attribution task when they are based on multilingual and monolingual BERT models. * We demonstrate the change in F1 score that occurs when the models are trained either for solving the open-class or closed-class authorship attribution problem. * We present datasets of short texts in Slovenian, which further studies can utilize. In Section 2, we first describe previous work in authorship attribution in general, some relevant recent advances in natural language processing and machine learning, and other related work.