Next Article in Journal
Modeling and Mitigating Output-Dependent Modulation in Current-Steering DAC Based on Differential-Quad Switching Scheme
Previous Article in Journal
Synchronization Mechanism for Controlled Complex Networks under Auxiliary Effect of Dynamic Edges
Previous Article in Special Issue
AdMISC: Advanced Multi-Task Learning and Feature-Fusion for Emotional Support Conversation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Hybrid Natural Language Processing Model for Sentiment Analysis during Natural Crisis

1
Department of Applied Computing, Faculty of Electrical Engineering and Computing, University of Zagreb, Unska 3, HR-10000 Zagreb, Croatia
2
Independent Researcher, HR-10000 Zagreb, Croatia
*
Author to whom correspondence should be addressed.
Electronics 2024, 13(10), 1991; https://doi.org/10.3390/electronics13101991
Submission received: 27 March 2024 / Revised: 15 May 2024 / Accepted: 17 May 2024 / Published: 20 May 2024
(This article belongs to the Special Issue Emerging Theory and Applications in Natural Language Processing)

Abstract

:
This paper introduces a novel natural language processing (NLP) model as an original approach to sentiment analysis, with a focus on understanding emotional responses during major disasters or conflicts. The model was created specifically for Croatian and is based on unigrams, but it can be used with any language that supports the n-gram model and expanded to multiple word sequences. The presented model generates a sentiment score aligned with discrete and dimensional emotion models, reliability metrics, and individual word scores using affective datasets Extended ANEW and NRC WordEmotion Association Lexicon. The sentiment analysis model incorporates different methodologies, including lexicon-based, machine learning, and hybrid approaches. The process of preprocessing includes translation, lemmatization, and data refinement, utilized automated translation services as well as the CLARIN Knowledge Centre for South Slavic languages (CLASSLA) library, with a particular emphasis on diacritical mark correction and tokenization. The presented model was experimentally evaluated on three simultaneous major natural crises that recently affected Croatia. The study’s findings reveal a significant shift in emotional dimensions during the COVID-19 pandemic, particularly a decrease in valence, arousal, and dominance, which corresponded with the two-month recovery period. Furthermore, the 2020 Croatian earthquakes elicited a wide range of negative discrete emotions, including anger, fear, and sadness, with the recuperation period much longer than in the case of COVID-19. This study represents an advancement in sentiment analysis, particularly in linguistically specific contexts, and provides insights into the emotional landscape shaped by major societal events.

1. Introduction

Natural language processing (NLP) is a field that utilizes computational techniques to learn, understand, and generate human language content [1]. It encompasses various sub-problems such as part-of-speech tagging, named entity recognition, and semantic role labeling [2]. The primary objective of NLP is to enable computers to comprehend and communicate with humans using a natural language, leading to the development of unified architectures and advanced algorithms for language processing predictions [3]. Furthermore, NLP has been crucial in extracting features from unstructured text, facilitating the extraction and retrieval of information from such data [4].
Some of the main domains of NLP include machine translation, text classification (e.g., spam detection), sentiment analysis, speech recognition, and natural language generation [5]. Also, NLP is often utilized to extract human sentiment or emotions from textual documents [5] where sentiment is commonly expressed by labeling it into three categories: neutral, positive, and negative [6]. Sentiment analysis can be conducted at three levels: document level, where the general opinion of the author is determined; sentence level, where sentiment based on a sentence can distinguish between objective and subjective sentences; and feature level, where sentiment is associated with a specific object (revealing what the opinion specifically pertains to) [6]. Emotion analysis expands the labeling process by seeking specific emotions in the text such as anger, happiness, sadness, etc. Two prominent models of emotion used in digital systems are discrete and dimensional and both can be used for text analysis [7]. The practical difference between them lies in the fact that the discrete model labels each individual emotion on a single continuous scale from 0.0 to 1.0, while the dimensional model assigns several emotions along different features defined on a scale from 1.0 to 9.0, or 1.0 to 7.0. Commonplace theories of emotion are more thoroughly explained in Section 3.1.
Sentiment and emotion analysis are useful in many use cases, for example, business purposes, to monitor opinions about a product or company; political purposes, to analyze political speech about various individuals, ideas, or organizations; or scientific purposes, to analyze regional or global sentiment about significant societal events and their aftermath (e.g., the COVID-19 pandemic, earthquakes, tsunami, terrorist attacks, etc.). The ML approach within NLP, in its most basic form, involves training a ML model to label texts [6]. This approach can be unsupervised or supervised. Some commonly used models include the naive Bayes classifier, support vector machines, logistic regression, decision tree, or k-nearest neighbors (KNN) algorithm. The hybrid model presented here combines these two approaches [7].
The analysis methodology is typically divided into lexicon-based, ML-based, or hybrid approaches [7]. In the lexicon-based approach—which is used in this study—texts are labeled by identifying text segments (n-grams) in a pre-collected lexicon with labeled words. An n-gram is a sequence of n words (instead of words, it can be syllables or letters) in the text [8]. When the parameter n is equal to 1, it is called a unigram, when n is equal to 2, it is called a bigram, with n equal to 3, it is a trigram, and so on. In the conducted experiment, our model exclusively utilized unigrams. However, since the model is n-gram agnostic, any n-gram can be employed, in principle.
The goal of this paper is to present a novel hybrid NLP lexicon-based model for the classification of emotions in unlabeled texts in the Croatian language and validate its usability in real-world scenarios employing a unique text corpus related to a conjugation major natural disasters (the COVID-19 pandemic and earthquakes) that occurred in Croatia in 2020. In its basic form, the model is straightforward, relying on unigrams, input preprocessing, and lexical matching to acquire emotion values. To gather further insights into the relationship between semantics and emotion, the model can employ ML techniques.
The remainder of the paper is structured as follows: Section 2 explains the motivation for this research. Section 3 provides an overview of sentiment analysis methods, specifically focusing on emotion models in digital systems, and examines how they are used in specific cases. Section 4 describes the architecture of the developed hybrid NLP model, which is then applied to a textual dataset of spelling corrections collected before and during the aforementioned natural disasters in Croatia. Section 5 presents the results of the sentiment analysis experiment, while Section 6 discusses them. Section 7 concludes the paper.

2. Motivation

The psychological effects of societal events on local populations are crucial in developing strategies for emotional resilience and recovery. Advanced sentiment analysis techniques can map these dynamics and provide useful information for effective interventions and support mechanisms. The research presented here aims to improve our understanding of sentiment analysis in crisis situations and support policy makers in recovery efforts.
Three major disasters struck Croatia in 2020, events that had not occurred in the previous 140 years [9,10,11]. This period was unique because of its unprecedented concentration and rapid succession of events. First, there was the global coronavirus pandemic, which just in itself posed a formidable challenge to the healthcare infrastructure, economy, education, and society as a whole. As can be seen in Figure 1, during 2020, the number of active cases per week rose sharply towards the end of the year, surpassing 250,000 active cases (more than 6.5% of the total population), with the healthcare system facing challenges in providing care for all patients, not just those suffering from COVID-19 [12,13]. In addition to this, during the COVID-19 pandemic, Croatia was hit with two powerful earthquakes near the most significant, and most densely populated, national urban centers. This series of events marked a special and difficult period for Croatia during 2020, unexpectedly affecting its people and infrastructure for a significant period to come.
On 22 March 2020 at 6:24 local time, during strict lockdown restrictions, the Croatian capital of Zagreb was hit by the strongest earthquake in the last 140 years—measuring 5.5 on the Richter scale [9]. The epicenter was within the city borders at a depth of only 10 km. The magnitude of the earthquake caused significant damage as more than 1900 buildings were reported to have been damaged to the point of becoming uninhabitable. Unfortunately, there was 1 fatality, and 26 people were reported injured. To bring things into perspective, Zagreb is the largest city of the Republic of Croatia. The population of the Zagreb urban agglomeration is slightly above one million people, which represents more than 1/3 of the total population of Croatia. Given this significant demographic concentration, the earthquake in Zagreb had a profound impact on a large number of people in the region [14].
Later the same year, another major earthquake struck Croatia. On 29 December 2020, an earthquake of magnitude 6.4 on the Richter scale hit central Croatia, with an epicenter located roughly 3 km west-southwest of city of Petrinja, only some 50 km from the capital Zagreb [10]. The earthquake caused extensive devastation with damage observed as far as 60 km from the epicenter. The quake was strongly felt in Zagreb as well as the whole densely populated northwestern part of the Croatia and in neighboring Slovenia and Bosnia. The Petrinja earthquake left 8 dead and at least 36 injured, 10 severely, and estimated damage costs of more than EUR 5.5 billion [15]. Approximately 150,000 people were directly affected by this disaster, causing not only immediate shock and trauma but also significant disruptions in their daily lives. Figure 2 displays seismic maps with the precise close proximity locations and magnitudes of the Zagreb and Petrinja earthquakes.
Furthermore, many people found their homes severely damaged or completely destroyed, making them uninhabitable. The loss of essential services aggravated their hardships for some time to come, as many areas were left without electricity, running water, and other critical infrastructure and utilities. These challenges required urgent and extensive recovery efforts. All of this aggravated the overall crisis and left some residents in the affected area deeply anxious and bewildered, which was also reflected in stories published in daily newspapers, social media, and other local and national communication channels over a longer time period [18,19].
The collective impact of all three disastrous events (COVID-19 pandemic, Zagreb and Petrinja earthquakes) left a major mark on the emotional state and psychological well-being of the local population [20]. This was reflected in various textual materials, including newspaper articles and social media posts, and could be examined using sentiment analysis techniques. Moreover, sentiment analysis can reveal trends in public mood dynamics, providing insights into how communities adapt and recover from these challenges over time.

3. Related Work in Sentiment Analysis

