Open access peer-reviewed chapter

Citizen Sentiment Analysis

Written By

Yohei Seki

Reviewed: 28 August 2023 Published: 18 October 2023

DOI: 10.5772/intechopen.113030

From the Edited Volume

Advances in Sentiment Analysis - Techniques, Applications, and Challenges

Edited by Jinfeng Li

Chapter metrics overview

53 Chapter Downloads

View Full Metrics

Abstract

Recently, the co-creation process between citizens and local governments has become increasingly significant as a mechanism for addressing administrative concerns, such as public facility maintenance, disaster response, and overall administrative improvement driven by citizen feedback. Social media platforms have been recognized as effective tools to facilitate this co-creation process. Compared to traditional methods like surveys and public comment solicitations, social listening is deemed superior for obtaining authentic and naturally articulated citizen voices. However, there is a noticeable lack of research concerning the gathering of opinions specifically related to municipal issues via platforms like X (Twitter). This study seeks to address this gap by presenting an original methodology for analyzing citizen opinions through the deployment of large language models. Utilizing these models, we introduce three distinct applications based on our framework, each considering a different opinion typology. We demonstrate that our approach enables the analysis and comparison of citizen sentiments across various cities in relation to common political issues, tailoring the analysis to diverse goal types. The results of this research not only contribute to the understanding of citizen engagement via social media but also provide valuable insights into potential applications of large language models for municipal-related opinion analysis.

Keywords

  • sentiment analysis
  • social listening
  • X (Twitter)
  • citizen engagement
  • large language models

1. Introduction

Citizen cooperation has become indispensable in recent years in local government administration as a way to reduce administrative costs. The advent of communication through social networking sites (SNS) has enabled citizens to identify and tackle administrative issues such as the repair of public facilities, graffiti removal, and disaster countermeasures, akin to the Open311 platform1.

However, citizen participation is paramount in the decision-making process of local government administration. Traditional methods of collecting opinions, such as questionnaires and public comments, have inherent limitations, including a limited participant pool and the influence of vocal individuals. As a solution, the potential of public opinion analysis using SNSs like X (formerly known as Twitter) has been acknowledged.

For an authentic collection of citizen opinions, it is crucial to garner opinions from specific municipalities through social media platforms. While participation in region-specific SNSs might be low, platforms like X with a larger user base can serve as a useful tool for collecting and analyzing citizen opinions on administrative issues. In Section 3.2, we introduce a strategy to amass citizen sentiment in a specific city.

Given the age group bias in X participation, directly incorporating citizen opinions from X into public administration might not be feasible. Hence, it is crucial to comparatively analyze these opinions with those from other cities. While city comparisons are necessary, there is a dearth of studies that collect and compare tweets from multiple cities using a social listening approach. To address this gap, we introduce a general framework in Section 3. In Sections 4, 5, and 6, we also present research on citizen sentiment across cities through three concrete applications, linking it to real-world scenarios.

While sentiment and polarity analysis have traditionally been used for product reviews and X trends, it is vital to assess citizens’ attitudes toward the target of their opinions when analyzing their authentic voices. This requires annotated corpora with detailed information, tailored to the application’s goal. We introduce three types of opinion typology in line with the application’s objective.

Collecting opinions on specific administrative issues from SNS poses challenges due to the diverse range of topics discussed. It’s not only important to collect opinions with relevant keywords but also to consider and analyze them within the context of the administrative issue at hand. As facility and event names related to administrative issues vary from city to city, creating tailored training data for opinion analysis for each city and administrative topic is desirable, albeit cost-intensive.

This chapter details the research conducted to address these challenges, emphasizing the use of large-scale language models and fine-tuning approaches for citizen opinion analysis. Our work builds on the studies by [1, 2] and explores the application of these methods in citizen sentiment analysis.

Advertisement

2. Related works

Sentiment analysis or opinion mining has been conducted for a long time [3]. The first target document genre is newspaper [4], product review [5], or blogs [6]. Then, social media such as Twitter (now called X) became the main target to conduct public opinion analysis [7, 8]. Recently, social media sentiment analysis has been extended to applications focused on public service [9]. In this section, we discuss two types of related works from the two viewpoints as follows: (a) applications of citizen sentiment analysis and (2) opinion typology used for citizen sentiment analysis.

2.1 Application of citizen sentiment analysis

