Skip to main content
AI in Cybersecurity

Using Watson NLU to help address bias in AI sentiment analysis

By September 30, 2024November 28th, 2024No Comments

Can ChatGPT Compete with Domain-Specific Sentiment Analysis Machine Learning Models? by Francisco Caio Lima Paiva

semantic analysis example

Figure 4 shows the economic-related keywords that can have a major role in influencing consumer confidence (those with the most significant Granger-causality scores, as presented in Section “Results”). After training, the Word2Vec neural network produces vectors for terms but not tweets. For the results of this analysis to be compatible with the other scoring mechanisms, a single scalar value would need to be determined for each tweet. The following formulae were used to derive a scalar score for the tweet from an amalgamation of the component term vectors.

semantic analysis example

It has redesigned its graphic user interface (GUI) and API with a simpler platform to serve both technical and non-technical users. Additionally, it has included custom extractors and classifiers, so you can train an ML model to extract custom data within text and classify texts into tags. Talkwalker helps users access actionable social data with its comprehensive yet easy-to-use social monitoring tools. You can foun additiona information about ai customer service and artificial intelligence and NLP. For instance, users can define their data segmentation in plain language, which gives a better experience even for beginners.

When we evaluate the daily upvote rates in Figure 2, differently from the aforementioned analysis, there are no significant changes in the trend in the number of upvotes over time. This could mean that, whilst the users are still receptive and supportive toward the Ukrainian conflict (they keep upvoting the most important posts), they are less engaged, posting and commenting less. We developed a linear regression model having the price of the ticker as the dependent variable and either the average weighted daily hope score or the weighted average daily fear score as the independent one. Then for each data set, we ran this linear regression model and calculated the corresponding parameters for each modeling. Similar to the Zelenskyy vs. Putin analysis, two new databases were created. The first one included only submissions that contained the name “Ukraine,” whilst the second only had only observations that presented the name “Russia.” Subsequently, the polarity score was measured using the TextBlob polarity method.

Trying non-Bayesian algorithms

This tool helps you understand how these mentions evolve over time, enabling you to determine if your brand perception is improving. By analyzing these insights, you can make informed decisions to refine your strategies and improve your overall brand health. That said, you also need to monitor online review forums and third-party sites. Tracking mentions on these platforms can provide additional context to the social media feedback you receive.

  • On my learning journey, I started with the simplest option, TextBlob, and worked my way up to using transformers for deep learning with Pytorch and Tensorflow.
  • The data that support the findings of this study are available from the author Barbara Guardabascio upon reasonable request.
  • Organizations typically collect feedback through standardized or open-ended employee surveys that are conducted periodically to detect changes in employee satisfaction and other perceptions over time.
  • Social media sentiment analysis can help you understand why customers might prefer a competitor’s product over yours, allowing you to identify gaps and opportunities in your offerings.
  • The surface plotted in this sub-plot shows the 2-regressor model fit plane.
  • To examine the harmful impact of bias in sentimental analysis ML models, let’s analyze how bias can be embedded in language used to depict gender.

Its advanced machine learning models let product teams identify customer pain points, drivers, and sentiments across different contact sources. We chose MonkeyLearn as one of the top sentiment analysis tools because it helps businesses access real-time analysis with easy integrations from third-party apps. This platform also enables users to trigger actions and set up rules based on sentiments, such as escalating negative cases, prioritizing positive comments, or tagging tickets. MonkeyLearn’s workflow integrations provide a holistic view of customer sentiments gathered from various sources, resulting in rich insights and more actionable data. IBM Watson NLU has an easy-to-use dashboard that lets you extract, classify, and customize text for sentiment analysis.

Pricing is based on NLU items, which measure API usage and are equivalent to one text unit, or up to 10,000 characters. Daniel Fallmann founded Mindbreeze in 2005 and as its CEO he is a living example of high quality and innovation standards. From the company’s very beginning, Fallmann, together with his team, laid the foundation for the highly scalable and intelligent Mindbreeze InSpire appliance.

Top 5 Applications of Semantic Analysis in 2022

To implement this representation, we use the TfidfTransformer function from sklearn’s library. Fitting occurs on the training set and the values for the same words are determined for the test set. It’s also interesting to see the distribution of the length of movie reviews (word count) split according to sentiment. The spread is similar in shape for both types of reviews however negative reviews are on average a tad shorter.

semantic analysis example

Our extensive experiments on benchmark datasets show that the proposed approach achieves the state-of-the-art performance on all benchmark datasets. Our work clearly demonstrates that by leveraging DNN for feature extraction, GML can easily outperform the pure DNN solutions. I realized that if I wanted greater accuracy, I needed to use machine learning; contextualization was key. I started with conventional shallow learning approaches like logistic regression and support vector machine algorithms used in single layer neural nets.

For each item (could be an entry, sentence, line of text), we transform the text into a frequency count in the form of a vector. In this case, we limit it to the top 5000 words to restrict the dimensionality of the data. We code this by setting up a count vectorizer from sklearn’s library, fit it on the training data and then transform both the training and test data.