When investigating sentiment analysis, it is important to understand the basic frameworks and methodologies that have influenced the field. This section examines the various theoretical foundations and practical implementations that define current research in sentiment analysis. First, this section introduces emotion models that can be used in digital systems and explains the multifaceted dynamics between emotion and cognition, especially in the context of human–computer interaction. In addition, this section emphasizes how to incorporate machine learning methods to establish correlations between different emotion models and thus increase the robustness of emotion recognition methods. The application of these theories in different disciplines such as psychology, neuroscience, and artificial intelligence shows how versatile they are and the crucial role they play in the development of computational approaches to understanding human emotional responses.

3.1. Emotion Models

Emotion models, in general as well as in digital systems, are broadly categorized into three major groups: dimensional theories, discrete emotion theories, and cognitive theories of emotion [21]. Among these, dimensional models are most commonly applied in multimedia stimuli databases for the annotation of pictures, video and sounds utilized for the elicitation of specific emotion states, followed by discrete models such as Paul Ekman’s “Big Six” emotion model [21,22]. Cognitive models are mainly used in understanding and predicting the complex interplay between cognitive processes and emotional responses. These models focus on understanding, and emulating in computer systems, how thoughts, beliefs, and perceptions influence emotional reactions to events or stimuli.
Emotion models are widely applied in various fields such as psychology, neuroscience, artificial intelligence, affective computing, and human–computer interaction [21]. They are central in the investigation of the interplay between cognitive, behavioral, and emotional components. The importance of temporal dynamics is considered in order to understand both the immediate emotional responses and the longer-lasting responses (e.g., moods and feelings) following cognitive processes. Discrete and dimensional emotion models are commonly considered distinct and mutually independent. However, previous studies have shown that it is possible to establish a correlation between data points in both models by employing ML techniques to identify patterns in a multidimensional space that integrates the semantics and emotions of stimulation [23,24].
In addition to the process of emotion formation, the emotions models also deal with classification of affective information. The classification of emotions is particularly important for their computer processing. Two main approaches to classification are the discrete approach and the dimensional approach, as mentioned above. If emotions are considered discrete, we describe them with separate concepts (i.e., words) and consider them completely distinct from each other. On the other hand, the dimensional approach to emotions defines them by evaluating them on continuous scales, meaning that by positioning them in a vector space, one can determine the similarity or opposition of emotions.

3.1.1. Discrete Emotions Model

Discrete or categorical theories of emotion claim that dimensional emotion models do not accurately reflect the neural systems underlying emotional responses. Instead, proponents of these theories propose that there are many emotions that are universal across cultures and have an evolutionary and biological basis [25,26]. However, which discrete emotions, basic emotions, or emotion norms, as they are also called, are included in these theories and what their mutual relationship is, remains a matter of research [21].
Ekman proposed a notable model of six fundamental emotions, namely happiness, sadness, fear, disgust, anger, and surprise, associating them with specific facial expressions that are culturally independent [26]. Ekman distinguishes emotions from other affective states based on nine characteristics: universal signals, presence in other primates, characteristic physiology, universal events that trigger emotions, coherence of emotional response, rapid onset, short duration, automatic determination of stimuli, and unwanted occurrence [26].
Plutchik proposed a hierarchical model of eight primary emotions: anger, anticipation, disgust, fear, happiness or joy, sadness, surprise, and trust [27]. He positioned these emotions in a hierarchical concept space called the Wheel of Emotions to illustrate their opposites. As such, Plutchik’s model represents a hybrid emotion model—not exclusively discrete but partially dimensional. Additionally, he defined additional norms derived from the eight basic emotions, also depicted on the so-called Wheel of Emotions hierarchical and circular diagram [28]. In this framework, the [28] intensity of emotions is defined by proximity to the center of the Wheel of Emotions, where emotions in the middle are more intense, and those on the edges are less intense.

3.1.2. Dimensional Emotions Model

In parallel with discrete models of emotions, dimensional models have also been developed and have been extensively used in digital systems, especially for annotation of multimedia for emotion stimulation [22] and estimation of emotions using physiological signals [29,30].
As early as 1897, Wundt defined a dimensional model of emotions using three dimensions: pleasure–displeasure, arousal–calmness, tension–relaxation [31]. Much later, in 1980, Russell popularized the dimensional approach in the so-called circumplex model of emotions, also called the pleasure–arousal–dominance (PAD) model [21,32,33,34]. This model suggests that affective states arise from combining three affective dimensions: valence ( A r ), arousal ( V a l ), and dominance ( D o m ). In the most affective multimedia databases, their values range from 1.0 to 9.0 on a Likert scale [21]:
v a l [ 1 ,   9 ] V a l ,   a r [ 1 ,   9 ] A r ,   d o m [ 1 ,   9 ] D o m
Positivity and negativity of a stimulus are specified by valence, while arousal describes the intensity or energy level. Dominance represents the controlling and dominant nature of the emotion, or in other words, how much the person experiencing the emotion feels constrained in their behavior; i.e., it describes whether the emotion dominates the individual. According to the circumplex model of affect, all emotions can be represented as a combination of affective dimensions valence, arousal, and dominance within a 3D emotion space, allowing for the analysis of similarity between different emotion states using an appropriate distance metrics [21]. However, in practice, the dimension dominance is frequently omitted from description of emotion space because it was shown to be the least informative measure of the elicited affect [35]. Furthermore, some studies indicate the importance of the sense of control in behavior and health analysis, which is a significant factor driving the use of such a model [35]. Another dimensional model of emotion is the PANA model, with axes for positive affect and negative affect [36]. This model is similar to the pleasure–arousal 2D model but rotated by 45 degrees. The PAD model of emotion and the relationship with discrete emotions is shown in Figure 3.
As can be seen in Figure 3 anger, disgust, and fear are all in the negative valence area, indicating that they are unpleasant emotions. Anger is distinguished by increased arousal and dominance, implying a high level of emotional activation as well as a sense of assertiveness or control. Disgust exhibits moderate arousal and dominance, whereas fear scores lower on dominance, indicating a lack of control when experiencing this emotion. Sadness is displayed as well in the negative valence area, but with lower arousal and dominance, indicating a lack of energy and feeling subdued. In contrast, joy and surprise are in the positive valence section, indicating that they are pleasant. Joy has high levels of arousal and dominance, indicating a vigorous and controlling emotional state, whereas surprise has high levels of arousal but moderate levels of dominance, possibly reflecting the unexpected nature of this emotion, which often leaves individuals feeling less in control.

3.2. Lexicon-Based Approach

Lexicon-based approaches in sentiment analysis have gained significant attention due to their robustness and effectiveness in capturing sentiment from text. These approaches utilize sentiment lexicons, which consist of words and phrases with associated sentiment orientations, to determine the overall sentiment of a given text [37]. The sentiment lexicons play a crucial role in sentiment analysis, as they provide sentiment labels or scores to individual sentiment words, enabling the analysis of sentiment in various contexts, including microblog-like environments and social media [38,39].
Lexicon-based methods have been shown to be effective in cross-domain sentiment analysis and can be enhanced with multiple sources of knowledge, making them versatile and adaptable for different applications [37]. These approaches offer a simple yet powerful way to obtain prior sentiment information from opinionated words in texts, making them valuable for analyzing sentiment in diverse languages and domains [40,41]. The use of sentiment lexicons in lexicon-based approaches provides a solid foundation for sentiment analysis, offering a comprehensive and reliable method for extracting sentiment-related information from text [42].
The assumption of the lexicon-based approach is that the sentiment label of a sentence or text can be identified with the aggregated labels of words (i.e., n-grams). However, this may not always be accurate. For example, in the sentence “This film was neither good nor interesting”, the final sentiment might be positive if the words “good” and “interesting” are recognized. The problem with this approach lies in homonyms, which require different sentiment labels. This approach may also face challenges with phrases or sarcasm [43].
To improve the performance of this approach, it is beneficial to create domain-specific lexicons, use semantic analysis for recognizing negations, sarcasm, or phrases, or employ larger n-grams. Another drawback is the lack of support for various languages. The advantages of this approach are simplicity and speed.

3.3. Machine Learning Methods for Sentiment Analysis