Citizen sentiment analysis has been a focal point since 2010 [8]. Subsequently, researchers have explored citizen comments in various domains, such as urban projects [10], reactions to government secretary accounts [11], and responses to the COVID-19 pandemic [12], all of which have proven to be effective target domains.

Alizadeh et al. [10] conducted research to collect citizen opinions for informing local government decision-making. They gathered tweets using project-specific hashtags or query keywords. Hubert et al. [11], on the other hand, explored citizen comments in response to tweets posted by five secretaries of the Government of Mexico.

In contrast, our method focuses on collecting more generalized citizen opinions relevant to political issues across different cities. We collected citizen comments based on the city using the approach described in Section 3.2. Additionally, we extracted citizen responses using broader query keywords related to political issues, including those pertaining to COVID-19 infections. This approach allows us to gain insights into the broader sentiments and opinions of citizens across cities on various political matters, offering valuable information for decision-making and policy analysis.

2.2 Opinion typology used for citizen sentiment analysis

Opinion analysis on Twitter (X) has attracted significant attention from numerous researchers, primarily focusing on the classification of emotions in tweets [13, 14, 15]. Dini et al. [13], for instance, challenged the conventional assumption that all tweets inherently express opinions and consequently introduced a task for identifying non-opinionated tweets. In contrast, Jabreel et al. [14] designed a classification task to identify a single emotion and proposed an attention-based technique for recognizing multiple emotions within a tweet.

These pioneering studies have advanced Twitter opinion analysis, exploring diverse aspects such as emotion classification and identification of opinion-expressing tweets. However, they primarily focus on polarity [16] and emotion classification [13, 14, 15, 17], which we argue, may not fully represent the breadth and complexity of citizens’ opinions expressed on X.

In response to this gap, we propose a unique framework for citizen sentiment analysis. After presenting a common framework for this in Section 3, we introduce a set of opinion typologies tailored for different applications. These include eliciting feedback from citizens (Section 4), comparing policy discussion trends with city council members (Section 5), and estimating social connections among citizens (Section 6). We argue that these typologies offer a more nuanced understanding of citizen sentiment, enabling the extraction and organization of citizen feedback by analyzing tweets from a variety of perspectives.

Advertisement

3. Citizen sentiment analysis framework

3.1 Our framework overview

We present a sentiment analysis framework designed for analyzing citizen comments, consisting of four stages as shown in Figure 1.

  1. Crawling city-specific citizen tweets,

  2. Classifying comments using an opinion typology applied via large language models,

  3. Consolidating opinions based on assigned labels, and

  4. Comparing temporal civic sentiment trends across cities.

Figure 1.

Our citizen sentiment analysis framework.

The framework begins with the collection of city-specific tweets. These tweets are then categorized using a custom opinion typology implemented via a fine-tuned large language model. This typology, informed by the application’s purpose, allows for a nuanced analysis of public sentiment. Next, we consolidate the categorized opinions based on their assigned labels within specific timeframes for each city. Finally, we visualize and compare the temporal trends of civic sentiment across different cities.

The methodology of the tweet collection stage is detailed in Section 3.2. The subsequent stages are discussed in relation to three applications: extracting civic feedback (Section 4), comparing citizens’ and city councilors’ opinions (Section 5), and estimating social capital (Section 6).

3.2 Crawling citizen comments

In recent years, X (Twitter) has become a prominent platform for capturing citizen sentiments and opinions. Extracting relevant accounts from this vast social media platform is essential to gain valuable insights into local issues. This section introduces a method for efficiently crawling citizen comments on X, with a focus on city-level residents. To crawl citizen comments, we have proposed a methodology to collect citizen accounts from X using profile information [18].

3.2.1 Seeded resident account collection

We define a method to collect citizen accounts by leveraging profile information. This method involves matching district names with user profiles to gather seeded resident accounts. Japan’s Twitter user profile search service2 plays a crucial role in extracting the initial set of seed accounts.

3.2.2 Account extension

To enhance the scope of our extracted accounts, we propose extensions based on followers’ characteristics. These extensions are subjected to three specific constraints: the maximum number of followers (3000), the maximum number of friends (4000), and the minimum number of followers of the seed account. The first two constraints were set to exclude famous people or bot accounts. By applying these constraints, we ensure that the extended accounts remain relevant and representative of city-level residents.

3.2.3 Preliminary experiment: Tsukuba City

