# Detecting Disinformation in Croatian Social Media Comments
## 3 Framework Design and Methodology
Additionally, deep learning models often require extensive pre-training and fine-tuning on domain-specific data to achieve optimal performance, which was beyond the scope of this study. Our focus is not solely on achieving the highest possible accuracy but rather on understanding the underlying dynamics of disinformation and hate speech in specific social contexts. In our approach, we assume that there is a natural distinction between the data groups (i.e., between harmful and non-harmful comments). The problem described belongs to the classification problems, as there are two possible outcomes. The first is that a published comment is harmful, and the second is that a published comment is not harmful. For classification problems, the first step is to create vectorized representation of the data. We used TF-IDF to vectorize the comments. TF-IDF was chosen for this research because it has proven to be very effective in representing textual data by quantifying the meaning of terms within a document compared to a corpus. Its computational efficiency and simplicity make it a suitable choice for the initial phase of text analysis, especially in contexts where interpretability and scalability play an important role [46]. TF-IDF is a statistical measure used to evaluate the importance of a word in a document relative to a collection (or corpus) of documents [47]. While TF-IDF itself does not directly determine a vector space, it is commonly used to construct feature vectors for text data in vector space models. In this context, each unique word in the corpus can be treated as an axis in the vector space, and the TF-IDF score represents the weight of that word along its corresponding axis for a given document. \[tf(t,d)=\frac{N_{t}}{N}, \tag{1}\]  
In Equation (1), _tf_ is a term frequency part of the TF-IDF vectorization. In the equation, the symbol \(N_{t}\) represents the number of occurrences of the word t in one document, and the symbol \(N\) represents the number of words in the same document. In this work, term frequency is important because it gives more attention to words that are mentioned multiple times than to words that are mentioned less often. It is to be expected that, due to the nature of language, there are many words that are mentioned multiple times in multiple comments. Words such as \"a\", \"the\", and \"like\" are examples of such words. The term frequency for these words in a comment results in a larger number, but the information gained from these words is small. To reduce the effect of these words, the inverse document frequency factor is added. \[idf(t)=\frac{N_{n}}{N_{dt}}, \tag{2}\]  
In (2), \(N_{dt}\) is the sum of the occurrences of some exact word in all documents, and the symbol \(N_{n}\) represents the sum of all words in all documents. With the inverse document frequency, the effect of normalization is achieved, since it can be assumed that there is a set of words that have no meaning for comments, other than providing a structure. To scale down the effect of several words in a dataset \(N_{n}\), which can be extremely high, the \(log\) function is used, so the whole \(tfidf\) expression is the following:  
\[tfidf(t,d)=\frac{N_{t}}{N}log\left(\frac{N_{n}}{N_{dt}+1}\right), \tag{3}\]  
In this work, the scikit-learn [48] implementation of TF-IDF was used. Lemmatization was not included in the current preprocessing pipeline. While we acknowledge its potential to enhance text normalization--particularly in highly inflected languages such as Croatian--this study aimed to establish a foundational benchmark for disinformation detection in an under-researched linguistic context. Given the limited prior work on Croatian-language datasets and the broader lack of resources tailored to this language, our focus was on evaluating baseline model performance using standard preprocessing techniques. We recognize that incorporating lemmatization could further improve classification accuracy by reducing lexical sparsity, and we view it as a valuable avenue for future research.