The major difference in Rosenblatt’s model is that inputs are combined in a weighted sum and, if the weighted sum exceeds a predefined threshold, the neuron fires and produces an output. It was only a decade later that Frank Rosenblatt extended this model, and created an algorithm that could learn the weights in order to generate an output. The only way to get the desired output was if the weights, working as catalyst in the model, were set beforehand. The first application of the neuron replicated a logic gate, where you have one or two binary inputs, and a boolean function that only gets activated given the right inputs and weights. This model of computation was intentionally called neuron, because it tried to mimic how the core building block of the brain worked. Just like brain neurons receive electrical signals, McCulloch and Pitts’ neuron received inputs and, if these signals were strong enough, passed them on to other neurons.

1, extremely long roles can be attributed to multiple substructures nested within the semantic role, such as A1 in Structure 1 (Fig. 1) in the English sentence, which contains three sub-structures. In contrast, this multi-layered nested structure is deconstructed and decomposed in translated texts through the divide translation, and the number of sub-structures contained in each semantic role is controlled no greater than 1. This example proves that the informational structures in the translated texts are significantly simplified by reducing the number of nested sub-structures in semantic roles.

1. Reddit data

In the vector dimensional space of word embeddings, vectors of words with similar context or meaning will tend to congregate. One way to quantify vectors’ spatial proximity can be done by comparing their internal angles. It is important that the analysis functionality of this system be efficient at a level of computational infrastructure investment attainable in situations where funds and capability are limited on short notice9. Again, while corpora of millions or billions of lines of text are necessary to train more universal text recognition machine learning models, their efficiency can often be measured in hours or days10. The typical response in cases of emergency must be significantly shorter.

By gradual learning, GML can effectively bridge distribution alignment between labeled training data and unlabeled target data. GML has been successfully applied to the task of Aspect-Level Sentiment Analysis (ALSA)6,7 as well as entity resolution8. Even without leveraging ChatGPT labeled training data, the existing unsupervised GML solutions can achieve competitive performance compared with supervised DNN models. However, the performance of these unsupervised solutions is still constrained by inaccurate and insufficient knowledge conveyance.

Berners-Lee proposed an illustration or model called the Semantic Web Stack to help visualize the different kinds of tools and operations that must come together to enable the Semantic Web. The stack can help developers explore ways to go from simply linking to other webpages to linking data and information ChatGPT App across webpages, documents, applications and data sources. In SEO, all major search engines now support Semantic Web capabilities for connecting information using specialized schemas about common categories of entities, such as products, books, movies, recipes and businesses that a person might query.

NLTK-VADER is an NLP package developed specifically for processing social media text. I suggest checking it out if you are working with tweets and looking for a point of comparison for TextBlob. Performing root cause analysis using machine learning, we need to be able to detect that something which trends. Trend Analysis in Machine Learning in Text Mining is the method of defining innovative, and unseen knowledge from unstructured, semi-structured and structured textual data. It aims to detect spike of events and topics in terms of frequency of appearance in specfic sources or domains. This gives significant insight for spam and fraudulent news and posts detection.

This paper adopts Maslow’s hierarchy of needs theory, which includes seven levels of physiological, safety, belonging and love, self-esteem, cognitive, aesthetic, and self-actualization needs, for guiding the labeling of danmaku emotions. This paper invited 10 senior Bilibili users to watch the video and then use the method to label the sentiment semantic analysis example polarity of danmaku text. Compared with the labeling without using the method, the difficulty of the labeling is greatly reduced, and the speed and accuracy of the labeling are significantly improved. These Internet buzzwords contain rich semantic and emotional information, but are difficult to be recognized by general-purpose lexical tools.

Attention mechanisms improved the accuracy of these networks, and then in 2017 the transformer architecture introduced a way to use attention mechanisms without recurrence or convolutions. Therefore, the biggest development in deep learning for NLP in the past couple years is undoubtedly the advent of transformers. The source of information for sentiment analysis can be diverse, e.g., written text or voice, whilst the entities could be events, topics, individuals, and many more (Liu, 2020). Sentiment analysis is also a broader name for many other tasks, such as opinion mining, sentiment mining, emotion analysis, and mining (Dave et al., 2003; Nasukawa and Yi, 2003; Liu, 2020).

The PSS and NSS can then be calculated by a simple cosine similarity between the review vector and the positive and negative vectors, respectively. 5 using labeled training data, and then exploit the resulting vector representations (the last-layer embeddings) for polarity similarity detection. In the implementation, we have constructed the DNN of polarity classification based on the state-of-the-art EFL model28. For each unlabeled sentence in a target workload, we extract its k-nearest neighbors from both the labeled and unlabeled instances.

This data set contains roughly 15K tweets with 3 possible classes for the sentiment (positive, negative and neutral). In my previous post, we tried to classify the tweets by tokenizing the words and applying two classifiers. Today, businesses want to know what buyers say about their brand and how they feel about their products. However, with all of the “noise” filling our email, social and other communication channels, listening to customers has become a difficult task.

Word embeddings for sentiment analysis – Towards Data Science

Word embeddings for sentiment analysis.

Posted: Mon, 27 Aug 2018 18:12:55 GMT [source]