For evaluation purposes, we conducted a preliminary experiment in Tsukuba City, Japan, a city with a population of approximately 250,000. In this experiment, we targeted accounts relevant to Tsukuba City and extended them based on twice the number of followers (i.e., the followers of followers of followers). Additionally, we randomly selected 200 citizen accounts and manually annotated their career types.

3.2.4 Results and discussion

The results of the manual annotations are presented in Figure 2, indicating a substantial representation of residential users among the extracted accounts. This observation aligns with Tsukuba City’s demographic, which mainly consists of students due to its status as a academic city. The proposed X account extraction method proves effective in gathering citizen comments from city-level residents. By leveraging profile information and applying follower-based extensions, we obtained a significant dataset of valid residential users. The method’s reliability and applicability are demonstrated through the case study in Tsukuba City, providing valuable insights for understanding local opinions and sentiments on X and other social media platforms.

Figure 2.

Career type rate in Tsukuba city.

Advertisement

4. Application (1): extraction of citizen feedback

In this section, we describe the application to extract citizen feedback for local government administration. This work is based on our paper [1].

4.1 Goal

Obtaining citizens’ feedback is crucial for enhancing local government and nongovernmental customer service initiatives and mitigating infectious disease spread, thereby promoting a vibrant social life. Current systems, like public comment platforms and council membership competitions, have limitations in attracting sufficient residents and may be biased toward certain attitudes. To address this, a new method is proposed for acquiring a large volume of unbiased and experienced citizen feedback.

The study introduces a novel approach to extract citizens’ opinions from X, where users express diverse thoughts daily. Unlike conventional studies focusing on polarity and emotion classification, this research adopts appraisal theory [19] to categorize various opinions, thereby enabling a comprehensive analysis. A large language model (LLM) is utilized to analyze tweets from multiple perspectives and extract citizen feedback based on specific conditions.

By adopting this new approach, local governments and nongovernmental entities can obtain a diverse range of citizen opinions, leading to better policy guidance and service improvement. The proposed method enables policymakers to gain valuable insights into public sentiment during the pandemic, fostering more effective and inclusive decision-making processes.

4.2 Opinion typology for extracting citizen feedback

This study introduces a novel methodology for gleaning citizens’ opinions from the prominent social media platform, X. Capitalizing on the platform’s user interaction diversity, we conveniently capture a broad range of civic sentiments. Our method hinges on three attitude categories derived from appraisal theory: affect (e.g., satisfaction or dissatisfaction), judgment of behavior (e.g., staff performance evaluation), and appreciation (e.g., assessment of facilities or products). This approach empowers us to probe into the varied opinions expressed by citizens on X, differentiating feedback according to informational needs, as depicted in Figure 3.

Figure 3.

Appraisal opinion type for extracting citizen feedback.

To overcome the limitations of existing studies, which often overlook opinions and attitudes toward society, we propose analyzing citizens’ opinions from multiple viewpoints, including appraisal opinion types, while also examining their chronological appearance frequency. By doing so, we aim to better understand citizens’ opinions and attitudes toward society within specific time ranges during the COVID-19 pandemic. This comprehensive approach will yield a more holistic and nuanced understanding of public sentiment, thereby aiding policymakers and researchers in developing effective strategies and policies to address societal concerns.

Additionally, we address the absence of linguistic modality and speech act theory categories in appraisal theory by introducing the “communication opinion type” viewpoint. Furthermore, within the “attitude” category of appraisal theory, the value of the category combines both positive and negative opinions without distinction. To rectify this, we define the “polarity” viewpoint.

In summary, the opinion typology used in this study is presented in Table 1.

Opinion typeValue
Polaritypositive, negative, neutral, N/A
Appraisalaffect, judgment, appreciation, N/A
Communicationspeculation, suggestion, question, request, N/A

Table 1.

Opinion typology used in our study [1].

4.3 Methodology

We used a common LLM to simultaneously estimate the three viewpoints (polarity/appraisal/communication opinion types) of the opinion unit. The three viewpoints of the opinion units refer to the same opinion. Therefore, we assumed that these estimation tasks relate to each other and show their effectiveness of the multitask learning approach [20] for estimation tasks. By performing multiple tasks concurrently using a shared model, we performed that higher F1-scores were achieved compared to independent task performance significantly. This multitasks learning approach enhances opinion extraction accuracy. In the first paper [1], we used BERT model [21] as a pretrained LLM. In the later version [22], we updated our model using T5 model [23], because it was an LLM which leveraged a unified approach to treat all NLP tasks as a “text-to-text” problem, and was also suitable for multitask learning.

