{'fraction_non_alphanumeric': 0.03000720584703016, 'fraction_numerical': 0.015012181312836702, 'mean_word_length': 5.197448165869218, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
How Do People View COVID-19 Vaccines: Analyses on Tweets About COVID-19 Vaccines Using Natural Language Processing and Sentiment Analysis

The COVID-19 pandemic has been the most devastating public health crisis in the recent decade and vaccination is anticipated as the means to terminate the pandemic. People’s views and feelings over COVID-19 vaccines determine the success of vaccination. This study was set to investigate sentiments and common topics about COVID-19 vaccines by machine learning sentiment and topic analyses with natural language processing on massive tweets data. Findings revealed that concern on COVID-19 vaccine grew alongside the introduction and start of vaccination programs. Overall positive sentiments and emotions were greater than negative ones. Common topics include vaccine development for progression, effectiveness, safety, availability, sharing of vaccines received, and updates on pandemics and government policies. Outcomes suggested the current atmosphere and its focus over the COVID-19 vaccine issue for the public health sector and policymakers for better decision-making. Evaluations on analytical methods were performed additionally.


I. INTRODUCTION
Began in December 2019, an outbreak of a novel coronavirus disease  was first found in China (World Health Organization, 2020). COVID-19 was officially defined as a pandemic by the World Health Organisation in March 2020 following a mass global spread. By the beginning of the current study in Feb 2021, the cumulative confirmed infection cases exceeded 110 million and the death toll over 2.5 million worldwide (World Health Organization, 2021), making it the worst public health crisis in the recent decade. Government, medical professionals and pharmaceutic companies had endeavored to develop vaccines that produce immunity to COVID-19. The goal of vaccination is to achieve herd immunity that hopefully ends the pandemic. Acceptance of vaccines is important as the success of herd immunity depends on the scale of the population vaccinated (Fontanet and Cauchemez, 2020). However, acceptance of the COVID-19 vaccine was claimed varied globally and unpromising in certain areas of the world (Sallam, 2021;Malik et al., 2020). Thus, it is necessary to monitor and understand the sentiments and opinions of the general public to build confidence for vaccination and identify skeptics that lead to a reduction in public confidence (de Figueiredo et al., 2020;Lazarus et al., 2021;Bloom et al., 2020). Investigation on social sharing in the general population is also essential as social interactions, especially dissemination of information, would induce to influence on public perceptions over topics like epidemics (Funk et al., 2009).
Social media allows the population to share their daily happenings, feelings, and thoughts over events within their communities, providing massive textual data for potential sentiment analyses. With a publicly available application programming interface (API) enabling convenient data gathering, Twitter is one of the most widely used and representative social media platforms commonly employed as a data source for text mining and analysis. Due to the social distancing measures to control the spread of the disease, social media usage became even more prevalent, playing a critical role in keeping people connected and informed during the COVID-19 pandemic (Nabity-Grover et al., 2020;Mehla et al., 2021). This results in immense textual data for various text mining or analysis. Traditional surveys typically have small sample sizes, closed questions and limited spatiotemporal granularity. Compared to the traditional surveys, analysis results on social media data grant an overview of the sentiments and opinions of larger communities and changes over time. In order to deal with the drawback of social media data being mostly unstructured, natural language and machine learning algorithms can be employed to mine sentiments and topics from texts.
The main objective of this study was to discover sentiments and identify public opinions related to the COVID-19 vaccine from social media data. Therefore, tweets from Twitter were acquired and analyzed using natural language processing and machine learning algorithms, including sentiment analysis and topic analysis. Temporal changes were also examined to understand the people's view on COVID-19 vaccines throughout pandemics and vaccine development. Evaluation of different sentiment and topic analytical methods applied was the secondary objective. This study was set to contribute to the literature by 1) expanding the understanding of public sentiments and emotions over a crucial sub-topic of COVID-19, vaccination, 2) identifying topics worth public health professionals' and stakeholders' notices for critical decision making, and 3) demonstrating and comparing multiple sentiments and topic analysis methodologies on vast social media textual data.

II. LITeRATURe ReVIew
Social media data has been widely used for analyses in many previous works of literature in the recent decade. Applying machine learning algorithms, researchers had analyzed and extracted opinions and sentiments from Twitter data on many different fields, such as business (Jagdale et al., 2019;Uma and Thirupathi, 2018), politics (Adarsh and Ravikumar, 2015), digital technology (Maindola et al., 2018), and journalism (Donnell and Hutchinson, 2015). For the public health sector, early in 2009, Chew and Eysenbach (Chew and Eysenbach, 2010) began analyzing tweets for the H1N1 influenza pandemic, demonstrating social media was a source of opinions worth stakeholders' looking to design proper responses to public health concerns. Since then, a couple of works of literature have shed more light on Twitter data usage in evaluation or surveillance on different epidemics and pandemics, including seasonal flu (Comito et al., 2018), Zika virus (Ahmed et al., 2020), and Ebola (Kim et al., 2016).
Recently, various researchers have published tweets analyses on the COVID-19 pandemic. Most of them aimed to investigate general sentiments towards COVID-19 using different means of sentiment analyses, e.g., Rajput et al. (2004), Bhat et al. (2020), Dubey (2020) and Lwin et al. (2020). Some researchers employed further techniques to extract popular topics from COVID-19 related tweets (Abd-Alrazaq et al., 2020;Xue et al., 2020;Melo and Figueiredo, 2021). Apart from general topics, specific themes about COVID-19 were studied, for instance, the use of controversial terms and racial discrimination (Chen et al., 2004), facemask usage (Sanders et al., 2021;Yeung et al., 2020), and world leaders' responses to COVID-19 (Rufai and Bunce, 2020). Researches related to the COVID-19 vaccine were relatively few and geographically limited (Dubey, 2021;Hussain et al., 2021). Sentiment analysis is defined as a classification process that identifies sentiments and classifies their polarity or category (Medhat et al., 2014). It usually involves two major procedures, feature selection and sentiment classification. Feature selection refers to extracting and selecting text features from target documents, including terms presence and frequency, parts of speech, opinion words and phrases, and negations (Aggarwal and Zhai, 2012). These are usually incorporated as the pre-processing steps for textual data. Bag of Words (BoW) is thus created for later procedures. For Sentiment classification, three commonly used approaches are the machine learning approach, lexicon-based approach and hybrid approach (Maynard and Funk, 2011). While the machine learning approach applies supervised or unsupervised machine learning algorithms to define words, sentences, or documents into different sentiments, the lexicon-based approach relies on an opinion lexicon or dictionary. The lexicon can be produced manually or by growing a seed list of words by searching in the well-known corpora for their synonyms and antonyms (Kim and Hovy, 2004) or used along with a set of linguistic constraints to identify additional opinion words and their orientations (Hatzivassiloglou and McKeown, 1997). For practical implementations, lexicon-based sentiment analysis tools were usually applied, along with a hybrid approach incorporating unsupervised clustering in certain cases (Rajput et al., 2004;Bhat et al., 2020;Dubey, 2020;Lwin et al., 2020;Sanders et al., 2021).
Topics in tweets can be acquired simply by clustering. Clustering dividing text documents into groups by similarity allows differentiation of topics within the set of documents (Kolini and Janczewski, 2017;Lu et al., 2013;Zhang et al., 2018). Besides clustering, previous research works had adopted other topic modeling approaches for data extraction, including cosine similarity using term frequency-inverse document frequency (TF-IDF) vectors, latent semantic analysis (LSA), and probabilistic topic modeling (Boyack et al., 2011;Ding and Chen, 2014;Suominen and Toivanen, 2016). In general, topic modeling is different from traditional clustering in that clustering groups texts into a certain number of clusters as output. In contrast, topic modeling builds clusters of words rather than clusters of texts. One text, therefore, can contain a mixture of topics generated by topic modeling. LSA is a simple topic extraction method that illustrates topics by plotting together the similar words, which are usually words that frequently appear together and interpreting dimensions depicted in the plot (Karl et al., 2015). The more sophisticated probabilistic topic modeling, like Latent Dirichlet Allocation (LDA), assumes each document or text is a mixture of a set of topic probabilities. In contrast, each topic is a probability distribution over words (Blei et al., 2003;Blei, 2012). The objective of LDA is set to determine a set of model parameters, topic proportions and topic-word distributions (Bagheri et al., 2014). LDA is a well-developed topic modeling method that is highly generalizable to new documents (Blei et al., 2003). Thus, it is now one of the most popular topic modeling methods that researchers in different fields utilize for textual mining or analyses, e.g., Jacobi et al. (2016) and Tong and Zhang (2016).

A. Overview
Tweets were collected by purposive sampling, with only COVID-19 vaccine-related tweets retrieved. Data have first undergone a series of pre-processing before entering analyses. Sentiment analyses and topic analyses were then carried out on the processed data. For sentiment analyses, TextBlob and NRC Emotion Lexicon were utilized to investigate polarity, subjectivity and emotions in the data. Sentiment and emotion scores were employed in unsupervised exploratory clustering to explore the possible grouping of posts by sentiments and emotions. Topic analyses included another exploratory clustering using frequencies of terms' appearance in the data and Latent Dirichlet Allocation (LDA) topic modeling. Separate topic analyses were performed for data of different polarities defined by sentiment analyses as well. With the results of these analyses, a general understanding of major sentiments and topics towards COVID-19 vaccines was anticipated. The overall workflow was summarized in Figure 1. Python (Version 3.9) was used to collect, process and analyze the data.

B. Data Source
Tweets about the COVID-19 vaccine were searched using a list of COVID-19 vaccine-related key hashtags (see Table 1) and fetched through Twitter API. A total of 1,149,231 tweets containing one or more key hashtags were collected with posting date from Apr 30 th , 2020, when the first COVID-19 vaccine development was announced by AstraZeneca (2020) to Feb 28 th , 2021. Retweets were filtered out in the search process; thus, all retrieved tweets were original tweets. Tweets containing media such as pictures or videos were included, but only the text components were collected. Each piece of data contained (1) ID of the tweet, (2) full text of the tweet, (3) posting date, (4) user's Twitter ID, and (5) geolocation if available. All the tweets retrieved were written in English. However, since most data did not provide geolocation, locations where most of the tweets were posted, were undetermined. Many were posted in the UK, USA, or India for the limited number of tweets that provided geolocation. For ethical concerns, only tweets that had been set to be open to the public by the users were collected. Full texts of the tweets were analyzed aggregately without study on any individual tweet. Personal information was not contained in any of the data. All the data would be properly discarded following the end of the study. Before entering further analyses, as standard procedures for natural language processing, noise within the raw data was cleaned by following pre-processing procedures to allow precise and efficient language analyses. 1) Case Lowering: All letters were converted to lowercase. Identical words were therefore properly recognized and counted. It reduced the dimensions of the data to provide more accurate and effective analyses. 2) URLs Removal: User-provided URLs for external websites and system-generated URLs for certain tweets without meaning for analyses were removed. 3) User References and Key Hashtags Removal: Twitter users can use the symbol "@" followed by a username to tag another user in their tweets. These usernames and the key hashtags used in data collection did not help understand the messages, so they were replaced by empty space. Other hashtags, however, were retained as they often contain the subject of the tweet or useful information related to the topic of the tweet. 4) Punctuations, Numbers, and Special Characters Removal: Analyses were entirely focused on English words. Thus, characters other than English letters were cleared. 5) Stop words Removal: Stop words such as pronouns, prepositions and articles frequently appeared in the text but served no function for meaningful evaluations. Stop words from a list provided by Natural Language Toolkit (NLTK) were removed from the current data. NLTK is a library that gives easy access to massive lexical resources and allows users to perform various natural language processing tasks such as categorization and classification (Natural Language Toolkit, 2021;Patel et al., 2021). 6) Lemmatization and Stemming: Lemmatization is a process of converting the inflectional forms of words to the dictionary form of the words. Stemming also aims at reducing inflectional forms but using a process of cutting the ends of words. These processes were applied to turn multiple inflectional forms of words with the same or similar meanings into the same word to reduce the dimensionality of the text. Utilizing WordNet Lemmatizer (2021), lemmatization was done by stemming with PorterStemmer based on Porter (1980)'s algorithm. Both the Lemmatizer and PorterStemmer were embedded in NLTK. A version of data without lemmatization and stemming was retained for sentiment analyses for more accurate results. 7) Tokenization: Every single word in the text was turned into to token. Words with fewer than three letters were discarded as they were mostly abbreviations or meaningless. BoW for each tweet was therefore created.
Empty data after the cleaning processes were discarded and 1,103,584 tweets remained in the data into analyses.