A significant surge in interest in sentiment analysis occurred in the 2000s, driven by the increasing volume of information on internet blogs and user review platforms, necessitating the automated processing of human opinions. Concurrently, ML methods gained popularity.
In recent years, various methods for sentiment analysis have been explored, including aforementioned sentiment lexicon-based, ML-based, and deep learning-based approaches. These methods have been instrumental in analyzing textual data from diverse sources such as social media, product reviews, and customer feedback. Recent studies have emphasized the use of ML algorithms, including deep learning models, for sentiment analysis across multilingual corpora, demonstrating their effectiveness in capturing sentiment from diverse linguistic sources [44,45].
An influential work from that era, authored by Pang and Lee [46], provide an overview of the use cases, challenges, and approaches for sentiment analysis. Opinion mining is a term often equated with sentiment analysis. Key applications for sentiment analysis include market research, review analysis (pertaining to movies, series, products, restaurants, etc.), studying political attitudes, or integrating sentiment analysis as a component of a larger system (e.g., recommendation systems). Sentiment analysis poses diverse challenges, varying depending on the approach employed.
The integration of ML in sentiment analysis has enabled the extraction of valuable insights from large volumes of unstructured textual data, contributing to a deeper understanding of public sentiment and opinion. The application of ML in sentiment analysis has extended beyond textual data to encompass multimodal analysis, exploring the structure of emotions through diverse data modalities [47].
ML techniques have been extended to social media platforms, such as Twitter, where sentiment analysis has been utilized to extract valuable insights from user-generated content, highlighting the versatility and relevance of ML in sentiment analysis [48,49].
The integration of ML in sentiment analysis has facilitated language-independent sentiment analysis, enabling the development of methods that can effectively capture sentiment across different languages and language pairs [45,50]. This has significant implications for cross-lingual sentiment analysis and the ability to extract sentiment from multilingual sources, contributing to a more comprehensive understanding of public opinion and sentiment on a global scale. The use of ML techniques has been instrumental in predicting the effects of sentiment, such as news sentiments, on various domains, including the stock market, underscoring the practical applications and impact of sentiment analysis in real-world scenarios [51].
Classifiers based on gradient boosting are often used, such as LightGBM and XGBoost. The idea of gradient boosting is to create an ensemble of models where new models are better in cases where previous ones make mistakes. This approach, as demonstrated in [52], has outperformed previous models. It is emphasized that LGBM particularly excels in cases where the dataset is imbalanced.
In the field of deep learning, one of the commonly used models is the Long Short-Term Memory (LSTM) network. LSTM is a recurrent neural network, meaning it has the ability to interpret sequential data (i.e., words in text). Although LSTM can achieve good results in sentiment analysis, its drawback is the long training time. In addition to LSTMs, possibilities of pre-trained transformer models that are fine-tuned for various use cases are being studied. Transformer models use attention mechanisms to focus on relevant words in the input text [53], giving them the capability to capture longer word dependencies, i.e., larger context.
An alternative method in sentiment analysis on social media involved investigating the feasibility of utilizing text and emotions expressions in visual data to analyze Twitter/X activity. This approach specifically targeted accounts that had a substantial number of followers [54,55]. The study examined a dataset of more than 16,000 tweets collected from the accounts of 22 prominent startup founders, recognized for their substantial number of followers, gathered over a span of four months. The analysis of word usage in these tweets involved the application of conventional NLP techniques, such as frequency analysis and a comprehensive qualitative evaluation that focused on the distribution of words. Furthermore, the study included an assessment of the profile images of the founders in order to conduct facial emotion analysis and emotion mining. The findings correlate the basic emotional states inferred from these images to Twitter/X engagement metrics, such as tweet frequency and follower growth, over the observed period [54,55].
The use of ML algorithms has facilitated the construction of sentiment corpora, essential for training and validating sentiment analysis models [56]. These corpora play a pivotal role in enhancing the accuracy and robustness of sentiment analysis systems, especially in domains such as product reviews and customer sentiment. Furthermore, the integration of ML in sentiment analysis has not been without challenges, as evidenced by the emergence of adversarial ML in this context [57]. Adversarial ML techniques have been explored to address potential vulnerabilities and manipulations in sentiment analysis models, ensuring the reliability and security of sentiment classification systems.

3.4. Sentiment Analysis for Croatian Language

Recent research has shown a growing interest in sentiment analysis for the Croatian language, particularly in the context of social media content related to the COVID-19 pandemic. For instance, a study by Babić et al. [58] developed an NL-based framework for sentiment analysis of a large dataset of tweets in Croatian, focusing on sentiments related to the pandemic. This research highlights the application of sentiment analysis in understanding public discourse and sentiments during the COVID-19 pandemic within the Croatian linguistic context. In [59], a case of domain-specific sentiment classification for Croatian was presented, shedding light on the challenges and opportunities in sentiment analysis for Slavic languages.
Sentiment analysis in the Croatian language has also been explored in the context of social media content related to other topics. For example, research conducted via content analysis on Facebook comments in the Croatian language, revealing the dominant sentiment of the comments to be positive, demonstrating the application of sentiment analysis in understanding public sentiment in the Croatian social media landscape [60]. These studies collectively contribute to the growing body of research on sentiment analysis in Croatian language, providing valuable insights into the sentiments expressed by Croatian speakers in various contexts, from public health crises to social media interactions.

3.5. Sentiment Analysis during Societal Crises

The COVID-19 pandemic, besides its impact on physical health, has had a significant effect on people’s mental health [61]. The pervasive fear of the disease, coupled with isolation, the shift to online learning and remote working, and the need to wear protective masks, contribute to stress and negative psychological outcomes [62,63]. These effects are frequently manifested in textual expressions found on social media platforms or published in various forms of public communication. By examining the sentiments expressed on these platforms, a deeper understanding of how society is responding to the pandemic can be gained. Furthermore, to better cope with the pandemic (or other traumatic global or regional events), it is possible to explore emotions conveyed through news articles or social media and draw new conclusions about reactions to changes in the development or control of the pandemic and other similar events [64].
A large number of scientific studies have been published that investigate the impact of the COVID-19 pandemic on emotions and sentiments. Previous studies have demonstrated that the COVID-19 pandemic has had a lasting impact on various aspects of human needs, including physiological needs, safety needs, and the need for care or affection (for example, see [65,66]). Among vulnerable groups, increased stress has been observed in individuals with chronic illnesses, while anxiety and sleep disorders have been noted in those with existing mental health conditions [67]. Specifically, younger participants have exhibited indications of anxiety, middle-aged individuals have displayed feelings of anger, and older individuals have displayed heightened and enduring sadness [68,69].
The idea of monitoring sentiment during disease outbreaks is not entirely new or related solely to COVID-19 pandemic. In [70], a range of psychological issues related to the Ebola virus outbreak and their corresponding sentiments were tracked. The response of the World Health Organization, which initially elicited negative sentiment as a result of travel bans, subsequently reverted to less severe negative sentiments. The inception of the vaccine initially elicited unfavorable sentiment characterized by apprehensions, but subsequently, sentiment pertaining to the vaccine shifted towards positivity. Lexicons containing words labeled as positive or negative were employed for the purpose of sentiment assessment.
In various diseases and disorders (flu, swine flu, meningitis, depression, bipolar disorder, etc.) were analyzed using Twitter data processed in two steps: identifying personal and news texts and measuring individual concerns and media stances [71]. The results achieved in these studies encourage the exploration of different methods of sentiment and emotion analysis in documents in the Croatian language.

4. Hybrid NLP Model for Sentiment Analysis

The hybrid model for sentiment analysis presented in this paper is based on n-grams and efficiently integrates lexicon-based and machine learning (ML) approaches to enhance its analytical capabilities. In its most basic form, the model is lexicon-based and relies on unigrams, input preprocessing, and lexical matching to acquire emotion values. To gather additional insights into the relationship between semantics and emotion, the model can employ ML techniques. This feature improves flexibility and versatility of the model.
The lexical matching component assigns predetermined emotion values to individual input words, making the interpretation of results simple and straightforward. This supervised learning process involves utilizing an existing lexicon with a list of words and corresponding sentiment or emotional ratings. Three emotion lexicons are used: Affective Norms for English Words (ANEW), eXtended ANEW (XANEW), and NRC Word-Emotion Association Lexicon (EmoLex) [72,73,74]. Sentiment-rated words in these corpuses are sought in preprocessed input texts, and the ratings of the identified words are then averaged to obtain the final text sentiment score aligned with dimensional and discrete emotion models.
In order to broaden its range and overcome the inherent limitations of the lexicon approach, the model can be extended to include not only unigrams but also n-grams of different token lengths. This expansion allows the inclusion of various machine learning algorithms commonly used in NLP, such as the naive Bayes classifier, support vector machines (SVMs), decision trees, random forests, and advanced neural networks like LSTM, GRU, and Transformers.
The ML aspect of the presented model is also evident in the investigation of the relationship between dimensional emotion values and discrete norms, as well as the analysis of the semantics and sentiments of n-grams. Empirical evidence has demonstrated the presence of statistically significant correlations between specific pairs of discrete and dimensional emotions [23]. Similarly, unsupervised ML methods have demonstrated the ability to transform ratings from the discrete emotion space into distinct clusters in the dimensional space for specific pairs of discrete–dimensional emotions [24].
The hybrid model workflow for sentiment analysis is described as a UML activity diagram in Figure 4.
After data ingestion, the sentiment analysis process of the presented model begins with the processing of input text data, which is typically unstructured. This text is first segmented into n-grams. In the lexicon matching step, each n-gram is then matched against an emotion lexicon where each entry is associated with predefined emotional and emotion lexicon scores. Standardized lexicons provide a baseline sentiment score for each n-gram based on its contained words, offering an initial estimation of the text’s emotional tone. To enhance the understanding of the text and overcome the inherent limitations of the lexicon-based approach (such as context insensitivity and the inability to handle novel expressions), various ML algorithms may be employed. Finally, in the sentiment and emotion scoring step, the results from both the lexicon-based and ML-enhanced analyses are obtained to produce a comprehensive sentiment score for each text input. The scores include discrete emotions (emotion norms such as happiness, sadness, anger, etc.) scored on a scale reflecting intensity of each norm and its presence within the text, and dimensional emotions. The dimensional output is measured along axes valence (pleasant–unpleasant), arousal (activated–deactivated), and dominance (controlled–uncontrolled), providing a multidimensional view of the emotions expressed by the input text. The output is a detailed sentiment profile of the text, which includes both aggregate scores and detailed emotion metrics.
The Hybrid NLP model for sentiment analysis has five distinct advantages over other available models in the field:
  • Multidimensional emotion analysis: Unlike many traditional models, which only provide one-dimensional sentiment analysis, this hybrid model combines discrete and dimensional emotion theories. This allows the model to provide a more comprehensive appraisal of sentiments expressed in text.
  • N-gram flexibility: The model is intended to work with n-grams of varying lengths, from unigrams to bigrams and beyond, making it highly adaptable to different corpus sizes and preprocessing capabilities.
  • Language independence: Depending on the translation service used, the model can be applied to any language, making it ideal for global use. The accuracy of the translation service determines the quality of the sentiment analysis.
  • No need for training data: Unlike many ML-based NLP models, which require extensive datasets to train before being deployed, this hybrid model is pre-trained using existing emotion lexicons and does not require any additional training data. This feature enables its immediate deployment and application.
  • Input dataset reuse: The presented model also has an advantage in that it can repurpose existing input datasets created for various NLP applications. The model can perform sentiment analysis without having to generate or collect new specialized datasets. In the experiment, the model was efficient in reusing existing corpora of spelling corrections in Croatian as input for sentiment analysis [75].

4.1. Emotion Lexicons