In addition, comparing citizen opinions across different cities is crucial to discern whether sentiments expressed are specific to the analyzed city or shared among citizens in diverse locations. However, variations in municipal policies and hospitality services necessitate creating another data for training citizen opinion extraction models in each city of interest. Creating training data for all cities incurs high costs, rendering such an approach unrealistic.

To address this challenge, in our work [22], we proposed a method for extracting citizen opinions in a target city by leveraging data from a city with pre-constructed training data (referred to as the source city) alongside a relatively small amount of data from the target city. Specifically, we utilized the confidence levels of predictions made on the target city’s data by a model fine-tuned on the source city’s data to effectively select the target city’s training data. The proposed method reduces the cost of creating training data to approximately half of that required for extracting citizen opinions from an entirely new city. The steps of our proposed method are illustrated in Figure 4.

Figure 4.

Selecting comments for labeling in target with confidence level.

In our experiments, annotating the top 50% of unlabeled tweets with confidence levels and applying fine-tuning to adapt to the target city outperformed methods that randomly selected 50% or the bottom 50% of unlabeled tweets significantly in terms of F1 score. Additionally, we observed no significant difference in estimation accuracy in terms of F1-score when compared to the estimation of opinion types using 100% of unlabeled data in the target cities as labeled training data for fine-tuning as an upper bound. Therefore, this approach allows us to discern sentiments across different cities more efficiently and cost-effectively.

4.4 Comparing citizen feedback across different cities

In this study, we conducted an analysis to extract citizens’ opinions specific to target cities, using nursery school services as an example, in the government-designated cities of Yokohama and Sapporo in Japan. Specifically, we focused on citizens’ opinions expressing parental sentiments in Yokohama during the early period of the COVID-19 disaster in April 2020. The results revealed that Yokohama citizens who are raising children expressed dissatisfaction (“affect”) with the city’s policy to open daycare centers during this period. These opinions were specific to Yokohama residents and hold potential value for the city in improving its policies.

In contrast, the opinions of Sapporo citizens displayed a noteworthy trend, with a significant proportion consisting of evaluations (“appreciation”) concerning various aspects, including events and things. This allowed us to extract opinions expressing confusion about the current situation of nursery schools remaining open during the COVID-19 pandemic, as well as opinions about specific events, such as cases of discrimination against infected people occurring at nursery schools. These tweets provided valuable insights for proposing policy improvements, as they shed light on specific events that citizens were troubled by and allowed us to discern areas where improvements could be made.

Our analysis highlighted the significance of extracting location-specific citizen opinions, as it provides valuable feedback for local governments to enhance policy decision-making processes and address citizens’ concerns effectively.

Advertisement

5. Application (2): comparison of stances for citizens with city councilors

In this section, we introduce the application of citizens’ stances analysis for political issues to compare with the stances of city councilors, with referring to [2].

5.1 Goal

In local governance, analyzing the disparities in citizens’ and city councilors’ opinions on political matters is vital for representing the people’s will in politics and fostering citizen engagement. With the abundance of citizens expressing their views on X and city councils sharing meeting minutes as open data on the web, digital archives offer valuable resources for opinion analysis.

In this study, we propose and evaluate a method for automatically predicting stances in citizen tweets and city council minutes, subsequently aggregating the percentages of “favor” or “against” for each city. By comparing the results for each city, we ascertain the distinct characteristics of citizens and city councilors, underscoring the significance and efficacy of our approach.

5.2 Attribute type for comparing stances

In our study, the dataset constructed may encompass texts unrelated to political issues. To address this, we performed annotations not only for “stance” but also for “relevance” to the political matter. Additionally, for a more in-depth opinion analysis, we further annotated two attributes: “usefulness,” indicating whether the texts include specific information and evidence, and “regional dependency,” determining if they are connected to the place of residence. An overview of the attribute typology employed in this research is presented in Table 2.

Attribute TypeValue
Stancefavor, against, N/A
Usefulnessyes, N/A
Regional dependencyyes, N/A
Relevanceyes, N/A

Table 2.

Attribute typology used in our study [2].

5.3 Methodology

In our dataset, some texts do not explicitly mention political issues but contain opinions on them, while others seem to express opinions on unrelated topics. To achieve accurate stance prediction, it becomes crucial to account for the relevance of the political issue. Thus, in this study, we employed multitask learning [20] to simultaneously train the stance and relevance attributes. Moreover, considering the interconnected nature of the usefulness and regional dependency attributes with relevance, we also employed multitask learning, training them together with relevance. By adopting this multitask approach, we enhance the model’s ability to capture the intricacies and dependencies among attributes, leading to more accurate and comprehensive predictions of stance, relevance, usefulness, and regional dependency in citizen tweets and city council minutes.