C. Sentiment Analyses
The pre-processed data first underwent sentiment analyses utilizing TextBlob and NRC Emotion Lexicon. Sentiment and emotion scores were generated for each tweet to illustrate the sentiment polarity and emotions expressed in the tweet (Karn et al., 2018). Overall polarity and emotions scores indicated people's general feelings expressed on the COVID-19 vaccine. Results were also obtained and compared monthly to identify any temporal change throughout the year. Unsupervised exploratory clustering was performed using sentiment and emotion scores as attributes to extract possible patterns of tweets with different emotional expressions. Details of the three main components of sentiment analyses were explained as follow: 1) TextBlob: TextBlob (2020) is a Python library that provides a simple API for natural language processing, including part-of-speech tagging, noun phrase extraction, sentiment analysis, classification, translation, tokenization, etc. TextBlob actively used NLTK to support its tasks.
Despite being a small and simple library, TextBlob supports a variety of complex analyses and operations on textual data, making it one of the commonly used natural language processing libraries. In the current study, TextBlob was employed to discover sentiments within the collected tweets, specifically subjectivity and polarity.
By using a lexicon-based approach, sentiment in textual data is defined by its semantic orientation and the intensity of each word in the BoW extracted from data. A pre-trained or pre-defined dictionary is needed to classify positive and negative words and determine the level of positivity and negativity of each word. Entering the sentiment analysis and a bag of words represented each pre-processed tokenized tweet. By referencing the pre-trained dictionary, any word in the tweet with a defined sentiment score was assigned with the respective score. Eventually, the sentiment of the whole tweet was calculated by taking a mean of all the words' sentiment scores. The dictionary used in TextBlob was trained from a massive Sentiment Polarity Dataset supplied by NLTK (NLTK Data, 2005).
Two scores, polarity and subjectivity, were returned by TextBlob sentiment analysis for each tweet. Polarity score ranged from -1 to +1, where -1 defined a negative sentiment and 1 defined a positive sentiment. Negation words like "not" reversed the polarity. Subjectivity scores ranged between 0 and 1. It deduced how much a tweet presented personal opinions and factual information. Tweets that expressed more personal opinions rather than factual information would score high in subjectivity. TextBlob also considered a parameter called "intensity" while estimating subjectivity. Intensity determines if a word modifies the next word, such as adverbs "very", "so", etc. With the polarity scores computed for every tweets, tweets were defined in three groups, "positive" (polarity score > 0), "negative" (polarity score < 0) and "neutral" (polarity score = 0). Separate topic analyses were conducted with these groups of data.
2) NRC Emotion Lexicon: Stick to the lexicon-based approach, the second part of sentiment analysis employed NRC Emotion Lexicon as the dictionary for sentiment deduction. NRC stands for National Research Council Canada, where this lexicon was developed. The NRC Emotion Lexicon consisted of a large list of English words and their associations with eight basic emotions, including "Fear", "Anger", "Anticipation", "Trust", "Surprise", "Sadness", "Disgust", and "Joy", and two sentiments, negative and positive (Mohammad, 2021). The emotion and sentiment annotations were manually done by crowdsourcing through popular online crowdsourcing platform Amazon's Mechanical Turk (Mohammad and Turney, 2013). Applying the same mechanism as that of TextBlob analysis, NRC Emotion Lexicon was served as the pre-trained dictionary to assign each word in tweet valence scores for emotions and sentiments. Every tweet, therefore, attained average scores for each of the eight emotions and two sentiments.
Python library NRCLex (2019) was utilized in the current study to measure emotional affect in the collected tweets. The library expanded the original NRC Emotion Lexicon dictionary of approximately 14,000 words to 27,000, borrowing the WordNet synonyms database from NLTK. This allowed improved accuracy on emotion and sentiment detection than simply using the original NRC Emotion Lexicon. NRCLex scanned for words contained in NRC Emotion Lexicon and counted the word frequency for each emotion and sentiment for every tweet. A percentage score was calculated for each emotion and sentiment as the frequency of that emotion or sentiment over the total number of words marked with any emotion or sentiment. Thus, scores ranging from 0 to 1 were assigned for every emotion and sentiment for each tweet.
3) Unsupervised Clustering: The aim of clustering was to deduce any possible groupings or patterns within the data (Manning et al., 2008). Tweets might cluster together by their sentiment and emotion levels, i.e., there might be certain combinations of subjectivity, polarity and emotions commonly seen in tweets, and these tweets might be grouped to form different types of tweets.
As there were no pre-determined types of labels for the tweets available in the data, exploratory clustering was the appropriate method to discover the potential categorization of the tweets. This unsupervised machine learning method divides the data into clusters with their similarity based on a set of attributes.
The well-known K-means clustering method was applied to perform exploratory clustering in current data. With a pre-set number of k, every item in the dataset is classified as belonging to one of the k groups with the nearest mean, or shortest distance, to the centroid of the respective group. The centroid describes the cluster and is the central point in the multidimensional space surrounded by all members of the cluster. The distance from every data point to its cluster centroid was defined by the Euclidean distance in the multidimensional space. The Euclidean distance between data point X and Y in m dimension space can be expressed as: (1) K-means clustering strives for minimal within-cluster dispersion by iterative re-calculations of cluster centroids and reallocating data points to centroids. The K-means clustering process starts with the initial assignment of k centroids based on the pre-set number of k. Each data instance's distance to the centroids is then calculated and thus, data instances are assigned to the closest centroid. It is followed by re-estimation of the centroids using means of every data point within the cluster. Data points are assigned to centroid and centroids re-calculation steps repeat until the convergence of minimal distortion within each cluster for all clusters is obtained. This is the state where no further re-assignment of data points is needed. The distortion is defined by the criterion function as follow: where the target object is x, xi indicates the average of cluster Ci, and E is the sum of the squared error of all objects in the database.
K-means was chosen as the clustering methodology for the current study over its clustering method counterpart, hierarchical clustering, mainly due to its efficiency. Compared to a hierarchical clustering algorithm, K-means is less resource expensive and faster, especially for large datasets and a high number of attributes, since it involves only calculations and storage of distance between centroids and data points while the distance between every data point has to be computed and stored for hierarchical clustering (Jain, 2010). The downside of K-means clustering is that a pre-determined k is needed before the process, which could be difficult to decide (Kanungo et al., 2002). Moreover, different assignments of initial cluster centroids can result in different outcome clusters. With the random assignment of initial centroids, resulting clusters could be varied each run of the algorithm, creating confusing outcomes. Efficiency and desired number of iterations would also be affected by initial centroid selection (Abdul Nazeer and Sebastian, 2009).
In this study, ten sentiment and emotion attributes were entered into the clustering process, including subjectivity and polarity scores from TextBlob analysis and scores of eight emotions from NRC Emotion Lexicon. The two sentiment scores from NRC Emotion Lexicon were excluded as they overlapped with the polarity score from TextBlob, which also defined positivity and negativity. This helped to reduce the number of variables and enhanced the efficiency of the analysis. Since all attributes had a similar range, no standardization or normalization was applied before clustering.
In order to determine better k numbers before actual clustering, the elbow method and gap statistics investigation were employed to estimate the performance of different setups. Elbow method simply ran K-means clustering with a couple of k number settings and, for each setting, computed the average within-cluster distortion, or sum of squares, across all clusters. By plotting the average distortion scores with k numbers and locating the k corresponding to a "knee" in the plot, the k that the drop of average distortion starts diminishing, the best k is suggested (Syakur et al., 2018). Gap statistics is another method to estimate the best number of k in K-means clustering invented by researchers at Stanford University (Tibshirani et al., 2001). A similar approach is applied for gap statistics, with the statistics plotted across different k numbers, the optimal k is which after it, the gap statistics increase rate slows down (Tibshirani et al., 2001).
The K-means clustering tool, KMeans, from a well-developed machine learning library in Python, Scikit-Learn (2021), was utilized for the actual clustering procedure. As mentioned before, different initial centroids would possibly result in different outcome clusters. This problem can be minimized by comparing multiple runs with different initial centroids to find the best results. Although it would be time-consuming, K-means clustering results should eventually converge with enough iterations and trials (Bottou and Bengio, 1995). KMeans from Scikit-Learn offered "n_init" function allowing n runs of the algorithm with different initial centroid assignments to be compared to obtain the final results. KMeans also applied the "k-means++" initialization scheme, which initializes the centroids to be distant from each other (Vassilvitskii and Arthur, 2006), to pursue better results than normal random centroid initialization. The functional command for KMeans and parameters set for the current study were illustrated below: Kmeans (n_clusters=k, init='k-means++', n_init=10, max_iter=300, random_state=10) where "n_clusters" was k number, "init" was the method for centroid initialization, "n_init" was the number of time algorithm will be run with different centroid seeds, "max_iter" was the maximum number of iterations for a single run, and "random_state" was parameter controls random number generation for centroid initialization, allowing replicable result generation if necessary.
Clustering outcomes were evaluated by internal validation, visual inspection and hands-on evaluation over statistics among attributes for each cluster. External validation, which required "true label" for the grouping, was unachievable for current data. For internal validation, two clustering validity statistics, Calinski-Harabasz Index and Silhouette coefficient, were adopted. Invented by Calinski andHarabasz in 1974 (Calinski andHarabasz, 1974), Calinski-Harabasz Index, which is also known as the Variance ratio criterion, is a measure of similarity of data points to their own cluster (cohesion within clusters) compared to the separation of centroid with other cluster centroids (dispersion between clusters). The higher the score of the Calinski-Harabasz Index, the better the performance of clusters, which means clusters are dense internally and well separated from each other. Silhouette coefficient took a similar approach but a different calculation method. It measures intracluster cohesion by mean distance between a data point and all other points in the same cluster and inter-cluster separation by mean distance between a data point and all other points in the next nearest cluster (Rousseeuw, 1987). Same as Calinski-Harabasz Index, a higher Silhouette coefficient indicates better cluster distribution. The silhouette coefficient for each single data point also demonstrates whether the data point is correctly placed in a cluster (Starczewski and Krzyżak, 2015). While a negative score suggests incorrect placement and a positive score means good assignment, a score tends to zero indicates overlapping between clusters.
Apart from validity statistics, clusters were investigated by visual inspection and reviewing attributes' scores within clusters. The inter-cluster distance was depicted by the inter-cluster distance map reducing dimensions into two principal components. Boxplots for each emotion attribute were generated and reviewed to determine whether different clusters actually behaved differently.