Affective Norms for English Words (ANEW) is a textual dataset (lexicon) with emotional ratings for English words [72]. The ratings in the lexicon were created in an experiment using the Self-Assessment Manikin (SAM), a visual method for collecting subjective responses from participants in controlled conditions [76]. The ANEW lexicon contains 1034 rated words. The ratings follow the PAD model with scales for valence, arousal, and dominance. The participants could choose a rating from 1.0 to 9.0 for each evaluated word, and the collected ratings were averaged and statistically processed to obtain the aggregated dimensional emotion value for each word in the dataset. However, a potential issue with the ANEW is the limited number of words in the lexicon because text comprehension, and emotion elicitation from textual stimuli, becomes less significant if only a small number of words are recognized in the text (e.g., less than 10%). Therefore, an extension of ANEW, called XANEW (eXtended ANEW), that addresses this concern by encompassing 13,915 words was developed [73]. New words, not present in ANEW, were rated through crowdsourcing. Similar instructions were used for participants as in the creation of ANEW, without employing SAM.
Apart from ANEW and XANEW, the EmoLex was used to rate n-grams according to discrete emotion theories [74]. LemoLex includes 14,154 words and annotates them with 8 emotions from the Plutchik’s wheel: anger, fear, anticipation, trust, surprise, sadness, joy, and disgust [74]. It also includes labels for negative and positive sentiment for words, which are binary. Like XANEW, EmoLex was created by manual annotation on a crowdsourcing platform. Unlike previous datasets, EmoLex includes translations into more than 100 languages, including Croatian. It has been used for the analysis of emotions in Shakespearean characters [77], identifying the saddest songs by Radiohead [78], and researching emotions related to COVID-19 in India [79], among other applications.

4.2. N-Gram Datasets

The presented hybrid NLP model for sentiment analysis is based on n-grams collected from input texts received for spellchecking using the Croatian online spellchecker ispravi.me [80,81]. As already explained, ANEW, XANEW, and EmoLex lexicons were used by the hybrid NLP model to evaluate input documents. The input text dataset consisted of a subset of n-grams acquired by ispravi.me from October 2019 to March 2021. This period is significant as it allows for the comparison of sentiment and emotions in three distinct periods:
  • Before the COVID-19 virus spread and the earthquakes (October 2019–March 2020);
  • During the first wave of the pandemic and the Zagreb earthquake (March 2020–June 2020);
  • During the second wave of the pandemic and the Petrinja earthquake (August 2020–February 2021).
The n-grams were organized into textual files with filenames in the form “COVID-year-month-day-n”, where n is the n-gram’s order. The process of n-gram creation and preparation is explained in [81]. The data have not been filtered based on content, allowing for the tracking of the general trend of sentiment. This approach aims to provide an impression of the baseline measures of sentiment and emotions before documents mentioning COVID-19 appear.

4.3. Emotion Lexicon Processing

The processing of the emotion lexicon started by utilizing the Python data analysis library Pandas for the input of the dataset in comma-separated values (CSV) format [82]. The first step involved translating words into the Croatian language. For the translation, the Google Translate API through the googletrans library [83] and Microsoft’s Text Translation REST API [84] were employed. XANEW was loaded from a CSV file, and a column indicating the translation of words was added using the df.apply method for all rows of the Pandas DataFrame structure. Following translation into Croatian, lemmatization was performed using the CLASSLA library [85].
The CLASSLA library is built on the foundation of Stanford’s Stanza library, adapted for working with Slovenian, Croatian, Serbian, Macedonian, and Bulgarian languages. The library’s functions include tokenization, sentence splitting, part-of-speech tagging, lemmatization, dependency analysis, and named entity recognition [85].
Lemmatization is a process in which a word is transformed into its canonical form or lemma. It differs from stemming, which removes affixes from different word forms, resulting in the base or pseudoroot that is not a valid word by itself. The entire lemmatization process is illustrated in Figure 5. As can be seen in this figure, as an example the initial input word “addictive” from the XANEW dataset undergoes two different translations utilizing Google Translator and Microsoft’s automated translation services. This results in two different Croatian terms “ovisnički” and “zarazna” which are stored in two separate lexicons containing different translations of XANEW. The next step in the processing pipeline involves lemmatization and combining of both Croatian translations. While lemmatization has minimal impact on most words after translation, it was applied to ensure consistency between lexicon processing and document annotation and to address certain inconsistencies introduced by translators. The translation quality was assessed by verifying if the translated words were correct Croatian terms using the ispravi.me spellchecker, which showed that 12,076 words from Google’s translator and 11,721 words from Microsoft’s translator exist in the Croatian word dictionary. The verification involved manual checking if the translated words are indeed correct Croatian terms.
Since the EmoLex lexicon includes token translations from English into Croatian, only the second preprocessing step was applied, where the already translated words were lemmatized (Figure 6).

4.4. N-Grams Preprocessing

Preprocessing on n-grams was accomplished during the spellchecking process and n-grams were stored in a text file [81,86,87]. Using the tokenization and lemmatization functions of the CLASSLA library, the n-grams were processed, and lemmatized words were saved as the final result. Lemmas were recorded in lowercase. Simultaneously, stop words were removed using the stopwordsiso library [88]. The complete processing procedure is shown in Figure 7.

4.5. Model Creation and Application on the Experimental Dataset

Models are created as individual Python classes which receive the lexicon in the form of a Python dictionary. First, the lemmatized lexicon is loaded from a CSV file. Then, a hashing table is used where the words (lemmas) are set as dictionary keys, and the emotion ratings as dictionary values. To ensure unique keys in the dictionary, emotion ratings for English words were averaged into a single rating for the translated word in Croatian. Additionally, a Python Counter object was created which calculates how many times a distinct word was found in input texts to obtain token frequency.
As can be seen in Figure 8, the Model class has two methods: score and score_all. Both methods take as an input argument a text variable containing different words separated by commas:
  • The score method returns the average rating for the words in the input argument excluding words not found in the lexicon. Furthermore, the method returns reliability—a real number value indicating the percentage of words present in the lexicon.
  • The score_all method, includes the functionality of the score method and also returns a list with individual sentiments ratings for words in the input argument.
Words not found in the lexicon receive a sentiment rating of 0. This rating does not contribute to the overall text score but marks the position in the list of the word that did not receive a rating from the lexicon. Both methods increment the corresponding values of the Counter object when a word is detected. The Model object is saved as a pickle file (i.e., to be converted into a byte stream if needed). Two emotion dimensional models are created: one with Google’s translation of XANEW and the other with Microsoft’s translation of XANEW.
Figure 8 illustrates how the implemented decision algorithm for the dimensional model is applied on a specific input sentence “Model analizira moj tekst” (English: “The model analyzes my text”). The variable rating represents pleasure, arousal, and dominance for the entire input, while rating_list shows labels for individual words. In this example, it is assumed that the word “tekst” (English: “text”) is not present in the lexicon (resulting in a confidence of 0.67, and the last element in the list of ratings containing 0). The model with the discrete EmoLex lexicon functions in the same way, using vectors with eight dimensions to store each discrete emotion rating.
All models in this experiment are constructed using unigrams. The decision to focus on simpler unigram models in the Croatian language was made to prioritize testing their capabilities before moving on to creating and testing more complex n-gram lexicons. Lexicons that include bigrams or trigrams are only occasionally employed, and their development is more complex, particularly for the Croatian language.

5. Experimental Results

The discrete and dimensional emotion models were deployed on the n-gram dataset that represents public sentiment in response to the COVID-19 pandemic and the two major earthquakes that struck Croatia in 2020. The dataset was collected by the spellchecking service ispravi.me and analyzed for the period from October 2019 to March 2021. In total, the processed corpus contained 12,135,672 data files with 2,937,934,768 tokens (405,571,794 in 2019, 651,472,299 in 2020, and 1,880,890,675 in 2021).
The results were obtained by applying the model’s score function to preprocessed n-grams. Two lists were created for each day of the data set. The first list contains the n-gram ratings for each day, the second is a confidence list. The confidence list makes it possible to filter the scores and only consider the cases in which a significant proportion of the words recognized in the lexicon occur, thus ensuring the reliability and relevance of the undertaken analysis.
For result analysis and visualization, the Python seaborn library [89] was utilized, relying on matplotlib and Pandas DataFrame objects. To identify outliers (i.e., maximum or minimum values of discrete emotions and emotional dimensions detected in the corpus) in further analysis, z-scores are used [90]. The z-score is calculated as the difference between a value and the mean, divided by the standard deviation:
𝑧 = (𝑥 − μ)/σ
where 𝑥 represents an individual data point and μ is the mean value or average of all the data points in the dataset. Furthermore, σ denotes the standard deviation of the dataset, which is a measure of the dispersion or variability of the data points 𝑥 around the mean μ. A smaller standard deviation indicates that the data points tend to be closer to the mean, while a larger standard deviation indicates that the data points are spread over a wider range of values.
Outliers were detected on the following dates: 22 March, 25 December, and 28 December 2020, due to the Zagreb earthquake, COVID-19 maximum, and Petrinja earthquake, respectively. A detailed analysis of results is provided in Section 5.1 and Section 5.2.

5.1. Results Using the Dimensional Emotion Model