5.4 Comparing stances across different cities

In this study, we direct our attention to the distribution of stance labels in order to identify valuable citizen and councilor comments related to political issues. By analyzing these labels, we gain insights into the perceptions of individuals concerning various issues. Notably, we conducted a comparative examination of two cities: Osaka and Yokohama, ordinance-designated cities in Japan.

Our findings reveal a significant contrast instances between the citizens and councilors of these two cities. Specifically, individuals from Osaka displayed a notably more positive stance toward the attraction of integrated resorts (IR) in comparison to their counterparts in Yokohama. This disparity in attitudes aligns with the ultimate decision taken by the Yokohama Mayor in 2021 to discontinue the IR attraction. It is essential to note that the timing of this decision postdates the timing of the stance analysis conducted in this research.

These results demonstrate the potential of our approach in extracting valuable insights from citizen and councilor comments, contributing to a better understanding of the prevailing sentiments and opinions surrounding political issues. By focusing on stance labels, we gain a nuanced understanding of the viewpoints held by different stakeholders, allowing us to identify patterns and differences among cities. The contrasting stances observed in Osaka and Yokohama regarding integrated resorts exemplify the effectiveness of our methodology.

Advertisement

6. Application (3): comparing social capital in each city

6.1 Goal

The objective of this research is to provide a quantitative analysis of the intensity of human connections and elucidate the varying degrees of these connections across different cities. In doing so, we posit the potential for municipalities to gauge the strength of their local social ties, thereby enabling local governments to effectively address social isolation in areas with comparatively weaker ties.

This study further quantifies human connection strength during the unprecedented period of the 2020 and 2021 novel COVID-19 pandemic, when social relationships were notably strained. By scrutinizing variations in our calculated values over time, in conjunction with alterations in the prevalence of mood disorders, our investigation aims to unravel the underpinnings of the reported increase in conditions like depression, which have surged during the COVID-19 outbreak and have been inadequately explored in preceding studies.

To achieve these objectives, we leverage social capital [24] – a concept intrinsically linked to the quantification of human connection strength - as a metric, deriving our data from tweets on the social media platform, X. This study seeks to validate the efficacy of an affordable quantification method founded on tweet data, which has been under-explored in comparison to the more traditional, yet costly, quantification approach reliant on questionnaire surveys, widely utilized in conventional research. Note that this is ongoing work and reported in the domestic non-reviewed conference in Japan [25].

6.2 Indicator type for estimating social capital

In our proposed methodology, we initially aggregate tweets from cities at both ends of the spectrum concerning the prevalence of mood disorders, as reported on X.

Subsequently, employing the construct of social capital, we derive two indicators from the assembled tweets, assigning attributes through annotation to formulate a comprehensive dataset. The proposed indicators are delineated as follows:

  1. Event and Activity Participation: In alignment with the concept of bridging social capital, this indicator is formulated to represent the extent of event participation among contributors residing in the target cities.

  2. Family Ties Intensity: Based on the definition of bonding social capital, this indicator is conceived to articulate the strength of relationships between the contributor and their relatives.

Our indicators are conceptualized based on the bifurcation of social capital as per Putnam [24], who differentiated it into two categories bridging and bonding, each embodying distinct characteristics of human connections.

We assembled tweets from four cities: Mito and Oita, characterized by the highest rates of mood disorder patient increase, and Aomori and Takasaki, marked by the lowest rates. Documents were curated such that each category comprised 500 tweets from the pre-pandemic period and 500 from the pandemic period, yielding a total of 1,000 tweets per category. Thus, the resultant dataset encapsulates approximately 8,000 sentences.

To procure tweets pertinent to each indicator, we gathered tweets spanning June 2018–September 2021, encapsulating both pre-pandemic and pandemic periods, guided by the subsequent search queries:

  • Event and Activity Participation

The search query was “participation.”

  • Family Ties Intensity

Search queries encompassed “son,” “daughter,” “mother,” “father,” “brother,” “younger brother,” “family,” “husband,” “wife,” “parents,” and so on.