D. Topic Analyses
Topic analyses are aimed at uncovering hidden textual structures and identifying common topics mentioned in collected tweets. Results were obtained by using two unsupervised machine learning methods, exploratory clustering and Latent Dirichlet Allocation (LDA) topic modeling. The two analyses were applied on overall data and separately on data divided by polarity from sentiment analyses, i.e., to reveal common topics for positive, negative, and neutral tweets. For each method, models with different types of topics were generated and compared by validity statistics and manual evaluations on topic themes.
Frequencies for every single term that appeared in the tweets were vectorized and used as attributes in both analyses. In particular, Term Frequency -Inverse Document Frequency (TF-IDF) was calculated and used to encode the data to obtain vectors for the analyses. TF-IDF for each word was produced by multiplying the term frequency of the word in a document with the inverse document frequency of the word across all documents, or how common the word is in the entire set of documents (Salton, 1991). Equation (1) was the mathematical expression for TF-IDF score is as follows: w is a word in document d, and D refers to the whole set of documents. Where: tf (w, d) = log (1 + freq (w, d)) idf (w, D) = log() TF-IDF aimed to highlight more interesting or important words to a document, which frequently appeared in a document but were not very commonly found across documents (Aizawa, 2003). TF-IDF value for each word increases by the appearance in a document but is gradually down-scaled by the appearance in other documents in the set. The TF-IDF vectorizer from Scikit-Learn machine learning toolbox was employed to learn and compute the TF-IDF value for each term and encode all tweets into vectors with normalization suitable for clustering and LDA.
1) Exploratory Clustering: This analysis was set to discover the potential grouping of the tweets by the number of the appearance of terms or words. Similar to analysis on sentiment, being an exploratory analysis, clustering was applied to divide the tweets into different groups. The overall clustering approach was akin to sentiment analysis, except TF-IDF vectors for each tweet were used as attributes. K-means was employed again as the clustering method, executed by the same KMeans clustering tool from Scikit-Learn machine learning library in Python. Distance measurement between the data point and cluster centroids were computed by Euclidean distance, although the computational time was multiplied with much more variables. The Elbow method was also appointed to estimate a better number of k prior to the clustering. Average Silhouette coefficient and Silhouette coefficient plot were examined to evaluate the internal validity of the resulting model.
Aiming to reveal common topics within the collected tweets, the most frequently used words in each cluster were listed and examined for potential summarization of topics.
2) LDA: The second attempt of topic analysis implemented a topic modeling method, Latent Dirichlet Allocation (LDA). To achieve a model of topics, LDA first assumes a number of the topic (k) within the whole sample of documents and distributes the k topic across the documents by giving a topic to each word. Then, for each word (w) in a document (d), assume it has been assigned a wrong topic and probabilistically re-assign a topic for it, based on the current topics in d and the number of times the topic was assigned to w across the whole set of documents. The algorithm repeats this process for each document to adjust the topic assigned to every word until a stable model is generated (Blei et al., 2003).
In the current study, LDA topic modeling was implemented using the LDA modeling tool, LdaMulticore, in an open-source Python library, Gensim. Gensim (2021) is designed to process raw, unstructured digital texts using unsupervised machine learning algorithms. LdaMulticore is a version of the LDA modeling tool with parallel multiprocessing ability, allowing multiple CPU cores to work together to speed up the process. Before entering the modeling process, a corpus such as TF-IDF vectors and a dictionary with all the words in the dataset was generated. The functional command for LdaMulticore and parameters set for the current study were illustrated below: ldamulticore(corpus=corpus_tfidf, num_topics=n, id2word=dictionary, passes=10, workers=3) where "corpus" was corpus, "num_topics" was the number of topics in the model generated, "id2word" was dictionary mapping from word IDs to words, "passes" was the number of passes through the corpus during training, and "workers" was the number of workers processes to be used for parallelized processing.
Besides manual assessment on keywords for each result topic, topic models generated were also evaluated through the measure of topic coherence. Coherence within a topic refers to the level at which each statement of fact in the topic supports one another. There are different measures of topic coherence, but they all aim to score a topic by measuring the degree of semantic similarity between high-scoring words in the topic. These measurements also help distinguish between topics that are semantically interpretable topics and topics that are artifacts of statistical inference. UMass coherence developed by Mimno et al. (2011) was hired as a coherence measure in the current study as it corresponds well to human coherence judgments and can recognize particular semantic issues in a topic model without human evaluation or an external reference corpus. It is based on document co-occurrence counts, a one-preceding segmentation and a logarithmic conditional probability.
Since the UMass coherence score is calculated over a log of probabilities, it is negative in nature. Scores close to zero or less negative represent good coherence. The coherence scores in this study were computed by topic coherence pipeline, CoherenceModel, available in Gensim.