The presented analysis of the performance of the dimensional model used aggregated average sentiment scores on a daily, weekly, and monthly basis. The generated visualizations include a side-by-side comparison of the results of two versions of the model: one with Google’s translation service and the other with Microsoft’s.
This comparative analysis shows that the differences in the automatic translation services used do not have a significant impact on the overall results of the sentiment analysis. For the sake of clarity and consistency, the values of the model obtained with the Google translation service are used to explain the results of the experiment.
Figure 9 illustrates the development of active COVID-19 cases in Croatia. It shows the progression of the first outbreak (March to June 2020), followed by a subsequent increase (August 2020 to February 2021), which describes the first and second waves of the pandemic. As can be seen in Figure 9, there has been a drastic change in the valence between the second and third months. Although valence reached low values in October and November, its lowest value (val = 5.54) occurred in March 2020. The only week with an average valence below 5.50 (val = 5.47) was the week starting 16 March 2020, which was the week following the declaration of the pandemic and the first week of the closure of educational institutions.
Figure 10 displays the progress of the arousal emotion dimension, which reaches its minimum a few weeks after the lowest value of the valence dimension but exhibits an additional and noticeable decline from February to March 2020. In addition, Figure 11 shows that the dominance dimension dropped to its lowest value of dom = 5.46 in March, indicating a period in which individuals’ ability to effectively regulate their emotions decreased significantly. This convergence of results indicates a critical period of emotional upheaval that correlates with key phases of the pandemic.
The presented charts also facilitate an analysis of the recovery time—the time required for valence, arousal, and dominance values to return to pre-pandemic levels. Comfort and excitement reach a local maximum in August 2020, while dominance reaches its maximum in September 2020—indicating a normalization of the sentiment towards the coronavirus before the onset of the second wave. The second wave is most pronounced in the valence drop in November 2020.
However, the start of the second wave is clearly underlined by a significant dip in valence in November 2020. A closer look at the weekly average values reveals an interesting pattern: it takes around two months for the values for valence (val) and dominance (dom) to return to their pre-pandemic level. They rise from the values observed at the beginning of March (val = 5.61, dom = 5.49) to the values observed in the second week of May (val = 5.61, dom = 5.51). Arousal, on the other hand, indicates a more protracted path to baseline and does not return to the initial values until early August 2020.
The most emotionally negative day in the complete analyzed dataset was 22 March 2020, when a magnitude 5.5 earthquake occurred in Zagreb, with a valence value val = 5.32. The z-score for this day is z = −4.38, which is well above the commonly used z-score threshold of 3.0. The valence is also low (val = 5.44) on 29 December 2020, when a magnitude 6.2 earthquake occurred in Petrinja. The dominance also reaches its minimum (dom = 5.27) on the day of the earthquake in Zagreb, with z = −5.70. The difference between the two earthquakes and the pandemic can be seen on the arousal scale. On the day of the earthquake, the arousal value is ar = 4.21, the highest value for this month.
From this, it can be concluded that an earthquake, as a brief shocking event, elicits elevated arousal, while the pandemic, also a negative event, generally simulates emotions of lesser intensity.

5.2. Results Using the Discrete Emotional Model

The analysis results of the discrete model were obtained by employing the EmoLex corpus on the subset of texts related to the Croatian earthquakes in 2020. Emotions, as in the previous analysis of the dimensional model for COVID-19, are shown per day, week, and month. The results were described using the 8-axis Plutchik’s emotion model, which includes the emotion norms anger, fear, anticipation, trust, surprise, sadness, joy, and disgust.
Peak levels of discrete emotion anger (shown in Figure 12) are recorded on days experiencing earthquakes, with z-scores z = 4.70 and z = 5.21, respectively. In contrast, the onset of the pandemic marks a period of notably reduced anger, reflecting its minimal presence during the initial wave and the first lockdown. This aligns with the dimensional emotion analysis, as anger is categorized as a motivating emotion increasing arousal. On the other hand, discrete emotion fear (Figure 13) manifests itself both during the earthquake events and throughout the first wave of the pandemic, consistently with the COVID-19 analysis presented in the previous section.
During the first wave of the pandemic, happiness is particularly low, while sadness peaks on the days of the earthquake and in the following week after the Petrinja quake, as shown in (Figure 14). The emotions of anticipation and disgust remain relatively stable, with daily fluctuations showing no significant deviations from the norm (z-scores remain below 3 in absolute terms).
The statistical analysis shows that the feeling of happiness is not subject to strong daily fluctuations. However, it is obvious that this discrete emotion reaches its lowest point during the peak of the pandemic and rises again to pre-crisis levels in the breaks between these waves. As for surprise and trust, these emotion norms do not show significant fluctuations in relation to either the earthquakes or the pandemic, as shown in Figure 15. This pattern suggests a consistent emotional baseline that remains unaffected by these specific events.

6. Discussion

Concerning the sentiment analysis based on the dimensional emotion model, the analysis revealed a significant decrease in valence, arousal, and dominance in Croatia during the first wave of the pandemic, especially in the week of the closure of educational institutions. Minimal values of valence and dominance (5.47 and 5.42, respectively) were observed during that specific week. For the recovery process (i.e., the return of valence and dominance values to pre-pandemic levels), two months were required, but a subsequent decline in valence and dominance can be observed after recovery, at the beginning of the second wave of the pandemic. According to the discrete model, the emotion norms fear and sadness dominated during the COVID-19 pandemic.
Besides emotions related to the pandemic, prominent changes in dimensional emotion values were observed during the earthquakes in Zagreb in March 2020 and in Petrinja in December 2020. Earthquakes were characterized by discomfort, arousal, and dominance (i.e., the lack of control over the emotion stimulating event—as would be expected for a sudden earthquake). The main discrete emotions identified during earthquakes were sadness, fear, and anger.
Interestingly, the recovery period was significantly longer during the earthquakes than during the pandemic, lasting several months. This notable phenomenon may be ascribed to numerous aftershock seismic events of different intensities and the sensation of powerlessness, highlighting the enduring and significant influence of natural catastrophes on the psychological condition of those impacted. The enduring consequences of these ongoing seismic incidents, which were made worse by the ongoing global health crisis, presented a multifaceted description of societal distress and resilience.
Because of the absence of a suitable sentiment analysis lexicon for the Croatian language, which further complicated the development of the model and implementation of the experiment, automatic translation into English was required. Automatic translation was, therefore, required. The utilization of translated lexicons in sentiment analysis introduced the possibility of inaccuracies, which emphasizes the need to develop native language resources for sentiment analysis research. During the results dissemination, it became evident that even sophisticated automated translation services cannot capture every detail and linguistic specificity of the source language. This deficiency may have an adverse impact on the precision of sentiment analysis. We believe that the results would be even more representative and detailed if the Croatian lexicon were available.
Therefore, the development or adaptation of a dedicated Croatian sentiment lexicon would significantly improve the precision of sentiment analysis. Such a lexicon could better capture the details and cultural context of the Croatian language, allowing for a more accurate representation of semantics and emotion. This points to an important direction for future research and development in the field of NLP: the creation of comprehensive, language-specific sentiment lexicons that can support accurate sentiment analysis.

7. Conclusions and Future Work

In this study, a new lexicon-based sentiment analysis model was employed to analyze Croatian language data during the COVID-19 pandemic and two major earthquakes in 2020. The affective lexicons used were Extended ANEW, containing ratings in the form of a dimensional emotion model (valence, arousal, and dominance), and the NRC Word-Emotion Association Lexicon, with ratings in the form of an 8-axis discrete emotion model (anger, anticipation, disgust, fear, joy, sadness, surprise, trust). These existing lexicons were translated into Croatian using freely available automated services, and Python software modules were developed using these lexicons for sentiment analysis, as well as for evaluating and visualizing the results.
As explained in Section 4, the presented model is simple, versatile, and efficient in reusing existing corpora of spelling correction for sentiment analysis. Also, the model is extensible and can be generated with unigrams in its simplest form or can be expanded to incorporate n-word sequences.
The decision to use n-grams instead of a bag-of-words model not only enhances our current sentiment analysis capabilities, but also creates a solid foundation for incorporating advanced linguistic features such as embeddings in the future. By taking this proactive approach, we ensure that our model remains at the forefront of sentiment analysis technology and is prepared to adapt and grow with emerging computational techniques and theories.
In addition to the analysis of sentiments during long-term phenomena, under the conditions of a pandemic that has spread across a large region or even globally, such as was the case with COVID-19, the presented hybrid NLP model was used to detect different significant short-term societal events that significantly influence human emotions (i.e., earthquakes). By analyzing the emotional changes in texts utilized for spellchecking at Croatian online spellchecker ispravi.me during the COVID-19 pandemic and the earthquakes in Croatia during 2020, we have found that the presented model is capable of accurately capturing the intricacies of human emotions during natural disasters based on a corpus that was not initially developed for this purpose. This research contributes to expanding the field of sentiment analysis by presenting an approach that not only accounts for linguistic details, but also provides important insights into the complicated nature of emotional responses in times of various societal crises.
Furthermore, our research in underrepresented linguistic contexts points to the importance of developing and refining lexicon-based models for sentiment analysis in languages other than English. By incorporating and augmenting pre-existing standardized affective datasets to include the Croatian language, we have achieved a new and positive result in the development of more comprehensive and representative sentiment analysis tools.
The applicability of the presented hybrid model in addressing actual crises in the real world demonstrates its potential usefulness for policy makers, mental health professionals and crisis response groups. We believe that the model may provide valuable insights into public sentiment and emotional trends in societal crises that can be used to develop support strategies and targeted interventions to mitigate the psychological impact of such events.
In the context of future work and considering the results obtained, it would be advisable to continue research into the creation of large lexicons tailored to specific types of societal crisis and for specific languages. Such lexicons would improve the precision and practicality of sentiment analysis in different cultural and linguistic settings. Furthermore, exploring the possible fusion of more traditional ML techniques and novel large language model (LLM) deep learning methods could open up new opportunities to improve the precision and predictive power of sentiment analysis models.
It is important to note that this model relies on n-grams rather than the more traditional bag-of-words method for two important reasons that are closely related to its evolution. First, n-grams provide a richer linguistic context compared to bag-of-words models because they contain information about the order of tokens, not just their frequency. This facilitates understanding of the expressed context, which is frequently required for accurate interpretation of feelings and emotions in the text. Second, the authors plan to continually improve the model and incorporate text embeddings into future versions. Embeddings provide a comprehensive understanding of the meaning and usage patterns of words and phrases in a given corpus by representing them in a multidimensional space. n-grams are inherently better suited to the inclusion of embeddings than bag-of-words models, as they match the embeddings’ ability to understand context and sequence.
Looking even more into the future, it would be prudent to follow a more holistic approach in NLP where the advancement of AI could be enhanced by combining data-driven techniques with an understanding of inherent cognitive structures (contrast of two primary theories of knowledge acquisition—nativism vs. empiricism—in AI) [91]. This approach may have the potential to result in the creation of AI systems that are more resilient, flexible, and in tune with human cognition, enabling them to truly comprehend language rather than merely recognizing patterns [91]. It is also important to promote a dialog between various disciplines including cognitive science, linguistics, philosophy, and computer science in order to enhance AI research and practice in the field of NLP.