Tweets were collected from 12,927 Mito citizen accounts, 9,026 Oita citizen accounts, 9,784 Aomori citizen accounts, and 9,301 Takasaki citizen accounts. These were retrieved based on profile information from X (Twitter) using Twitter’s Streaming API. The number of tweets collected amounted to 10,083,874 from Mito, 5,823,539 from Oita, 11,177,635 from Aomori, and 6,974,843 from Takasaki. Accordingly, for each city, we culled tweets containing the defined queries so that a sum of 2,000 tweets (1,000 for each indicator) were collected during the specified period. Reposts were omitted, and URLs contained within the tweets were excised. This dataset serves as the foundation for training a classification model for each attribute, individual city, and respective indicator.

In this methodology, we delineate attributes that are uniformly allocated to the degree of connectivity with relatives, in addition to labels denoted to the degree of event participation. Social capital is quantified for each indicator, drawing from tweets associated with the ensuing labels.

6.2.1 Attributes assigned to the level of event participation

  • Event Participation: We determine whether the content signifies participation in events such as sports, games, music festivals, and so on. There are four label categories: “currently participating,” “participated in the past,” “not participating,” and “not related.”

  • Form of Event Participation: This attribute is ascribed to tweets associated with one of three classifications: “currently participating,” “participated in the past,” or “not participating” in the aforementioned attribute of event participation status. This attribute indicates whether the post user partakes in the event virtually or physically. There are three label types: “online,” “offline,” and “unknown.”

6.2.2 Attributes assigned to the degree of connection with relatives

  • Connection Information: We assess whether the content comprises information about relatives linked to the post user. The associated label type is “Yes,” in the contrary case, the label type is “No.” For instance, “Husband of an acquaintance” contains expressions relating to relatives such as “husband,” yet the content does not pertain to the post user’s relatives. Hence, such tweets are evaluated as “No” for the connection information.

  • Form of Connection Information: This attribute is assigned exclusively to tweets denoted as “Yes” in the above “connection information” attribute. It discerns whether the interaction between the post user and a related individual is face-to-face or online. There are three label types: “online,” “offline,” and “unknown”.

  • Evaluation of Connection: This attribute is conferred solely on tweets labeled as “Yes” in the above “connection information” attribute. Drawing from expressions in the post users, encompassing the sentiments and actions of the post users, we assess the quality of the connection between the post users and the other party. This attribute accounts for the “trust” toward others, a component of social capital, and “reciprocity,” which pertains to relationships of mutual support, such as gift exchange. There are three label types: “positive,” “negative,” and “neutral.”

6.3 Methodology

The model was trained to assign the label of the attributes to each tweet using the labeled annotation corpus with RoBERTa [26]. Then, the labels were assigned to the unlabeled tweets in each city using the model, allowing for the quantification of social capital based on the assigned labels to each tweet.

By assigning labels to a large number of unknown tweets using the proposed method in this study, we calculate correlation coefficients between the number of labeled tweets per month and the number of patients with mood disorders per city in the target cities. The period of analysis was from June 2018 to December 2021. The number of patients with mood disorders per month is calculated using REZULT3, a medical database provided by Japan System Techniques Corporation (JAST). This data set is based on the receipt data of more than 7 million patients held by JAST, and the number of patients is calculated by ICD-10 code, which is the International Statistical Classification of Diseases, and by region. In order to analyze the data by period, correlation coefficients were calculated for a six-month period, from June 2018 to December 2019 (before COVID-19) and from January 2020 to March 2022 (after COVID-19).

6.4 Correlation of number of labeled tweets and number of patients with mood disorders in cities

During the early COVID-19 pandemic period from January to June 2020, we observed a negative correlation (−0.157 to −0.656) between the number of patients with mood disorders and the count of tweets labeled “currently participating” and “online” in the attribute “forms of event participation.” This supports the hypothesis that a higher participation of citizens in events is associated with a decrease in the number of mood disorder cases.

The strong negative correlation case in Aomori city case is depicted in Figure 5. Note that Aomori was characterized by the lowest rates of mood disorder patient increase. During this period, numerous tweets discussed online drinking parties and social gatherings, utilizing Zoom for virtual interactions.

Figure 5.

Negative correlation between # of tweets currently participating in online events and # of patients with mood disorders in Aomori city.

The negative correlation coefficient between the number of patients with mood disorders and the count of tweets labeled as “positive” for offline connectedness from January to June 2020 was notably higher (−0.525 to −0.629) in cities. This suggested that kinship ties might have reduced mood disorder patient numbers in early COVID-19 pandemic stages.