A. Descriptive Results
There were 315,041 unique tokens or words in total found across all 1,103,584 processed tweets. A monthly number of tweets related to the COVID-19 vaccine and unique tokens remained similar from April to October 2020 ( Figure 2). There was a drastic increase in both numbers recorded since November 2020 and reached the highest in January 2021, of over 300,000 tweets and about 140,000 unique tokens. This indicated a huge increase in people's concern over COVID-19 vaccines from November 2020.
The top-50 words were shown on a word cloud (Figure 3). "Peopl", which was the stemmed form of "people", was the most found word in the data, with over 73,000 counts. "Pfizer" was the most mentioned brand making COVID-19 vaccine, having more than twice the counts of the second brand, "Moderna". There were not any obvious sentiment-related words seen in the top-10 words, and within a top-50 word, only "thank" and "good" were found positive in tone.

B. Sentiment Analyses
The mean subjectivity and polarity scores by TextBlob analysis for all data were 0.275 (SD = 0.303) and 0.086 (SD = 0.225) respectively. Low subjectivity score reflected most of the tweets were presenting facts without much personal feelings or thoughts. This was also supported by the close to 0 polarity score. Although slightly, the positive mean polarity score revealed the overall sentiment toward COVID-19 vaccines tended to be positive. While nearly half of tweets were found neutral, the number of tweets with positive sentiment was more than triple of the negative ones ( Figure 4). There was no significant temporal change observed, i.e., the mean subjectivity and polarity scores and the distribution of tweets with different sentiments remained consistent every month in general (Figure 4 & 5). The overall TextBlob analysis results suggested that there was no strong sentiment expressed in the collected tweets. More positive expressions could be found for tweets that were not neutral, meaning more people thought positively than negatively towards the COVID-19 vaccine.

