1. Introduction
In particular, when it comes to social media, doing sentiment analysis is a difficult study challenge. Posts on social media provide operators the opportunity to openly discuss their thoughts, emotions, and perspectives on a variety of current events, issues, and other matters. It is necessary to analyze these postings to have an understanding of the underlying emotion that is being communicated. Sentiment analysis, also known as emotion AI, is the procedure of understanding and gauging human emotions by assessing opinions from written language[1], [2]. This process is known as "sentiment analysis." Users from all over the globe can connect, communicate with one another, and share their thoughts on many common themes thanks to social media. In addition to serving as a measurement of the effectiveness of social media, Social Sentiment Analysis may be used for the improvement of customer service and marketing[3], [4]. In the new years, the influence of websites for social media on day-to-day life has grown to such an extent that information about major and minor accidents or catastrophes may even be acquired via the use of social media websites[5], [6]. Not only do the users convey the material of the events, but also their sentiments about the occurrences. Researchers have paid a significant amount of attention, over the last decade, to the automated mining of sentiment from these postings and the classification of it into distinct polarities, including positive, negative, and neutral[7]–[9].
Twitter is one of the most commonly used social media stages, and it has an impressive 255 million active users every month [10], [11]. The usage of casual language, short forms, abbreviated versions of words, high reliance on emoticons, and slang are some of the issues that come with analyzing tweets[12]–[14]. Because of the restricted amount of tweets, Twitter, which is also known as microblogging, makes it impossible to quantify the polarity of an argument. The fuzzy logic can be used in sentiment analysis[15].
The truth value in fuzzy logic (FL) might vary from 0 to 1, rather than being a binary number as it is in deterministic logic. FL is an extension of deterministic logic[16], [17]. The transformation of an issue from one with clear-cut answers into one with ambiguous outcomes is the major goal of the FL theory. In the subject of artificial intelligence, converting human knowledge into representations of natural language may very well be the least difficult approach to what is known as knowledge representation. These rules are founded on natural language descriptions and models, both of which are founded on FS and FL in and of themselves[18], [19]. It is well-accepted that classification techniques and categorization technologies that are powered by fuzzy rule-based classification systems are very strong. As a result of the existence of fuzziness, these systems can deal with ambiguity, uncertainty, or confusion in a very effective manner. While in the neutrosophic set, an indeterminacy membership is denoted individually, coupled with a truth membership and a falsity membership, to individually reflect indeterminate, unpredictable, ambiguous, and uncertain information from the actual world[20], [21].
2. Background
The study that is focused on evaluating data obtained from social media platforms is now receiving a lot of attention. This sort of study is undertaken to serve a variety of applications (such as the economy, medical services, and others), and it is most often divided into covariance and content-based studies. The covariance analysis investigates the fundamental structure of the social network, concentrating on the relationships between nodes (also known as users), and examines the topology of the network. The material that is generated by nodes and distributed throughout social media is the focus of the content-based analysis.
Various methods including Symbolic and ML may be used to determine an author's feelings from their written words. In comparison, the Symbolic approaches are more complicated and inefficient than the Machine Learning techniques. The analysis of sentiment on Twitter is possible by using these strategies. When attempting to find an emotive term from inside a set of tweets including various keywords, some challenges must be overcome. It is also challenging to deal with misspelled words and terms used in slang. After performing the necessary preprocessing processes, an effective feature vector is constructed by extracting features in two stages. This is done so that the concerns may be addressed. The first thing that is done is to extract features that are unique to Twitter and add them to the feature vector. After then, these characteristics are deleted from tweets, and feature extraction is performed on tweets once again in the same manner that it is performed on regular text. The feature vector will also be updated to include these features. Several different algorithms, including Nave Bayes, SVM, Maximum Entropy, and Ensemble classifiers, are used to evaluate the generalization ability of the feature vector. The correctness of each of these classifiers is practically the same for the newly introduced feature vector. The electrical goods domain benefits greatly from the performance of this feature vector[22].
Since the quantity of people using social media has increased at such a rapid rate over the past few years, researchers have become increasingly interested in the use of data gleaned from social media platforms to conduct sentiment analysis on groups of individuals, specific products, or specific people or events. When it comes to expressing one's opinions on social media, Twitter is one of the most popular platforms. Anurag and Katkar[23] gave a presentation on an approach for analyzing the feelings of consumers via the use of data mining classifiers. In addition to this, it evaluates the effectiveness of single classifiers in contrast to ensembles of classifiers while doing sentiment analysis. The k-nearest neighbor classifier provides a very high level of predicted accuracy, as shown by the experimental results that were achieved. The results also show that individual classifiers perform better than approaches that use many classifiers together.
The process of determining the feelings and perspectives conveyed in tweets is referred to as Twitter Sentiment Analysis. The primary computational stages involved in this method are identifying the polarity or mood of the tweet and then classifying the tweets as either optimistic or bad. Finding the best appropriate sentiment classifier that can accurately categorize tweets is the key challenge that is associated with doing Twitter sentiment analysis. In most cases, fundamental classification strategies such as the Naive Bayes classifier, the Random Forest classifier, support vector machines (SVMs), and logistic regression are used. Ankita and Saleenaa[24] came up with the idea of an ensemble classifier, which is a single classifier formed by combining the base training classifier and another classifier into a single one. Their goal was to improve the performance and precision of a method for classifying sentiment. According to the findings, the suggested ensemble classifier performs much better than both stand-alone classifiers and the ensemble classifier based on majority voting. Furthermore, as part of this study, an investigation of the function that data pre-processing and feature presentation play in techniques for sentiment classification is carried out.
The fields of NLP, information recovery, and text mining all include opinion mining as a subfield of their respective practices. Opinion is the method of extracting human opinions and ideas from formless texts. Opinion mining has become an issue that is useful, attractive, and challenging as a result of the proliferation of online social media and the large capacity of user explanations. Opinion quarrying is the procedure. The absence of a complete study that investigates these topics from every angle is palpable, even though this field has been the subject of a wide range of studies following a variety of methodologies and directions. To have a well understanding of the obtainable tasks and results and to explain the future track, Hemmatian and Sohrabi [25]represented a comprehensive, polygonal, and methodical review of opinion mining and computational linguistics to classify methodological approaches and compare their rewards and disadvantages. To achieve this goal, they presented a systematic approach to opinion mining along with its stages and levels. They then totally monitored, classified, summed up, and compared the various proposed methods for aspect extraction, viewpoint categorization, swift production, and assessment, founded on the chief scientific works that have been validated. To have a more accurate comparison, we also offer certain characteristics in each area. These factors allow having a better knowledge of the benefits and drawbacks of the various approaches.
3. The suggested work
Tweets often undergo sentiment analysis to determine if they should be categorized as positive, neutral, or negative. The most common reason for doing sentiment analysis on tweets is to learn how people generally feel about a certain issue that is currently trending. It is common knowledge that there are numerous gradations of agreement, disagreement, and neutrality; it is also common knowledge that neutrality involves an element of uncertainty. There is no need that the quantity of positivity included in each of the two tweets that are considered to be positive to be precisely the same. One of them may be very positively pessimistic, while the other one is somewhat positively pessimistic but contains a significant amount of ambiguity or indecision. This novel suggested approach of analysis making use of neutrosophic sets will result in a larger degree of complexity, but it will also provide a more accurate forecast of the polarity of the tweet. To retrieve tweets, an application programming interface (API) for Twitter was developed, and a client key, client secret, identifier, and access credential secret were constructed. To do data analysis on the gathered tweets, Python programming language was used. The tweeps python client was used to get tweets from Twitter. Processing textual data is made easier with the aid of the TextBlob Python package. It gives users access to a straightforward API for NLP. In our research, the analysis of sentiment was carried out using TextBlob. TextBlob's sentiment property will return a tuple with the name Sentiment when called. It yields two attributes, polarity and subjectivity, and it has the form of Sentiment(polarity, subjectivity). The polarity rating is a float number that may take on any value between 0.0 and 1.0, with 1.0 indicating a positive statement and 0.0 representing a negative statement. Let's say the polarity rating of the tweet is denoted by R(x).
3.1 Text Pre-Processing
The amount of text that may be shared through social media is restricted. The extreme number of letters that may be used in a tweet on Twitter is 280. Previously, you could only use up to 140 characters. Users may upload extra information that shows emotion by utilizing acronyms, emojis, hashtags, slang, or URLs. Users can also share links to relevant content. Therefore, the text has to be preprocessed to retrieve the information that is important and valuable by first eliminating the noisy data. Because they do not convey any kind of feeling, we have made the decision to do away with URLs and the sign @ that was formerly used to refer to user names. We have reworded widely used phrases to reflect their correct grammatical form, such as replacing "can't" with "can not." Because tokens containing "#" (hashtags) often reflect a feeling, thinking, or opinion about the subject matter of the tweet, we merely remove the "#" from the tokens.
3.2 Lexicon
A set of lexical properties (for example, words) that are commonly categorized per their sentiment polarity as either favorable or negative makes up a sentiment lexicon.
3.3 Single-Valued Neutrosophic Sets (SVNSs)
Tweets are often sorted into one of three categories—positive, negative, or neutral—following industry standards. SVNS is the abbreviation that is used to indicate this category. If the computed polarity is more than zero, the membership is translated to the positive category; if the polarity is less than zero, the membership is translated to the negative category; and if the polarity is zero, the membership is translated to the indeterminate category[26]–[28]. Where polarity 𝑅(𝑥) ∈[0,1] if the outcome is positive and (𝑥) ∈[1,0] if the outcome is negative A unique flavor of neutrosophic sets is denoted by the notation "single valued neutrosophic sets." In this part, some preliminary information is presented, including definitions, operations, and distance measurements between two sets of single-valued neutrosophic variables[29], [30]. Neutrosophic sets are an alternative to traditional FS theory that was first presented by Smarandache with the intention of more accurately reflecting uncertainty and fuzziness in real-world circumstances. Truthiness, indeterminacy, and falsity are the three facets of decision-making circumstances that are taken into account by this approach. Only the membership function degree of an FS is considered in Zadeh's standard formulation of the FS[31]–[33]. A NS setting, on the other hand, takes into account three different membership functions. In contrast to intuitionistic FS, indeterminacy degrees are taken into account here. Having this degree allows specialists to properly explain the reasoning behind their decisions. In addition to this, they may be distinguished from intuitionistic FS by the following characteristics: (1) The total of the amounts of the truthiness, indeterminacy, and falsity parameters cannot exceed three, and each value may be assigned separately. (2) The value of indeterminacy does not rely on the values that are assigned to the truthiness and falsity parameters. (3) They prolong the debates amongst those making decisions[34]–[36]. Definition 1 Using a truth-membership 𝑋𝑛(𝑎), an indeterminacy-membership 𝑌𝑛(𝑎), and a falsity-membership 𝑍𝑛(𝑎), one may establish that a SVNSs exists. For all values of a, we have. 𝑋𝑛(𝑎), 𝑌𝑛(𝑎), 𝑍𝑛(𝑎) ∈ [0,1]. The relation 0 ≤𝑋𝑛(𝑎) + 𝑌𝑛(𝑎) + 𝑍𝑛(𝑎) ≤3 is valid for all values of x when referring to the sum of three membership functions of a single-valued neutrosophic set. This is true for all a. Definition 2 The following is a definition of several operation sets that are defined among two SVNSs: Suppose 𝑃= < 𝑋𝑝(𝑎), 𝑌𝑝(𝑎), 𝑍𝑝(𝑎) >, 𝑞= < 𝑋𝑞(𝑎), 𝑌𝑞(𝑎), 𝑍𝑞(𝑎) >
Definition 3 The Euclidean distance can be computed as:
Definition 4 The normalized Euclidean distance can be computed as:
4. Experiment Setup and Implementation
This section provides a report on the experimental setting as well as the implementation of the suggested neutrosophic classifier for Sentiment Analysis. Python has been chosen as the language of implementation for our neutrosophic system. We used the Sanders Twitter Dataset. The Sanders Twitter Dataset is comprised of tweets about the following four distinct topics: Apple, Google, Microsoft, and Twitter. One annotator went over each tweet and personally assigned it a score that indicated whether it was favorable, negative, neutral, or irrelevant to the issue. While the tweets in the training dataset are human-annotated, the tweets in the training sample are computer annotated based on emoticons. Searching the Twitter API with specific searches that included the names of items, persons, and businesses yielded the collection of tweets that make up the test set. The dataset consists of three different classes (i.e. positive, negative, and neutral). Figure 1 illustrates the breakdown of tweets in the dataset into the three categories of positive, negative, and neutral sentiment.
Figure 1: Breakdown of tweets in the dataset. In table 1there are 10 opinions of tweets and their SVNS. In opinion 1 the SVNS has a 0.1 in true, 0.3 in indeterminacy, and 0.6 is false so the target class is negative due to the false value having the highest value. In opinion 2 the SVNS has a 0.8 in true, 0.1 in indeterminacy, and 0.1 is false so the target class is positive due to the true value having the highest value. In opinion 3 the SVNS has a 0.9 in true, 0.1 in indeterminacy, and 0 is false so the target class is positive due to the true value having the highest value. In opinion 4 the SVNS has a 0.5 in true, 0.3 in indeterminacy, and 0.2 is false so the target class is positive due to the true value having the highest value. In opinion 5 the SVNS has a 0.6 in true, 0.3 in indeterminacy, and 0.1 is false so the target class is positive due to the true value having the highest value. In opinion 6 the SVNS has a 0.2 in true, 0.3 in indeterminacy, and 0.5 is false so the target class is negative due to the true value having the highest value. In opinion 7 the SVNS has a 0.1 in true, 0.4 in indeterminacy, and 0.5 is false so the target class is negative due to the true value having the highest value. In opinion 8 the SVNS has a 0.3 in true, 0.3 in indeterminacy, and 0.4 is false so the target class is negative due to the true value having the highest value. In opinion 9 the SVNS has a 0.1 in true, 0.2 in indeterminacy, and 0.7 is false so the target class is negative due to the true value having the highest value. In opinion 10 the SVNS has a 0.3 in true, 0.1 in indeterminacy, and 0.6 is false so the target class is negative due to the true value having the highest value. Then we applied the FS in the sample of data as shown in table 2. From table 2 opinions 1, and 4 have a negative outcome due to the highest value of false. Opinion 2,3 has a positive outcome due to the highest value of the true score. But in opinion 5 the score of true and false are equal, so the model does not achieve the output. So the FS is a less powerful tool compared to the NS.
#5 (0.5.0.5) No output We applied the SVNs to the suggested dataset. Figure 2 shows the precision and recall scores.
5. Conclusion
Traditional sentiment classification and fuzzy sentiment classification both fall short when it comes to capturing the indecision and apathy that are apparent in the material. The employment of neutrosophy in the evaluation of tweets allows for the indeterminacy to be managed.
This article defines a concept known as SVNS, which may have either positive memberships or indeterminate memberships, as well as negative memberships. We will explore its qualities as well as the numerous operators.
The data was collected by using a custom Twitter API, which allowed for the extraction of tweets. The essential libraries for natural language processing were included in the programming, and Python was used to carry out the programming.