Look what's just come on the market in #ValThorens! A recently renovated, charming 6 bed duplex apartment in the heart of the resort with superb views!
Sentiment analysis is the process of extracting a general sentiment from a block of text. Basically it's about determining whether the text is positive or negative.
Generative AI models like ChatGPT, GPT-3.5, GPT-4, LLaMA 3, Yi 34B, and Mixtral 8x7B, are very good at performing sentiment analysis and emotion analysis.
For example, let's imagine our program finds the following Twit:
Look what's just come on the market in #ValThorens! A recently renovated, charming 6 bed duplex apartment in the heart of the resort with superb views!
This is a commercial Twit that clearly shows a positive sentiment.
The Natural Language Processing model in charge of sentiment analysis would return the main sentiment and its likelihood. Here we would get a positive sentiment with a high likelihood.
Emotion analysis is about detecting one or several emotions from a block of text: sadness, joy, love, anger, fear, surprise...
The Natural Language Processing model in charge of emotion analysis would return each emotion together with its likelihood.
Sentiment analysis and emotion analysis can be achieved with generative AI models like GPT-4 or GPT-3.5 but also but open-source alternatives like LLaMA 3, Mixtral 8x7B, Yi 34B, and more. On NLP Cloud you can perform sentiment analysis and emotion analysis either with small and fast models like DistilBERT or with larger generative AI models like LLaMA 3, Mixtral 8x7B, or Yi 34B. tr%
Sentiment and emotion analyses can be interesting in many situations. Let's give you a couple of examples.
Imagine you're working in a marketing department that is regularly posting new content on social networks. You might want to automatically monitor the user reactions in order to quickly intervene in case of negative feedback.
Some support requests might be more urgent than others, depending on how angry users are. Detecting the user's sentiment automatically can help support address critical tickets more quickly.
Gauging the sentiment of a couple of persons on the internet is easy, but understanding the global sentiment of thousands of persons is another thing. Automated sentiment analysis is the key solution here.
Right after launching a new product, it can be critical to react quickly in case of poor reception by customers, bloggers, journalists... Sentiment analysis can help in such situations.
NLP Cloud proposes a sentiment analysis API that allows you to perform sentiment analysis and emotion analysis out of the box, based on DistilBERT Base Uncased Finetuned SST-2, Distilbert Base Uncased Emotion, Prosus AI's Finbert, LLaMA 3, Mixtral 8x7B, Yi 34B, and more. They are very good alternatives to ChatGPT, GPT-3.5, and GPT-4. The response time (latency) is very low for the DistilBERT and Finbert models. Accuracy is higher with generative models like LLaMA 3, Mixtral 8x7B and Yi 34B. You can either use the pre-trained model or train your own model, or upload your own custom models!
For more details, see our documentation about sentiment analysis here. For advanced usage, see the text generation API endpoint here. And easily test sentiment analysis on our playground.
Testing sentiment/emotion analysis locally is one thing, but using it reliably in production is another thing. With NLP Cloud you can just do both!