C. Sentiment Analyses
The mean subjectivity and polarity scores by TextBlob analysis for all data were 0.275 (SD = 0.303) and 0.086 (SD = 0.225) respectively. The low subjectivity score reflected most of the tweets were presenting facts without any personal feelings or thoughts. This was also supported by the close to 0 polarity score. Although slightly, the positive mean polarity score revealed the overall sentiment toward COVID-19 vaccines tended to be positive. While nearly half of tweets were found neutral, the number of tweets with positive sentiment was more than triple the negative ones ( Figure 4). There was no significant temporal change observed, i.e., the mean subjectivity and polarity scores and the distribution of tweets with different sentiments remained consistent every month in general ( Figure  4 & 5). The overall TextBlob analysis results suggested that there was no strong sentiment expressed in the collected tweets. More positive expressions could be found for tweets that were not neutral, meaning more people thought positively than negatively towards the COVID-19 vaccine.

Figure 3. Word cloud for top-50 words appeared in the data
Analyses with NRC Emotion Lexicon yielded similar results to TextBlob analyses that positive tweets were dominant over negative ones. The mean score for positive sentiment across entire dataset was 0.378 (SD = 0.350), which was much higher than that for negative sentiment (mean = 0.082, SD = 0.146). The temporal change was unseen as the monthly means had patterns very much alike ( Figure 6).
Regarding the eight emotions considered in NRC Emotion Lexicon, "Trust" was the most prominent emotion with a mean score of 0.089 for overall data. The second highest score was 0.051 for "Fear", followed by 0.035 for both "Joy" and "Sadness" (Figure 7). "Anticipation" was not detected in the entire dataset resulting in a zero score. 1 Change over time was minimal, although a gradual rise of "Trust" and "Anger" along with dropping of "Fear" and "Surprise" from May 2020 to recent could still be observed (Figure 8). About 20% of the total tweets scored 0 in every NRC sentiment and emotion, which meant one in five collected tweets was neutral or emotionless recognized by NRC Emotion Lexicon. Above all, the NRC Emotion Lexicon analyses went along with the TextBlob analyses results that positive expressions were relatively prevalent compared to negative ones in the current sample. Before undergoing exploratory clustering by sentiment and emotion scores, the elbow method and Gap Statistics were utilized to determine a better number of clusters. However, both methods showed unclear clues for best cluster number (see WCSS chart in Figure 9 and Gap Statistic chart in Figure 10). Thus, k-means clustering with k ranging from 2 to 6 was performed. Results were then manually checked and compared between models to decide which model fits and explains the data well. 5-Cluster model was selected as the best model to represent the data. It was the model with the highest number of dimensions while having none of the clusters overlapped with others in the principal component chart, indicating a decent separation between clusters (Figure 11). Calinski-Harabasz Index (50,127) and average Silhouette (0.387) coefficient of this model were acceptably high and comparable to that of the fewer cluster number models, implying satisfactory inter-cluster distance and intra-cluster cohesion (Figure 12). Silhouette coefficient analysis revealed that adequate cluster distribution with only a small number of samples is mis-clustered ( Figure 13). Each cluster's characteristics could be observed in cluster-wised statistics on each of the ten attributes ( Figure  14), indicating the feasibility of explaining the data by these clusters. The biggest cluster, Cluster 0, consisted of neutral or emotionless tweets, with low means scores in all attributes. In contrast, Cluster 3 and Cluster 4 contained polarised tweets. Cluster 3 stored mostly negative tweets with high subjectivity scores, negative polarity scores and relatively high scores in negative emotions like "Fear", "Anger", "Sadness" and "Disgust". Cluster 4 showed more positive sentiment, scoring high in subjectivity, positive polarity, and positive emotions including "Joy", "Trust" and "Surprise". While mixed feelings are seen in Cluster 1 tweets, data in Cluster 2 interestingly displayed minimal subjectivity, polarity and other emotions, but the highest scores of "Trust".