Author Contributions

Conceptualization, F.L. and M.H.; methodology, M.H. and G.G.; software, F.L.; validation, M.H. and G.G.; formal analysis, G.G.; investigation, F.L.; resources, M.H. and G.G.; data curation, G.G.; writing—original draft preparation, M.H., G.G. and F.L.; writing—review and editing, M.H. and G.G.; visualization, F.L. and G.G.; supervision, M.H. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors on request.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Hirschberg, J.; Manning, C.D. Advances in Natural Language Processing. Science 2015, 349, 261–266. [Google Scholar] [CrossRef] [PubMed]
  2. Nadkarni, P.M.; Ohno-Machado, L.; Chapman, W.W. Natural Language Processing: An Introduction. J. Am. Med. Inform. Assoc. 2011, 18, 544–551. [Google Scholar] [CrossRef] [PubMed]
  3. Collobert, R.; Weston, J. A Unified Architecture for Natural Language Processing. In Proceedings of the 25th international conference on Machine learning—ICML ’08, Helsinki, Finland, 5 July 2008; pp. 160–167. [Google Scholar]
  4. Carlson, L.A.; Hooten, W.M. Pain—Linguistics and Natural Language Processing. Mayo Clin. Proc. Innov. Qual. Outcomes 2020, 4, 346–347. [Google Scholar] [CrossRef] [PubMed]
  5. Fanni, S.C.; Febi, M.; Aghakhanyan, G.; Neri, E. Natural Language Processing. In Introduction to Artificial Intelligence; Springer International Publishing: Berlin/Heidelberg, Germany, 2023; pp. 87–99. [Google Scholar]
  6. Devika, M.D.; Sunitha, C.; Ganesh, A. Sentiment Analysis: A Comparative Study on Different Approaches. Procedia Comput. Sci. 2016, 87, 44–49. [Google Scholar] [CrossRef]
  7. Nandwani, P.; Verma, R. A Review on Sentiment Analysis and Emotion Detection from Text. Soc. Netw. Anal. Min. 2021, 11, 81. [Google Scholar] [CrossRef] [PubMed]
  8. Jurafsky, D.; Martin, J.H. Speech and Language Processing: An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition, 1st ed.; Prentice Hall PTR: Upper Saddle River, NJ, USA, 2000. [Google Scholar]
  9. Markušić, S.; Stanko, D.; Korbar, T.; Belić, N.; Penava, D.; Kordić, B. The Zagreb (Croatia) M5.5 Earthquake on 22 March 2020. Geosciences 2020, 10, 252. [Google Scholar] [CrossRef]
  10. Markušić, S.; Stanko, D.; Penava, D.; Ivančić, I.; Bjelotomić Oršulić, O.; Korbar, T.; Sarhosis, V. Destructive M6.2 Petrinja Earthquake (Croatia) in 2020—Preliminary Multidisciplinary Research. Remote Sens. 2021, 13, 1095. [Google Scholar] [CrossRef]
  11. Herak, M.; Herak, D.; Živčić, M. Which One of the Three Latest Large Earthquakes in Zagreb Was the Strongest—the 1905, 1906 or the 2020 One? Geofizika 2022, 38, 117–146. [Google Scholar] [CrossRef]
  12. Worldometer Croatia COVID—Coronavirus Statistics—Worldometer. Available online: https://www.worldometers.info/coronavirus/country/croatia/ (accessed on 8 February 2024).
  13. Džakula, A.; Banadinović, M.; Lovrenčić, I.L.; Vajagić, M.; Dimova, A.; Rohova, M.; Minev, M.; Scintee, S.G.; Vladescu, C.; Farcasanu, D.; et al. A Comparison of Health System Responses to COVID-19 in Bulgaria, Croatia and Romania in 2020. Health Policy 2022, 126, 456–464. [Google Scholar] [CrossRef]
  14. Atalić, J.; Uroš, M.; Šavor Novak, M.; Demšić, M.; Nastev, M. The Mw5.4 Zagreb (Croatia) Earthquake of March 22, 2020: Impacts and Response. Bull. Earthq. Eng. 2021, 19, 3461–3489. [Google Scholar] [CrossRef]
  15. Miranda, E.; Brzev, S.; Bijelic, N.; Arbanas, Ž.; Bartolac, M.; Jagodnik, V.; Lazarević, D.; Mihalić Arbanas, S.; Zlatović, S.; Acosta, A.; et al. Petrinja, Croatia December 29, 2020, Mw 6.4 Earthquake Joint Reconnaissance Report (JRR). 2021. Available online: https://www.research-collection.ethz.ch/handle/20.500.11850/465058 (accessed on 18 May 2024).
  16. Wikimedia Commons. 2020 Zagreb Earthquake. Available online: https://commons.wikimedia.org/wiki/File:2020_Zagreb_earthquake.jpg (accessed on 18 May 2024).
  17. Wikimedia Commons. 2020-12-29 Petrinja, Croatia M6.4 Earthquake Shakemap (USGS). Available online: https://commons.wikimedia.org/wiki/File:2020-12-29_Petrinja,_Croatia_M6.4_earthquake_shakemap_(USGS).jpg (accessed on 18 May 2024).
  18. Herak, M.; Herak, D.; Orlić, N. Properties of the Zagreb 22 March 2020 Earthquake Sequence. Geofizika 2022, 38, 93–116. [Google Scholar] [CrossRef]
  19. Herak, M.; Herak, D. Properties of the Petrinja (Croatia) Earthquake Sequence of 2020–2021—Results of Seismological Research for the First Six Months of Activity. Tectonophysics 2023, 858, 229885. [Google Scholar] [CrossRef]
  20. Peitl, V.; Golubić Zatezalo, V.; Karlović, D. Mental Health Issues and Psychological Crisis Interventions During the COVID-19 Pandemic and Earthquakes in Croatia. Arch. Psychiatry Res. 2020, 56, 193–198. [Google Scholar] [CrossRef]
  21. Horvat, M.; Stojanovic, A.; Kovacevic, Z. An Overview of Common Emotion Models in Computer Systems. In Proceedings of the 2022 45th Jubilee International Convention on Information, Communication and Electronic Technology (MIPRO), Opatija, Croatia, 23–27 May 2022; pp. 1008–1013. [Google Scholar]
  22. Horvat, M. A Brief Overview of Affective Multimedia Databases. In Proceedings of the Central European Conference on Information and Intelligent Systems, University of Zagreb Faculty of Organization and Informatics, Varaždin, Croatia, 27–29 September 2017; pp. 3–9. [Google Scholar]
  23. Horvat, M.; Jović, A.; Burnik, K. Assessing the Robustness of Cluster Solutions in Emotionally-Annotated Pictures Using Monte-Carlo Simulation Stabilized K-Means Algorithm. Mach. Learn. Knowl. Extr. 2021, 3, 435–452. [Google Scholar] [CrossRef]
  24. Horvat, M.; Jović, A.; Burnik, K. Investigation of Relationships between Discrete and Dimensional Emotion Models in Affective Picture Databases Using Unsupervised Machine Learning. Appl. Sci. 2022, 12, 7864. [Google Scholar] [CrossRef]
  25. Ekman, P.; Friesen, W.V. Constants across Cultures in the Face and Emotion. J. Pers. Soc. Psychol. 1971, 17, 124–129. [Google Scholar] [CrossRef] [PubMed]
  26. Ekman, P. An Argument for Basic Emotions. Cogn. Emot. 1992, 6, 169–200. [Google Scholar] [CrossRef]
  27. Plutchik, R. Emotion: A Psychoevolutionary Synthesis; Harper and Row: New York, NY, USA, 1980. [Google Scholar]
  28. Mohsin, M.A.; Beltiukov, A. Summarizing Emotions from Text Using Plutchik’s Wheel of Emotions. In Proceedings of the 7th Scientific Conference on Information Technologies for Intelligent Decision Making Support (ITIDS 2019), Ufa, Russia, 16–18 May 2019; Atlantis Press: Paris, France, 2019; pp. 291–294. [Google Scholar]
  29. Domínguez-Jiménez, J.A.; Campo-Landines, K.C.; Martínez-Santos, J.C.; Delahoz, E.J.; Contreras-Ortiz, S.H. A Machine Learning Model for Emotion Recognition from Physiological Signals. Biomed. Signal Process Control 2020, 55, 101646. [Google Scholar] [CrossRef]
  30. Lin, W.; Li, C. Review of Studies on Emotion Recognition and Judgment Based on Physiological Signals. Appl. Sci. 2023, 13, 2573. [Google Scholar] [CrossRef]
  31. Wassmann, C. Physiological Optics, Cognition and Emotion: A Novel Look at the Early Work of Wilhelm Wundt. J. Hist. Med. Allied Sci. 2009, 64, 213–249. [Google Scholar] [CrossRef]
  32. Buechel, S.; Hahn, U. Emotion Analysis as a Regression Problem–Dimensional Models and Their Implications on Emotion Representation and Metrical Evaluation. In Proceedings of the ECAI 2016, The Hague, The Netherlands, 29 August–2 September 2016; IOS Press: Amsterdam, The Netherlands, 2016; pp. 1114–1122. [Google Scholar]
  33. Russell, J.A. A Circumplex Model of Affect. J. Pers. Soc. Psychol. 1980, 39, 1161–1178. [Google Scholar] [CrossRef]
  34. Mehrabian, A.; Russell, J.A. An Approach to Environmental Psychology; M.I.T. Press: Cambridge, MA, USA, 1974; ISBN 9780262130905. [Google Scholar]
  35. Bakker, I.; van der Voordt, T.; Vink, P.; de Boon, J. Pleasure, Arousal, Dominance: Mehrabian and Russell Revisited. Curr. Psychol. 2014, 33, 405–421. [Google Scholar] [CrossRef]
  36. Watson, D.; Tellegen, A. Toward a Consensual Structure of Mood. Psychol. Bull. 1985, 98, 219–235. [Google Scholar] [CrossRef] [PubMed]
  37. Taboada, M.; Brooke, J.; Tofiloski, M.; Voll, K.; Stede, M. Lexicon-Based Methods for Sentiment Analysis. Comput. Linguist. 2011, 37, 267–307. [Google Scholar] [CrossRef]
  38. Hutto, C.; Gilbert, E. VADER: A Parsimonious Rule-Based Model for Sentiment Analysis of Social Media Text. Proc. Int. AAAI Conf. Web Soc. Media 2014, 8, 216–225. [Google Scholar] [CrossRef]
  39. Bos, T.; Frasincar, F. Automatically Building Financial Sentiment Lexicons While Accounting for Negation. Cogn. Comput. 2022, 14, 442–460. [Google Scholar] [CrossRef]
  40. Saif, H.; He, Y.; Fernandez, M.; Alani, H. Adapting Sentiment Lexicons Using Contextual Semantics for Sentiment Analysis of Twitter. In Proceedings of the Semantic Web: ESWC 2014 Satellite Events: ESWC 2014 Satellite Events, Anissaras, Crete, Greece, 25–29 May 2014; pp. 54–63. [Google Scholar]
  41. Admasu, T.T.; Raghavendra, R. Constructing Context-Aware Sentiment Lexicon for Amharic Language. In Computational Intelligence in Pattern Recognition: Proceedings of CIPR 2021; Springer: Singapore, 2022; pp. 379–388. [Google Scholar]
  42. Thelwall, M.; Buckley, K.; Paltoglou, G. Sentiment Strength Detection for the Social Web. J. Am. Soc. Inf. Sci. Technol. 2012, 63, 163–173. [Google Scholar] [CrossRef]
  43. Mohammad, S.M. Challenges in Sentiment Analysis. In A Practical Guide to Sentiment Analysis; Springer: Cham, Switzerland, 2017; pp. 61–83. [Google Scholar]
  44. Zhang, L.; Wang, S.; Liu, B. Deep Learning for Sentiment Analysis: A Survey. WIREs Data Min. Knowl. Discov. 2018, 8, e1253. [Google Scholar] [CrossRef]
  45. Medrouk, L.; Pappa, A. Deep Learning Model for Sentiment Analysis in Multi-Lingual Corpus. In Proceedings of the Neural Information Processing: 24th International Conference, ICONIP 2017, Guangzhou, China, 14–18 November 2017; pp. 205–212. [Google Scholar]
  46. Pang, B.; Lee, L. Opinion Mining and Sentiment Analysis. Found. Trends® Inf. Retr. 2008, 2, 1–135. [Google Scholar] [CrossRef]
  47. Hu, A.; Flaxman, S. Multimodal Sentiment Analysis To Explore the Structure of Emotions. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, London, UK, 19–23 July 2018; ACM: New York, NY, USA; pp. 350–358. [Google Scholar]
  48. Kumar, G.N. Sentiment Analysis in Facebook Using Machine Learning Techniques. Int. J. Res. Appl. Sci. Eng. Technol. 2019, 7, 1057–1062. [Google Scholar] [CrossRef]
  49. Shinde, G.K. Sentiment Analysis Using Hybrid Approach. Int. J. Res. Appl. Sci. Eng. Technol. 2021, 9, 282–285. [Google Scholar] [CrossRef]
  50. Shakeel, M.H.; Faizullah, S.; Alghamidi, T.; Khan, I. Language Independent Sentiment Analysis. In Proceedings of the 2019 International Conference on Advances in the Emerging Computing Technologies (AECT), Al Madinah Al Munawwarah, Saudi, 10 February 2020; pp. 1–5. [Google Scholar]
  51. Shah, D.; Isah, H.; Zulkernine, F. Predicting the Effects of News Sentiments on the Stock Market. In Proceedings of the 2018 IEEE International Conference on Big Data (Big Data), Seattle, WA, USA, 10–13 December 2018; pp. 4705–4708. [Google Scholar]
  52. Alzamzami, F.; Hoda, M.; El Saddik, A. Light Gradient Boosting Machine for General Sentiment Classification on Short Texts: A Comparative Evaluation. IEEE Access 2020, 8, 101840–101858. [Google Scholar] [CrossRef]
  53. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention Is All You Need. Adv. Neural Inf. Process. Syst. 2017, 30, 5998–6008. [Google Scholar]
  54. Dunder, I.; Horvat, M.; Lugovic, S. Word Occurrences and Emotions in Social Media: Case Study on a Twitter Corpus. In Proceedings of the 2016 39th International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO), Opatija, Croatia, 30 May–3 June 2016; pp. 1284–1287. [Google Scholar]
  55. Dunđer, I.; Horvat, M.; Lugović, S. Exploratory Study of Words and Emotions in Tweets of UK Startup Founders. In Proceedings of the Living in Crisis Mode: Time to Reconsider Definition, Meaning and Practice, Zagreb, Croatia, 9–10 May 2017; Verhoeven, P., Jugo, D., Jakopović, H., Eds.; Veleučilište Edward Bernays: Zagreb, Croatia, 2017; pp. 201–224. [Google Scholar]
  56. Zheng, L.; Wang, H.; Gao, S. Sentimental Feature Selection for Sentiment Analysis of Chinese Online Reviews. Int. J. Mach. Learn. Cybern. 2018, 9, 75–84. [Google Scholar] [CrossRef]
  57. Biggio, B.; Roli, F. Wild Patterns: Ten Years after the Rise of Adversarial Machine Learning. Pattern Recognit. 2018, 84, 317–331. [Google Scholar] [CrossRef]
  58. Babić, K.; Petrović, M.; Beliga, S.; Martinčić-Ipšić, S.; Matešić, M.; Meštrović, A. Characterisation of COVID-19-Related Tweets in the Croatian Language: Framework Based on the Cro-CoV-CseBERT Model. Appl. Sci. 2021, 11, 10442. [Google Scholar] [CrossRef]
  59. Gombar, P.; Medić, Z.; Alagić, D.; Šnajder, J. Debunking Sentiment Lexicons: A Case of Domain-Specific Sentiment Classification for Croatian. In Proceedings of the 6th Workshop on Balto-Slavic Natural Language Processing, Valencia, Spain, 4 April 2017; Association for Computational Linguistics: Stroudsburg, PA, USA, 2017; pp. 54–59. [Google Scholar]
  60. Vučković, M. Haters vs. Lovers on Facebook. Suvremene Teme 2021, 12, 27–48. [Google Scholar] [CrossRef]
  61. Vindegaard, N.; Benros, M.E. COVID-19 Pandemic and Mental Health Consequences: Systematic Review of the Current Evidence. Brain Behav. Immun. 2020, 89, 531–542. [Google Scholar] [CrossRef] [PubMed]
  62. Levkovich, I.; Shinan-Altman, S. Impact of the COVID-19 Pandemic on Stress and Emotional Reactions in Israel: A Mixed-Methods Study. Int. Health 2021, 13, 358–366. [Google Scholar] [CrossRef]
  63. Mazza, C.; Ricci, E.; Biondi, S.; Colasanti, M.; Ferracuti, S.; Napoli, C.; Roma, P. A Nationwide Survey of Psychological Distress among Italian People during the COVID-19 Pandemic: Immediate Psychological Responses and Associated Factors. Int. J. Environ. Res. Public. Health 2020, 17, 3165. [Google Scholar] [CrossRef]
  64. Jones, R.; Mougouei, D.; Evans, S.L. Understanding the Emotional Response to COVID-19 Information in News and Social Media: A Mental Health Perspective. Hum. Behav. Emerg. Technol. 2021, 3, 832–842. [Google Scholar] [CrossRef] [PubMed]
  65. Zhong, B.; Huang, Y.; Liu, Q. Mental Health Toll from the Coronavirus: Social Media Usage Reveals Wuhan Residents’ Depression and Secondary Trauma in the COVID-19 Outbreak. Comput. Hum. Behav. 2021, 114, 106524. [Google Scholar] [CrossRef] [PubMed]
  66. Bitkina, O.V.; Park, J. Emotional State and Social Media Experience: A Pandemic Case Study. Sustainability 2021, 13, 13311. [Google Scholar] [CrossRef]
  67. Amicucci, G.; Salfi, F.; D’Atri, A.; Viselli, L.; Ferrara, M. The Differential Impact of COVID-19 Lockdown on Sleep Quality, Insomnia, Depression, Stress, and Anxiety among Late Adolescents and Elderly in Italy. Brain Sci. 2021, 11, 1336. [Google Scholar] [CrossRef] [PubMed]
  68. Pivac, Z. The Impact of COVID-19 Pandemic on General Population Mental Health. Diploma Thesis, University of Zagreb, School of Medicine, Zagreb, Croatia, 2022. [Google Scholar]
  69. Mihalec, M. News Avoidance and the Psychological Impact of COVID-19 and Earthquakes in Croatia. Diploma Thesis, University of Zagreb, Faculty of Political Science, Zagreb, Croatia, 2022. [Google Scholar]
  70. Kim, E.H.-J.; Jeong, Y.K.; Kim, Y.; Kang, K.Y.; Song, M. Topic-Based Content and Sentiment Analysis of Ebola Virus on Twitter and in the News. J. Inf. Sci. 2016, 42, 763–781. [Google Scholar] [CrossRef]
  71. Ji, X.; Chun, S.A.; Wei, Z.; Geller, J. Twitter Sentiment Classification for Measuring Public Health Concerns. Soc. Netw. Anal. Min. 2015, 5, 13. [Google Scholar] [CrossRef]
  72. Bradley, M.M.; Lang, P.J. Affective Norms for English Words (ANEW): Instruction Manual and Affective Ratings. Tech. Rep. 1999, 30, 25–36. [Google Scholar]
  73. Warriner, A.B.; Kuperman, V.; Brysbaert, M. Norms of Valence, Arousal, and Dominance for 13,915 English Lemmas. Behav. Res. Methods 2013, 45, 1191–1207. [Google Scholar] [CrossRef]
  74. Mohammad, S.M.; Turney, P.D. Crowdsourcing a Word-Emotion Association Lexicon. Comput. Intell. 2013, 29, 436–465. [Google Scholar] [CrossRef]
  75. Horvat, M.; Gledec, G.; Jagušt, T.; Kalafatić, Z. Knowledge Graph Dataset for Semantic Enrichment of Picture Description in NAPS Database. Data 2023, 8, 136. [Google Scholar] [CrossRef]
  76. Bradley, M.M.; Lang, P.J. Measuring Emotion: The Self-Assessment Manikin and the Semantic Differential. J. Behav. Ther. Exp. Psychiatry 1994, 25, 49–59. [Google Scholar] [CrossRef] [PubMed]
  77. Yavuz, M.C. Analyses of Character Emotions in Dramatic Works by Using EmoLex Unigrams. In Proceedings of the Seventh Italian Conference on Computational Linguistics CLiC-it 2020, Bologna, Italy, 1–3 March 2021. [Google Scholar]
  78. Thompson, C. FitteR HappieR: Finding the Most Depressing Radiohead Song with R, Using the Spotify and Genius Lyrics APIs. Available online: https://www.rcharlie.com/blog/fitter-happier/ (accessed on 7 February 2024).
  79. Gupta, V.; Jain, N.; Katariya, P.; Kumar, A.; Mohan, S.; Ahmadian, A.; Ferrara, M. An Emotion Care Model Using Multimodal Textual Analysis on COVID-19. Chaos Solitons Fractals 2021, 144, 110708. [Google Scholar] [CrossRef] [PubMed]
  80. Ispravi.me Croatian Academic Spellchecker. Available online: https://ispravi.me/ (accessed on 12 April 2023).
  81. Dembitz, Š.; Gledec, G.; Sokele, M. An Economic Approach to Big Data in a Minority Language. Procedia Comput. Sci. 2014, 35, 427–436. [Google Scholar] [CrossRef]
  82. The Pandas Development Team Pandas 2.2.0. Available online: https://pypi.org/project/pandas/ (accessed on 8 February 2024).
  83. Han, S. Googletrans 3.0.0. Available online: https://pypi.org/project/googletrans/ (accessed on 8 February 2024).
  84. Microsoft Microsoft Text Translation REST API. Available online: https://learn.microsoft.com/en-us/azure/ai-services/translator/reference/rest-api-guide (accessed on 8 February 2024).
  85. Ljubešić, N.; Dobrovoljc, K. What Does Neural Bring? Analysing Improvements in Morphosyntactic Annotation and Lemmatisation of Slovenian, Croatian and Serbian. In Proceedings of the 7th Workshop on Balto-Slavic Natural Language Processing, Florence, Italy, 2 August 2019; Association for Computational Linguistics: Stroudsburg, PA, USA, 2019; pp. 29–34. [Google Scholar]
  86. Gledec, G.; Šoić, R.; Dembitz, Š. Dynamic N-Gram System Based on an Online Croatian Spellchecking Service. IEEE Access 2019, 7, 149988–149995. [Google Scholar] [CrossRef]
  87. Dembitz, Š.; Gledec, G.; Blašković, B. Architecture of Hascheck–An Intelligent Spellchecker for Croatian Language. In Proceedings of the International Conference on Knowledge-Based and Intelligent Information and Engineering Systems, Berlin, Heidelberg, Germany, 8–10 September 2010; Springer: Berlin/Heidelberg, Germany, 2010; pp. 292–301. [Google Scholar]
  88. Suriyawongkul, A. Stopwordsiso 0.6.1. Available online: https://pypi.org/project/stopwordsiso/ (accessed on 8 February 2024).
  89. Waskom, M. Seaborn: Statistical Data. Visualization. Available online: https://seaborn.pydata.org/ (accessed on 19 February 2024).
  90. Cooksey, R.W. Descriptive Statistics for Summarising Data. In Illustrating Statistical Procedures: Finding Meaning in Quantitative Data; Springer: Singapore, 2020; pp. 61–139. [Google Scholar]
  91. Ranaldi, L.; Pucci, G. Knowing Knowledge: Epistemological Study of Knowledge in Transformers. Appl. Sci. 2023, 13, 677. [Google Scholar] [CrossRef]