Advertisement

7. Limitations

Our approach exhibits several limitations. Notably, it struggles to analyze opinions that rarely surface on social media. For instance, although restroom locations in offline events constitute an important concern, few users discuss this topic on X. Additionally, due to limited X usage among older demographics, assessing elder-specific issues is challenging. Another complication is distinguishing the impact of non-opinion factors when analyzing real-world problem influences. An example would be assessing the effect of social media rumors on decreasing COVID-19 vaccination rates, considering that inadequate local government services also contribute to this decline. Understanding these limitations is crucial before deploying our proposed methodology for analysis.

Advertisement

8. Conclusions

In this chapter, we presented our methodologies for citizen sentiment analysis using tweets in a specific city, with a focus on three main applications: (1) comparing citizen feedback in multiple cities; (2) comparing the stance of citizens with city councilors; and (3) estimating social capital to affect the number of patients with mood disorder. Our approach encompassed a wide range of political issues, enabling us to compare citizen responses and connections across various cities by collecting tweets specific to each location. To prove the generality of our framework, we introduced multiple opinion typologies according to the application goal. Moreover, to enhance the accuracy and efficiency of extracting citizen comments, we incorporated a multitask learning framework based on LLMs.

Looking ahead, we plan to construct a conversation agent in each city to adapt generative AI to each city, by creating specific instructions in each city. This application plays a role as a virtual citizen, and holds significant promise for facilitating targeted interventions to enhance community well-being. By bridging the gap between digital interactions and real-life connections, our research contributes to a more comprehensive understanding of citizen sentiments and lays the groundwork for more informed decision-making in public administration.

Advertisement

Acknowledgments