D. Topic Analyses
For the exploratory clustering using TF-IDF vectors as attributes, the elbow method suggested 5 as the number of k for K-means clustering ( Figure 15). However, for further evaluation of the final result by comparison with different setups, clustering with k ranging from 2 to 7 was performed.   The top-10 frequently appeared words and a total number of tweets for each cluster in the final 5-cluster model were listed in Table 2. Visual inspection with PCA plot revealed potential overlapping between the two biggest clusters, cluster 0 and cluster 1 (Figure 16). Otherwise, the overall distance between clusters was acceptable. Nevertheless, the low average Silhouette coefficient and rather unbalanced distributions indicated the unstable nature of this model, although it had comparatively better performance than models with other numbers of k ( Figure 17).
Interpretation of topics or characteristics based on top-10 words of the clusters was performed manually. Interpretation for each cluster was as follow:   Separate clustering for the three polarity groups of data yielded different sets of keywords as expected (Table 3). These models were not stable reading the low average Silhouette coefficients. More perplexing combinations of top words were found compared to the model for the whole dataset. It was hard to conclude for each cluster, but for negative tweets, common topics seemed to include late vaccine rolling out, complaints to pharmaceutical business exploitations, or difficulties for getting vaccinated, etc. For positive tweets, people expressed belief in the safety and effectiveness of the vaccines and hope for an end of the pandemic. Messages were even more diverse for neutral tweets, but they seemed about news updates around different places in the world.
LDA topic modeling trials were performed with a number of topics ranging from 1 to 10 and other parameters remained constant. Models generated from these trials were compared with each other by coherence scores and heuristic judgment on the perplexity of topics. The peak of coherence scores was found at the 4-topic model (Figure 18), with the value of -3.314 indicating a satisfactory topic coherence within the model. Manual comparison of keywords and meanings from different models suggested that starting from 5-topics, overlapping between topics gradually increases. Thus, the 4-topic model has claimed the best model for the current data. Keywords and their weights in each topic for the 4-topic model were presented in Table 4. The four topics were interpreted as follow: 1) Topic 1: Personal sharing about receiving vaccination, such as availability or receiving first dose of COVID-19 vaccines. 2) Topic 2: Information about vaccine development progress of different brands around the world. 3) Topic 3: Political talks about policies for pandemic and public figures related, mainly from the United States.  Table 4. Keywords and weighs and coherence score (CUMass) in each topic of the topic models