Comparisons of different scalar formulas were conducted across several tuning parameters. We found that Dot Product with a word window size of 8 resulted in the maximum AU_ROC. We saw that the appropriate minimum word frequency varied depending on the scalar comparison formula. The optimum value for minimum word frequency for Dot Product was found to be 3 whereas the optimal value for all other formulas was 8. This indicates that the performance of the model is tied to the scalar comparison used and its optimal setting. The default setting of 100 dimensions proved to be adequate for the hidden layer dimensionality setting.

In the process of GML, the labels of inference variables need to be gradually inferred. It is noteworthy that all the above-mentioned deep learning solutions for SLSA were built upon the i.i.d learning paradigm. For a down-stream task of SLSA, their practical efficacy usually depends on sufficiently large quantities of labeled training data.

Word embeddings for sentiment analysis

The Watson NLU product team has made strides to identify and mitigate bias by introducing new product features. As of August 2020, users of IBM Watson Natural Language Understanding can use our custom sentiment model feature in Beta (currently English only). Data scientists and SMEs must build dictionaries of words that are somewhat synonymous with the term interpreted with a bias to reduce bias in sentiment analysis capabilities. For example, say your company uses an AI solution for HR to help review prospective new hires.

  • This is an interesting observation, especially when compared to hope, which decreases in the same time period.
  • Evidence for simplification in information structure is also found in the form of fewer syntactic nestifications, illustrated mainly by a shorter role length of patients (A1) and ranges (A2).
  • Luckily, the structure of Reddit allows us to use id and parent_id to move upwards to the original post from every comment.

This study contributes to the discussion on online media’s role in shaping consumer confidence. By providing an alternative method based on semantic network analysis, we investigate the antecedents of consumer confidence in terms of current and future economic expectations. Our approach is not intended to replace the information obtained from traditional tools but rather to supplement them. For instance, we may use consumer surveys in conjunction with our methods to gain a more comprehensive understanding of the market.

Support Vector Machines (SVMs) are very similar to logistic regression in terms of how they optimize a loss function to generate a decision boundary between data points. The primary difference, however, is the use of “kernel functions”, i.e. functions that transform a complex, nonlinear decision space to one that has higher dimensionality, so that an appropriate hyperplane separating the data points can be found. The SVM classifier looks to maximize the distance of each data point from this hyperplane using “support vectors” that characterize each distance as a vector. The logistic regression model classifies a large percentage of true labels 1 and 5 (strongly negative/positive) as belonging to their neighbour classes (2 and 4).

Successively, it mirrors the “phase two” of the Russian offensive, with a slow and steady trend of hope score. This aspect is also reflected by the fact that central 50% of the observations of the hope score is in the range of 0.054, whilst the total range is 0.264, as it is possible to see from the descriptive statistics in Table 1. Having a vast amount of data containing a multitude of types of human emotions is not only highly exciting in terms of computational data analysis research, but it is also seen to be useful for human behavioral research. In general, there are two main theories on how emotions are formed in the human brain. The first is the discrete emotion theory that says emotions arise from separate neural systems (Shaver et al., 1987; Ekman et al., 2013). In these seminal studies, Ekman et al. (2013) recognize six basic emotions of anger, disgust, fear, joy, sadness, and surprise, whilst Shaver et al. (1987) recognize anger, fear, joy, love, sadness, and surprise.

semantic analysis example

For situations where the text to analyze is short, the PyTorch code library has a relatively simple EmbeddingBag class that can be used to create an effective NLP prediction model. Sentiment analysis is a subset of AI, employing NLP and machine learning to automatically categorize a text and build models to understand the nuances of sentiment expressions. With AI, users can comprehend how customers perceive a certain product or service by converting human language into a form that machines can interpret. Idiomatic is an AI-driven customer intelligence platform that helps businesses discover the voice of their customers. It allows you to categorize and quantify customer feedback from a wide range of data sources including reviews, surveys, and support tickets.

The feedback can inform your approach, and the motivation and positive reinforcement from a great customer interaction can be just what a support agent needs to boost morale. Rule-based systems are simple and easy to program but require fine-tuning and maintenance. For example, “I’m SO happy I had to wait an hour to be seated” may be classified as positive, when it’s negative due to the sarcastic context. Sentiment analysis allows businesses to get into the minds of their customers. Kaggle specifies using the area under the ROC curve as the metric for this competition. ROC is short for Receiving Operator Characteristic and is a probability curve.

If the S3 is positive, we can classify the review as positive, and if it is negative, we can classify it as negative. Now let’s see how such a model performs (The code includes both OSSA and TopSSA approaches, but only the latter will be explored). As you can see in the above screenshot, Google does not allow the negative sentiment expressed in the search query to influence it into showing a web page with a negative sentiment. This research paper studies how to better understand what users mean when they leave online reviews on websites, forums, microblogs and so on. Earlier that year Danny published an official Google announcement about featured snippets where he mentioned sentiment. But the context of sentiment was that for some queries there may be a diversity of opinions and because of that Google might show two featured snippets, one positive and one negative.

Leave a Reply