SentimentAnalysis
Positive / negative / neutral polarity.
Three specialized engines working together: SentimentAnalysis for
polarity detection, EmotionDetection for nuanced feelings, and
SarcasmDetection for ironic undertones. Run 100% on-device with
99.5% accuracy. Fine-tune with your domain data. Ship to production in hours.
SentimentAnalysisPositive / negative / neutral polarity.
EmotionDetectionSix primary emotions with scores.
SarcasmDetectionCatch ironic undertones.
Every customer interaction generates unstructured text data. Reviews, support tickets, social mentions, survey responses. Without intelligent analysis, critical insights remain buried. Cloud APIs introduce latency, privacy concerns, and unpredictable costs.
01
Combine SentimentAnalysis, EmotionDetection, and SarcasmDetection for nuanced understanding that catches what others miss.
02
All processing happens locally. No data leaves your infrastructure. Perfect for healthcare, finance, and regulated industries.
03
Generate LoRA adapters using your domain data. Custom models that understand your industry's unique language and context.
04
Our proprietary sampling delivers 99.5% accuracy even with smaller models running on CPU. Enterprise performance, edge deployment.
Each engine specializes in a different dimension of text analysis. Use them individually or combine them for comprehensive emotional intelligence.
Engine 01
SentimentAnalysisClassify text polarity with industry-leading accuracy. Enable NeutralSupport for three-way classification of objective content.
Engine 02
EmotionDetectionIdentify six primary emotions with confidence scores. Understand not just if content is negative, but why: anger vs. sadness vs. fear.
Engine 03
SarcasmDetectionDetect ironic and sarcastic undertones that would otherwise mislead analysis. Essential for social media and customer feedback.
SentimentAnalysis class.The foundation of emotional intelligence in your .NET applications. SentimentAnalysis delivers production-grade polarity detection with multilingual support, neutral classification, and fine-tuning capabilities. Powered by LM-Kit's Dynamic Sampling for maximum accuracy on any hardware.
NeutralSupport property enables three-way classification for objective contentGetSentimentCategory returns Positive, Negative, or NeutralGetConfidenceScores returns probability distribution across categoriesCreateTrainingObject for custom fine-tuning with LoRA adaptersusing LMKit.TextAnalysis; var model = LM.LoadFromModelID("lmkit-sentiment-analysis"); var sentiment = new SentimentAnalysis(model) { NeutralSupport = true }; // Single classification var result = sentiment.GetSentimentCategory( "This product exceeded all my expectations!"); Console.WriteLine($"Sentiment: {result}"); // Output: Positive // Get detailed confidence scores var scores = sentiment.GetConfidenceScores(text);
EmotionDetection class.Go beyond polarity to understand why content feels a certain way. EmotionDetection identifies six primary emotions based on Ekman's model: joy, anger, sadness, fear, surprise, and disgust. Essential for nuanced customer experience analysis and mental health applications.
GetEmotionCategory returns the primary emotion detectedGetEmotionScores returns confidence for all six emotionsusing LMKit.TextAnalysis; var model = LM.LoadFromModelID("qwen3.5:4b"); var emotions = new EmotionDetection(model); // Detect primary emotion var emotion = emotions.GetEmotionCategory( "I can't believe they cancelled my order!"); Console.WriteLine($"Emotion: {emotion}"); // Output: Anger // Get full emotion distribution var scores = emotions.GetEmotionScores( "The news left me speechless");
SarcasmDetection class.The missing piece in sentiment analysis. SarcasmDetection identifies ironic undertones that would otherwise mislead polarity classifiers. "Oh great, another meeting" reads as positive to basic sentiment analysis but negative to humans. Sarcasm detection bridges that gap.
IsSarcastic returns boolean detection resultGetSarcasmScore returns confidence level (0.0 to 1.0)SentimentAnalysis to adjust polarity based on ironyusing LMKit.TextAnalysis; var model = LM.LoadFromModelID("qwen3.5:4b"); var sarcasm = new SarcasmDetection(model); // Quick boolean check bool isSarcastic = sarcasm.IsSarcastic( "Oh wonderful, another Monday morning meeting."); Console.WriteLine($"Sarcastic: {isSarcastic}"); // Output: Sarcastic: True // Get confidence score float score = sarcasm.GetSarcasmScore( "Best customer service ever");
Generic models struggle with industry-specific language. Medical sentiment differs from e-commerce. Financial news has unique emotional signals. LM-Kit's fine-tuning system lets you generate custom LoRA adapters that understand your domain's unique vocabulary and context.
CreateTrainingObject method on all sentiment classesDomain
Train on product reviews with star ratings. Understand "runs small" as negative for clothing, neutral for equipment.
Domain
Learn your ticket language. Recognize urgency signals, escalation indicators, and resolution satisfaction.
Domain
Interpret market sentiment from earnings calls, analyst reports, and news. "Beat expectations" vs. "met expectations."
Domain
Understand patient sentiment with medical terminology. Detect emotional distress signals in clinical notes.
Industry-leading accuracy powered by Dynamic Sampling technology. Tested on standard sentiment analysis benchmarks.
Classification accuracy
Average inference time
Error reduction vs. baseline
Faster than cloud APIs
Benchmarked on SST-2, IMDB, and Yelp datasets. Results with lm-kit-sentiment-analysis-2.0-1b model. View full benchmark methodology
Organizations across industries leverage LM-Kit's sentiment engines to automate workflows, detect issues early, and understand their customers.
Support
Route angry customers to senior agents. Detect frustration early in conversations. Prioritize tickets by emotional urgency, not just keywords.
Social
Track brand sentiment in real-time. Detect emerging crises before they go viral. Identify sarcastic mentions that skew sentiment metrics.
Reviews
Extract actionable insights from product reviews. Understand what drives positive vs. negative feedback. Identify feature requests hidden in complaints.
VOC
Aggregate sentiment across all channels: email, chat, surveys, calls. Build unified dashboards showing customer happiness trends over time.
Research
Analyze competitor sentiment. Track public opinion on industry topics. Measure campaign effectiveness through emotional response.
HR
Analyze internal survey responses. Detect morale issues in team communications. Track sentiment changes after organizational changes.
From NuGet install to production sentiment analysis in under 10 minutes. No cloud keys, no API limits, no surprises.
dotnet add package LMKit.NETLM.LoadFromModelID("lmkit-sentiment-analysis")new SentimentAnalysis(model)sentiment.GetSentimentCategory(text)NeutralSupport if classifying objective contentSarcasmDetection for social media and review analysisComplete documentation for all sentiment analysis classes, methods, and properties.
SentimentAnalysisCore sentiment classification with positive, negative, and optional neutral categories. Includes confidence scores and fine-tuning support.
EmotionDetectionSix-emotion classification: joy, anger, sadness, fear, surprise, disgust. Full probability distribution for multi-emotion analysis.
SarcasmDetectionBinary sarcasm classification with confidence scores. Essential for accurate social media and review sentiment analysis.
SentimentCategoryEnumeration of sentiment categories: Positive, Negative, Neutral. Returned by GetSentimentCategory method.
EmotionCategoryEnumeration of emotion categories: Joy, Anger, Sadness, Fear, Surprise, Disgust. Based on Ekman's emotion model.
TrainingObjectObject for creating fine-tuning datasets. Used with CreateTrainingObject to generate LoRA adapters for custom models.
Working console demos on GitHub, step-by-step how-to guides on the docs site, and the API reference for the classes used on this page.
Console demo: classify feedback in one line of code.
Open on GitHub → DemoConsole demo: classify joy, anger, sadness, fear, surprise, disgust.
Open on GitHub → How-to guideEnd-to-end how-to: model selection, batching, fine-tuning.
Read the guide → API referenceAPI reference for the SentimentAnalysis class.
Open the reference →Three powerful engines. 99.5% accuracy. 100% on-device privacy. Fine-tunable with your data. Start building intelligent .NET applications today.