V. DISCUSSION
The main objective of this study was to uncover public perceptions and concerns over the COVID-19 vaccine by machine learning and evaluate the effectiveness of the applied language analysis method. Tweets number on its base reflected how prevalent people are concerned and talk about an issue. The number of tweets collected in this study showed that the COVID-19 vaccine had not been a popular topic in daily social media sharing until late 2020. Specifically, in November 2020, the news was out about rolling out COVID-19 vaccines in December 2020 both in the United Kingdom and the United States, which could be why the rapid rising of tweets calling COVID-19 vaccines. With the first jab approved and started using in December 2020 in UK and USA, COVID-19 vaccination-related sharing continued to rise. With over 300,000 tweets gathered in January, which meant around 10,000 tweets per day, it reflected the huge popularity of the topic early this year.
Sentiment analyses were performed to capture sentiment and emotional expressions in the sample. COVID-19 vaccine-related tweets in the current sample showed low emotional engagement overall. A relatively large proportion of tweets were marked neutral. Previous research using TextBlob on general COVID-19 sentiments showed a similar pattern (Manguri et al., 2020). Upon manual checking on the part of the data, it was believed that these neutral or emotionless tweets were predominantly facts or news sharing without adding personal thoughts or feelings since news sharing had become one of the biggest social media usage (Kümpel et al., 2015). Regardless of the unpolarized tweets, positive tweets were found much more prevalent than negative ones in the current sample, showing that people viewed the COVID-19 vaccine positively in general. This finding went along with the outcome of a previous study on sentiment towards COVID-19 in the USA in early 2020 which concluded positive sentiment outweighed negative sentiment (Hung et al., 2020). Change across months was found minimal, except for a small spike of positive tweets in November 2020. This was aligned with previous research results showing excitement on the announcement and start of COVID-19 vaccination (Hussain et al., 2021).
Regarding specific emotions, current results showed "Trust" was the most expressed emotion among the eight considered. The score for "Fear" was also high, although not as near "Trust". These results were different from a previous study also utilizing NRC Emotion Lexicon on a Twitter discussion about the COVID-19 pandemic, which presented higher "Fear" than "Trust" (Xue et al., 2020). Another sentiment analysis study on Indians' views over two brands of COVID-19 vaccines demonstrated similar results that people tended to trust than fear about the vaccines (Dubey, 2021). There seemed to be a considerable proportion of people who were hopeful for COVID-19 vaccines to be trustworthy and competent to defeat the virus. At the same time, certain views might have asserted fear over the lack of effectiveness of the vaccines and the inability to stop the pandemic (Soares et al., 2021). For temporal changes, the peaking of "Fear" and "Surprise" in May 2020 indicated diverse views over the first announcement of vaccine development. People were either excited about the coming of vaccines or skeptical about it. With more news and knowledge about the vaccines exposed throughout the year, both two emotions gradually diminished across months. As increasing evidence arises to support the vaccines, "Trust" level kept enhancing. At the same time, "Anger" was noted to slightly increase over time, probably due to people's urge to get the vaccine to end the pandemic while politics or other issues hindered the implementation of vaccination schemes. Also, the effect of vaccination became questionable as the COVID case number remained high despite many people having applied the vaccine. These brought up the "Anger" level and reached the peak in February 2021.
Both two sentiment analysis methods employed in this study contribute to valuable results. TextBlob provided convenient and user-friendly implementation of sentiment analyses supplying accurate and meaningful results. Lightweight and short processing time also support its suitability for analyzing massive textual data like tweet analyses in the current study. Polarity and subjectivity were simple figures yet offered precious insight on the level of sentiment in the tweets. NRC Emotion Lexicon is one of the few lexicons involved in assessing various emotions, and it provides good emotion recognizing ability (Tabak and Evrim, 2016). In this study, we produced useful emotion scores that enhanced the dimensionality of the results, which brought in additional insights. With a workable library for easy implementation and continuous development, the lexicon could become one of the best sentiment and emotion lexicons for users.
Unsupervised exploratory clustering successfully found out possible patterns of tweets by sentiment and emotions. This machine learning method is suitable for data mining on unlabeled data like the current sample, discovering potential groupings within the data. After executing and comparing several trials, a 5-cluster model was decided to explain the data. The 5 clusters represented five types of tweets: (1)Neutral or emotionless, (2)Positive, (3)Negative, (4)Mixed feelings, and (5)Merely trust, respectively. These groups were found stable and valid with decent distributions and clustering validity statistics. As mentioned above, neutral or emotionless tweets composed the largest group consisting mostly of news and facts. For the interesting "merely trust" group, with some manual reviewing of the data, tweets were not mainly composed by news sharing contrasting to the "neutral" group, but several advertisement-like posts were found. These tweets did not use strongly or noticeably emotional wordings but were more affirmative, possibly aiming to support or promote COVID-19 vaccination. It could be possible that the increase in "Trust" level over time was related to the growing number of tweets. In general, exploratory clustering enabled differentiation of various types of tweets in the current sample based on sentiment and emotions, further facilitating understanding of the data.
Topic analyses were done by exploratory clustering and LDA topic modeling. A 5-cluster model was elected to represent the current data despite unbalanced distributions and unsatisfactory stability of the clusters. Clustering enabled the grouping of tweets using term frequencies as attributes differentiating types of tweets based on their commonly used words. Frequently seen words revealed different types of tweets covering news updates, healthcare issues, vaccine development progresses.
Particularly, there were two groups of tweets focused on updates in India and Russia, perhaps mainly shared by the Indian and Russian populations, respectively.
LDA topic modeling appointed a more sophisticated approach to defined topics on words level, assigning a topic for each word. A 4-topic model was chosen to explain the data. The topics included personal sharing of vaccination availability and receiving periods, politics, and general circumstances under pandemics. One topic aligned with the clustering result was vaccine development progress, suggesting it as the people's major concern regarding COVID-19 vaccine issues.
To summarize, the most common topic people shared in their tweets was vaccine development progress. Other prevalent topics included vaccine effectiveness, safety and availability, personal sharing of vaccination experience, updated situations and issues of the pandemic, and politics.
Results of topic analyses on polarity separated tweets denoted both pro and against views persisted over topics like vaccine effectiveness and safety, time to end the pandemic, policies or politics, and profit and business of pharmaceutics. Since positive tweets number was much higher than negative ones, people were generally happy on such issues. Nonetheless, skepticism, such as disbelief in vaccines efficacy, perception of vaccination as political propaganda or exploitation from pharmaceutic corporates, etc., were crucial for public health practitioners and policymakers to designate suitable measures to alleviate any adverse events concerns and rebuild confidence.
By considering the two topic analytical methods, LDA topic modeling was recommended as better than exploratory clustering (Kelaiaia and Merouani, 2016). While observing the results in this study, exploratory clustering attempted to separate tweets having distinctive wordings but did not necessarily differentiate topics. Although there were clear differences in top words found in clusters, the groupings differentiated data in other dimensions like geographic (countries) instead of defining topics. There was also unbalanced distribution resulting in a large cluster harder to interpret. Sub-clustering on that cluster would potentially decipher more meaningful results (Sanders et al., 2021). Altogether, clustering was claimed not a decent method for topic analyses. LDA, on the other hand, adequately extracted topics on word level. By assuming multiple topics for every tweet, there were no grouping issues. The only con for LDA was since no grouping and labeling of tweets, manual checking on raw data for in-depth reviewing of the results was inhibited. Some researchers also suggested combining LDA and clustering for text mining (Alhawarat and Hegazi, 2018;Bui et al., 2017).