Figure 1. Reported active cases of coronavirus infections in Croatia during the period March 2020–February 2021 [12].
Figure 1. Reported active cases of coronavirus infections in Croatia during the period March 2020–February 2021 [12].
Electronics 13 01991 g001
Figure 2. Seismic maps and proximity locations within densely populated areas for two major earthquakes that struck Croatia in 2020 during the COVID-19 pandemic: (a) Zagreb earthquake in March 2020 [16]; (b) Petrinja earthquake in December 2020 [17]. Reproduced with permission from Wikimedia Commons [16,17].
Figure 2. Seismic maps and proximity locations within densely populated areas for two major earthquakes that struck Croatia in 2020 during the COVID-19 pandemic: (a) Zagreb earthquake in March 2020 [16]; (b) Petrinja earthquake in December 2020 [17]. Reproduced with permission from Wikimedia Commons [16,17].
Electronics 13 01991 g002
Figure 3. Relationship between the dimensional and discrete emotion models.
Figure 3. Relationship between the dimensional and discrete emotion models.
Electronics 13 01991 g003
Figure 4. Hybrid NLP model for sentiment analysis workflow.
Figure 4. Hybrid NLP model for sentiment analysis workflow.
Electronics 13 01991 g004
Figure 5. Diagram of the XANEW dimensional lexicon processing pipeline.
Figure 5. Diagram of the XANEW dimensional lexicon processing pipeline.
Electronics 13 01991 g005
Figure 6. Diagram of the EmoLex discrete lexicon processing pipeline.
Figure 6. Diagram of the EmoLex discrete lexicon processing pipeline.
Electronics 13 01991 g006
Figure 7. Diagram of the COVID-19 n-gram dataset preprocessing.
Figure 7. Diagram of the COVID-19 n-gram dataset preprocessing.
Electronics 13 01991 g007
Figure 8. The dimensional model’s decision algorithm is applied to a specific input sentence. “Model analizira moj tekst” (English: “The model analyzes my text”) is normalized to a list “model, analizirati, tekst” (English: “model, analyze, text”) using tokenization and lemmatization prior to selecting the desired dimensional model.
Figure 8. The dimensional model’s decision algorithm is applied to a specific input sentence. “Model analizira moj tekst” (English: “The model analyzes my text”) is normalized to a list “model, analizirati, tekst” (English: “model, analyze, text”) using tokenization and lemmatization prior to selecting the desired dimensional model.
Electronics 13 01991 g008
Figure 9. Progression of the emotional dimension valence by day (first row) and week (second row) between October 2019 and March 2021.
Figure 9. Progression of the emotional dimension valence by day (first row) and week (second row) between October 2019 and March 2021.
Electronics 13 01991 g009
Figure 10. Progression of the emotional dimension arousal by day (first row) and week (second row) between October 2019 and March 2021.
Figure 10. Progression of the emotional dimension arousal by day (first row) and week (second row) between October 2019 and March 2021.
Electronics 13 01991 g010
Figure 11. Progression of the emotional dimension dominance by day (first row) and week (second row) between October 2019 and March 2021.
Figure 11. Progression of the emotional dimension dominance by day (first row) and week (second row) between October 2019 and March 2021.
Electronics 13 01991 g011
Figure 12. Discrete emotions anger (left) and anticipation (right) by day (first row) and week (second row) in relation to Croatia 2020 earthquakes between October 2019 and March 2021.
Figure 12. Discrete emotions anger (left) and anticipation (right) by day (first row) and week (second row) in relation to Croatia 2020 earthquakes between October 2019 and March 2021.
Electronics 13 01991 g012
Figure 13. Discrete emotions disgust (left) and fear (right) by day (first row) and week (second row) in relation to Croatia 2020 earthquakes between October 2019 and March 2021.
Figure 13. Discrete emotions disgust (left) and fear (right) by day (first row) and week (second row) in relation to Croatia 2020 earthquakes between October 2019 and March 2021.
Electronics 13 01991 g013
Figure 14. Discrete emotions joy (left) and sadness (right) by day (first row) and week (second row) in relation to Croatia 2020 earthquakes between October 2019 and March 2021.
Figure 14. Discrete emotions joy (left) and sadness (right) by day (first row) and week (second row) in relation to Croatia 2020 earthquakes between October 2019 and March 2021.
Electronics 13 01991 g014
Figure 15. Discrete emotions surprise (left) and trust (right) by day (first row) and week (second row) in relation to Croatia 2020 earthquakes between October 2019 and March 2021.
Figure 15. Discrete emotions surprise (left) and trust (right) by day (first row) and week (second row) in relation to Croatia 2020 earthquakes between October 2019 and March 2021.
Electronics 13 01991 g015
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Horvat, M.; Gledec, G.; Leontić, F. Hybrid Natural Language Processing Model for Sentiment Analysis during Natural Crisis. Electronics 2024, 13, 1991. https://doi.org/10.3390/electronics13101991

AMA Style

Horvat M, Gledec G, Leontić F. Hybrid Natural Language Processing Model for Sentiment Analysis during Natural Crisis. Electronics. 2024; 13(10):1991. https://doi.org/10.3390/electronics13101991

Chicago/Turabian Style

Horvat, Marko, Gordan Gledec, and Fran Leontić. 2024. "Hybrid Natural Language Processing Model for Sentiment Analysis during Natural Crisis" Electronics 13, no. 10: 1991. https://doi.org/10.3390/electronics13101991

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop