AI Sentiment Classifier
Uncover Real-Time Sentiment Trends in Social Media Content!
The AI Sentiment Classifier for social media is designed to analyze and determine the sentiment conveyed within social media content. This model efficiently identifies sentiments—such as positive, negative, or neutral—across multiple languages, providing valuable insights into public perception and customer sentiment. This model is optimized for both real-time and batch processing, it’s a powerful tool for gauging engagement, audience mood, and emerging trends at scale.
The AI Sentiment Classifier is LLM-based, with Gemini as its core, providing sentiment analysis. It achieves a 90% accuracy rate, validated through extensive testing on widely recognized benchmark datasets such as Sentiment140. Through advanced pre- and post-processing techniques, it analyzes keyword and emoji contexts, connecting terms and emojis to sentiment tone and key topics for sentiment predictions rather than simple keyword matching.
Adding to your Dynamic Pipeline
This component can be seamlessly integrated into your Dynamic pipelines through the "AI Sentiment Classifier" component. It requires the following fields for configuration:
Destination Path (Required): The "enrichment.sentiment" field is designated to store the sentiment output. This output includes a sentiment label—one of three possible labels (positive, neutral, or negative)—alongside a confidence score ranging from 0 to 1, reflecting the model's certainty for each sentiment detected.
Target Text (Required): This is the metadata field containing the input text for sentiment analysis. By default, it’s set to content.body, but any field containing relevant text can be used.
If the Gemini Model encounters safety issues with certain content, you will find that Gemini API failed to generate output.
Dynamic Pipeline Configuration Example
The following example shows a dynamic pipeline configuration for the AI Sentiment Classifier component. If Unify is the preceding step in your pipeline, you can set it up as follows:
- content.body from the input document is specified as the Target Text for the AI Sentiment Classifier.
- enrichment.sentiments is designated as the Destination Path for storing the AI Sentiment Classifier output.
Sample Example Output
Compatible Languages
The Micro Classifier supports content in multiple languages. When the input text is in a language other than English, the component automatically detects the language and performs the sentiment classification accordingly. Sentiment label will be provided in English. The language coverage is continuously improved as this component uses Google Gemini 1.5 Flash in the back end. Referring to https://ai.google.dev/gemini-api/docs/models/gemini#gemini-1.5-flash the language coverage is:
Language | Language ID (ISO-639) |
---|---|
Arabic | ar |
Bengali | bn |
Bulgarian | bg |
Chinese | zh |
Croatian | hr |
Czech | cs |
Danish | da |
Dutch | nl |
English | en |
Estonian | et |
Finnish | fi |
French | fr |
German | de |
Greek | el |
Hebrew | iw |
Hindi | hi |
Hungarian | hu |
Indonesian | id |
Italian | it |
Japanese | ja |
Korean | ko |
Latvian | lv |
Lithuanian | lt |
Norwegian | no |
Polish | pl |
Portuguese | pt |
Romanian | ro |
Russian | ru |
Serbian | sr |
Slovak | sk |
Slovenian | sl |
Spanish | es |
Swahili | sw |
Swedish | sv |
Thai | th |
Turkish | tr |
Ukrainian | uk |
Vietnamese | vi |
Updated 6 days ago