VI. CONCLUSION
Understanding the general population's perception of health issues like pandemics and vaccination help crucially promote public health. Social media platforms offer convenient resources for semantic data analyses to enable recognition of people's views by their daily expression and sharing. This study demonstrated using machine learning natural language analytical methods, particularly sentiment and topic analyses, to analyze extensive tweets data related to COVID-19 vaccination. Findings revealed that attitude towards COVID-19 vaccines was positive in general. Common topics identified by topic analyses facilitate understanding of specific concerns on COVID-19 vaccine issues. Overall, the current study suggested that analyses of social media data employing machine learning allow effective gathering of knowledge and insights on population perceptions. Another contribution of this research is that it provides decision-makers with a streamlined solution (Figure 1) to identify the general population's perception of health issues effectively.
Several limitations should be addressed in this study. First and foremost, although multiple different wording combinations and various expressions of COVID-19 and vaccination were used, the key hashtags for tweets searching might not cover all related tweets. Hashtags keep evolving and being newly invented. Some users might also use related hashtags, such as some researchers suggested combining LDA and clustering for text mining brands' names instead of actually mentioning COVID-19 or vaccination. Secondly, due to limitations in the Twitter content redistribution policy, besides limited geolocation gathered, most demographic information of the users like age, gender, social statuses, etc., were not provided. Therefore, analyses on demographics like geographical difference, age difference and gender difference were restricted. Besides, due to limited user information provided, fake or robot users could not be recognized. Their tweets could be included in the data, which might induce bias. Additionally, tweets data could not represent the entire population despite Twitter being one of the major social media platforms. Not to mention people who do not or cannot use the Internet, not all online users use Twitter as their main sharing platform. Thus, one must be cautious that results in this study might not be generalizable to other social media platforms or the general public. Regarding language processing, many special forms of wording like a combination of words (e.g., "keep social distance") and alternative short forms usually found on the Internet (e.g., "luv" for love) could be missed by lemmatization stemming or dictionaries for sentiment analyses. Finally, since the current data was unlabelled, external validation was unable to apply to the results of all the unsupervised analyses. Internal validation relies on validity statistics and manual interpretations could be subjective and less reliable.
Researchers may enlarge the extent of data collection for future studies by including a wider range of search words and streaming data across different social media platforms. Language processing algorithms need continuous evolution and development to adapt to constantly changing semantic expressions on the Internet to perform more accurate evaluations. Pre-analysis manual labeling of the data by blind participants would allow external validation of analysis results or construction of a more sophisticated classification tool to perform real-time sentiment and topic recognition.
In future work, we will incorporate further improved language analytical algorithms, sophisticated visualizations, and advanced real-time analytical tools. The instant language mining can be anticipated for public health practitioners, healthcare providers and policymakers, providing valuable information for rapid judgments and decision-making for an ongoing or upcoming public health crisis.

FUNDING AGeNCy
Publisher has waived the Open Access publishing fee.

ACKNOwLeDGMeNT
This work is partly supported by VC Research (VCR 0000156) for Prof Chang. eNDNOTe 1 This result was subsequently found due to a bug in the NRCLex tool that skipped the frequency counting for all the "Anticipation" words.