This work was partially supported by the Japanese Society for the Promotion of Science Grant-in-Aid for Scientific Research (B) (#23H03686) and Grant-in-Aid for Challenging Exploratory Research (#22 K19822).

References

  1. 1. Ishida T, Seki Y, Kashino W, Kando N. Extracting citizen feedback from social media by appraisal opinion type viewpoint. Journal of Natural Language Processing. 2022;29(2):416-442. DOI: 10.5715/jnlp.29.416 [Accessed: 1 July 2023]
  2. 2. Senoo K, Seki Y, Kashino W, Kando N. Visualization of the gap between the stances of citizens and City Councilors on political issues. In: Tseng Y-H, Katsurai M, Nguyen HN, editors. From Born-Physical to Born-Virtual: Augmenting Intelligence in Digital Libraries, Lecture Notes in Computer Science. Vol. 13636. Hanoi, Vietnam: Springer; 2022. pp. 73-89. DOI: 10.1007/978-3-031-21756-2_6 [Accessed: 1 July 2023]
  3. 3. Pang B, Lee L. Opinion Mining and Sentiment Analysis. Boston: Now Publishers Inc; 2008
  4. 4. Wiebe JM, Wilson T, Bruce RF, Bell M, Martin M. Learning subjective language. Computational Linguistics. 2005;30(3):277-308. Available from: https://aclanthology.org/J04-3002.pdf [Accessed: 1 July 2023]
  5. 5. Blitzer J, Dredze M, Pereira F. Biographies, bollywood, boom-boxes and blenders: domain adaptation for sentiment classification. In: Proceedings of the 45th Annual Meeting of the Association of Computational Linguistics (ACL), Prague, Czech Republic. 2007. pp. 440-447. Available from: https://aclanthology.org/P07-1056/ [Accessed: 1 July 2023]
  6. 6. Macdonald C, Ounis I. The TREC Blogs06 collection: creating and analysing a blog test collection. Technical report TR-2006-224. Department of Computing Science, University of Glasgow: 2006. Available from: http://terrierteam.dcs.gla.ac.uk/publications/macdonald06creating.pdf [Accessed: 1 July 2023]
  7. 7. Martinez-Camara E, Martin-Valdivia MT, Urena-Lopez LA, Montejo-Raez AR. Sentiment analysis in twitter. Natural Language Engineering. 2014;20(1):1-28. DOI: 10.1017/S1351324912000332 [Accessed: 1 July 2023]
  8. 8. Stylios G, Christodoulakis D, Besharat J, Vonitsanou M, Kotrotsos I, Koumpouri A, et al. Public opinion Mining for Governmental Decisions. Electronic Journal of e-Government. 2010;8(2):203-214
  9. 9. Verma S. Sentiment analysis of public services for smart society: Literature review and future research directions. Government Information Quarterly. 2022;39(3):101708. DOI: 10.1016/j.giq.2022.101708 [Accessed: 1 July 2023]
  10. 10. Alizadeh T, Sarkar S, Burgoyne S. Capturing citizen voice online: Enabling smart participatory local government. Cities. 2019;95:102400. DOI: 10.1016/j.cities.2019.102400 [Accessed: 1 July 2023]
  11. 11. Hubert RB, Estevez E, Maguitman A, Janowski T. Analyzing and visualizing government-citizen interactions on twitter to support public policy-making, digital government. Research and Practice. 2020;1(2):15
  12. 12. Alamoodi AH, Zaidan BB, Zaidan AA, Albahri OS, Mohammed KI, Malik RQ, et al. Expert Systems with Applications. 2021;167:114155
  13. 13. Dini L, Bittar A. Emotion analysis on twitter: The hidden challenge, proceedings of the tenth international conference on. Language Resources and Evaluation. 2016;2016:3953-3958
  14. 14. Jabreel M, Moreno A. A deep learning-based approach for multi-label emotion classification in tweets. Applied Sciences. 2019;9(6):1123
  15. 15. Mohammad SM, Bravo-Marquez F, Salame M, Kiritchenko S. Task 1: Affect in Tweets. In: Proceedings of The 12th International Workshop on Semantic Evaluation. New Orleans, LA, USA. 2018. pp. 1-17
  16. 16. Dimitrov D, Baran E, Fafalios P, Yu R, Zhu X, Zloch M, et al. TweetsCOV19 – A knowledge base of semantically annotated tweets about the COVID19 pandemic. In: Proceedings of the 29th ACM International Conference on Information & Knowledge Management. (Online). 2020. pp. 2991-2998
  17. 17. Lwin MO, Lu J, Sheldenkar A, Schulz PJ, Shin W, Gupta RK, et al. Global sentiments surrounding the COVID-19 pandemic on twitter: Analysis of twitter trends. JMIR Public Health and Surveillance. 2020;6(2):e19447
  18. 18. Seki Y. Use of twitter for analysis of public sentiment for improvement of local government service. In: Proceeding of the 2nd IEEE Int’l Conf. On Smart Computing (SMARTCOMP 2016). St. Louis, MO, USA. 2016. pp. 325-327. DOI: 10.1109/SMARTCOMP.2016.7501726 [Accessed: 1 July 2023]
  19. 19. Martin JR, White PRR. The Language of Evaluation: Appraisal in English. London, UK: Palgrave Macmillan; 2005
  20. 20. Caruana R. Multitask learning. Machine Learning. 1997;28(1):41-75. DOI: 10.1023/A:1007379606734 [Accessed: 1 July 2023]
  21. 21. Devlin J, Chang MW, Lee K, Toutanova K. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In: Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. Vol. 1 (Long and Short Papers). Minneapolis, MN, USA. 2019. pp. 4171-4189
  22. 22. Ishida T, Seki Y, Keyaki A, Kashino W, Kando N. Evaluation of citizen opinion extraction across cities (in Japanese). Journal of Natural Language Processing. 2022;30(2):586-631. DOI: 10.5715/jnlp.30.586 [Accessed: 1 July 2023]
  23. 23. Raffel C, Shazeer N, Roberts A, Lee K, Narang S, Michael M, et al. Exploring the limits of transfer learning with a unified text-to-text transformer, the. Journal of Machine Learning Research. 2020;21(101):5485-5551
  24. 24. Putnam RD, Leonardi R, Nanetti R. Making DemocracyWork: Civic Traditions in Modern Italy. Princeton, NJ, JSA: Princeton University Press; 1994. p. 280
  25. 25. Yonemaru S, Seki Y, Keyaki A, Kashino W, Kando N. Development of a Regional Social Connectivity Index Leveraging Twitter Data (in Japanese). In: Forum on Data Engineering and Information Management (DEIM 2023), Gifu, Japan. 2023, Article No. 5b-5-3
  26. 26. Liu Y, Ott M, Goyal N, Du J, Joshi M, Chen D, et al. Roberta: A robustly optimized bert pretraining approach. arXiv:1907.11692. 2019

Notes

  • https://www.open311.org/
  • https://twpro.jp/
  • https://www.jastlab.jast.jp/rezult_data/

Written By

Yohei Seki

Reviewed: 28 August 2023 Published: 18 October 2023