Solutions · Text Analysis

Multimodal content analysis for .NET.

Extract meaning from text and images with six specialized engines: sentiment analysis, custom classification, keyword extraction, named entity recognition, PII detection, and semantic embeddings. Fine-tune with your data. Run 100% on-device with Dynamic Sampling for maximum accuracy on any hardware.

6 specialized engines Multimodal: text + images Fine-tunable
Engine 01

Sentiment & emotion

Engine 02

Custom classification

Engine 03

Keyword extraction

Engine 04

Named entity recognition

Engine 05

PII extraction

Engine 06

Text & image embeddings

Toolkit overview

Complete text intelligence toolkit.

Six specialized engines working together to extract meaning, detect patterns, and transform unstructured content into actionable insights.

Multimodal

Multimodal processing

Analyze both text and images with unified APIs. Automatic OCR integration extracts content from scanned documents, screenshots, and photos.

Custom

Fine-tunable models

Every analysis engine includes CreateTrainingObject methods for custom fine-tuning. Generate LoRA adapters tailored to your domain and data.

Engine 01

Sentiment & emotion analysis.

Understand the emotional tone behind any content with three specialized engines. SentimentAnalysis classifies text as positive, negative, or neutral with up to 99.5% accuracy. EmotionDetection identifies specific emotions: joy, anger, sadness, fear, surprise, and disgust. SarcasmDetection captures ironic tones that might otherwise mislead analysis. Visit our dedicated Sentiment Analysis page for detailed implementation guidance and advanced use cases.

  • Multilingual support with no configuration required
  • Neutral sentiment support for objective content
  • Fine-tune with your domain data via LoRA adapters
  • Pre-built training datasets for rapid customization
  • Confidence scores for every classification
SentimentExample.cs
var model = LM.LoadFromModelID("lmkit-sentiment-analysis");
var sentiment = new SentimentAnalysis(model) { NeutralSupport = true };

// Analyze sentiment
var result = sentiment.GetSentimentCategory("The product exceeded all expectations!");
Console.WriteLine($"Sentiment: {result}");
// Output: Positive

// Detect specific emotions
var emotions = new EmotionDetection(model);

Sentiment analysis page

Engine 02

Custom text & image classification.

Build classification engines tailored to your exact requirements with the Categorization class. Define any number of categories with optional descriptions, then classify text or images with lightning-fast inference and confidence scores. Works with both text input and multimodal attachments. Visit our dedicated Content Classification page for detailed implementation guidance and advanced use cases.

  • Define unlimited custom categories
  • Multimodal: classify both text and images
  • GetBestCategory for single result, GetTopCategories for ranked list
  • Guidance property for custom classification instructions
  • HandleUnknownCategory for out-of-scope inputs
ClassifyExample.cs
var model = LM.LoadFromModelID("qwen3.5:4b");
var classifier = new Categorization(model);

// Define your categories
var categories = new[] {
    "Technical Support", "Billing Inquiry",
    "Feature Request", "General Feedback"
};

// Classify incoming text
int result = classifier.GetBestCategory(
    categories, "My payment didn't go through");
Console.WriteLine(categories[result]);
// Output: Billing Inquiry

Content classification page

Engine 03

Keyword extraction.

Surface the most relevant terms and phrases from any content with the KeywordExtraction engine. Configure the number of keywords to extract, handle large documents with TextShrinkingStrategy, and optionally specify a target language for multilingual content. Works with both text and image attachments. Visit our dedicated Keyword Extraction page for detailed implementation guidance and advanced use cases.

  • Configurable keyword count with KeywordCount property
  • TextShrinkingStrategy for handling large documents
  • TargetLanguage for multilingual keyword extraction
  • Extract from images with multimodal support
  • Dynamic Sampling for high accuracy with small models
KeywordsExample.cs
var model = LM.LoadFromModelID("qwen3.5:4b");
var extractor = new KeywordExtraction(model)
{
    KeywordCount = 8,
    TargetLanguage = "English"
};

string article = File.ReadAllText("article.txt");
var keywords = extractor.ExtractKeywords(article);
foreach (var kw in keywords)
{
    Console.WriteLine($"- {kw.Value}");
}

// Extract from image
var attachment = new Attachment("infographic.png");

Keyword extraction page

Engine 04

Named entity recognition (NER).

Extract structured information from unstructured content with the NamedEntityRecognition engine. Identify people, organizations, locations, dates, and any custom entity types you define. Each extracted entity includes occurrence positions, enabling precise highlighting or redaction in source documents. Visit our dedicated NER page for detailed implementation guidance and advanced use cases.

  • Built-in entity types: Person, Organization, Location, Date, Money, Percent
  • Define custom entity types with EntityDefinition
  • Occurrences property with character offsets for each mention
  • Multimodal: extract entities from images with OCR
  • Guidance property for domain-specific extraction rules
NerExample.cs
var model = LM.LoadFromModelID("qwen3.5:4b");
var ner = new NamedEntityRecognition(model);

// Define entity types to extract
ner.EntityDefinitions.Add(new EntityDefinition(NamedEntityType.Person));
ner.EntityDefinitions.Add(new EntityDefinition(NamedEntityType.Organization));
ner.EntityDefinitions.Add(new EntityDefinition(
    "Product", "Product names mentioned"));

string text = "...";

NER page

Engine 05

PII extraction.

Detect and extract personally identifiable information for privacy compliance, data masking, and audit workflows with the PiiExtraction engine. Supports built-in PII types plus unlimited custom labels for organization-specific identifiers. Works on both text and images with integrated OCR. Visit our dedicated PII Detection page for in-depth guidance on implementing privacy-compliant workflows.

  • Built-in types: Name, Email, Phone, Address, SSN, DateOfBirth, URL, IP
  • Define custom PII labels: PatientID, AccountNumber, PassportNumber
  • Character offsets for precise masking and redaction
  • Batch processing for high-volume document scanning
  • Multimodal: extract from scanned documents and screenshots
PiiExample.cs
var model = LM.LoadFromModelID("qwen3.5:4b");
var pii = new PiiExtraction(model);

// Configure PII types to detect
pii.PiiTypes.Add(PiiEntityType.Name);
pii.PiiTypes.Add(PiiEntityType.Email);
pii.PiiTypes.Add(PiiEntityType.Phone);
pii.PiiTypes.Add(PiiEntityType.SSN);

// Add custom PII type
pii.CustomLabels.Add("PatientID");

string text = "Contact Jane Doe at [email protected]";

PII extraction page

Engine 06

Text & image embeddings.

Generate dense vector representations that capture semantic meaning with the Embedder class. Power semantic search, clustering, recommendations, and RAG pipelines with high-quality embeddings from both text and images. Supports batch processing and multiple embedding models optimized for different use cases.

  • Text embeddings with models like nomic-embed-text, bge-m3
  • Image embeddings with nomic-embed-vision
  • Batch processing with GetEmbeddingsAsync for multiple inputs
  • GetCosineSimilarity for measuring semantic similarity
  • Seamless integration with RAG engine and vector stores
EmbedExample.cs
var model = LM.LoadFromModelID("nomic-embed-text");
var embedder = new Embedder(model);

// Generate text embeddings
float[] queryVec = await embedder.GetEmbeddingsAsync(
    "machine learning algorithms");

// Batch embed multiple texts
var docs = new[] { "AI overview", "Neural networks" };
float[][] docVecs = await embedder.GetEmbeddingsAsync(docs);

// Calculate similarity
float sim = Embedder.GetCosineSimilarity(queryVec, docVecs[0]);

Embeddings page

Applications

Real-world use cases.

Organizations across industries leverage LM-Kit's content analysis to automate workflows, ensure compliance, and unlock insights.

Support

Customer support triage

Classify incoming tickets by sentiment and category, route to appropriate teams, and extract key entities for faster resolution.

Privacy

Privacy compliance

Scan documents for PII before sharing or archiving. Automate GDPR, CCPA, and HIPAA compliance workflows with precise detection.

Documents

Document intelligence

Extract entities from contracts, invoices, and forms. Classify document types and route to appropriate processing pipelines.

Social

Social media monitoring

Track brand sentiment across platforms. Detect emerging issues, measure campaign impact, and identify influencer content.

Search

Semantic search

Build intelligent search with embeddings that understand meaning, not just keywords. Find similar content across documents and images.

Moderation

Content moderation

Automatically classify user-generated content. Detect toxic language, spam, and policy violations before publication.

Developer Resources

API reference.

Complete documentation for all content analysis classes and methods.

SentimentAnalysis

Classify text sentiment as positive, negative, or neutral with multilingual support and fine-tuning capabilities.

View docs

EmotionDetection

Identify specific emotions: joy, anger, sadness, fear, surprise, and disgust with optional neutral support.

View docs

Categorization

Custom classification with unlimited categories. Supports text and image inputs with confidence scores.

View docs

KeywordExtraction

Extract key terms and phrases with configurable count and language targeting.

View docs

NamedEntityRecognition

Extract people, organizations, locations, dates, and custom entity types with occurrence tracking.

View docs

PiiExtraction

Detect PII including names, emails, SSNs, and custom identifiers for compliance workflows.

View docs

SarcasmDetection

Detect ironic and sarcastic tones that might mislead sentiment analysis.

View docs

Embedder

Generate semantic embeddings from text and images for search, clustering, and RAG applications.

View docs

Reranker

Rerank search results by semantic relevance for improved RAG accuracy.

View docs

LM-Kit.NET pillars

Seven pillars, one foundation.

The seven pillars of LM-Kit.NET, plus the local runtime they share. Highlighted card is where you are now.

The foundation

Every capability above runs on this runtime.

Foundation

Local Inference

The runtime all seven pillars sit on. The LM-Kit.NET NuGet ships the complete inference system: open-weight LLMs, vision-language models, embeddings, on-device speech-to-text, OCR and classifiers, accelerated on CPU, AVX2, CUDA 12/13, Vulkan or Metal. One package, zero cloud calls, predictable latency, full data and technology sovereignty.

Explore the foundation

Ready to analyze your content?

Six powerful engines. Multimodal support. 100% on-device. Start building intelligent .NET applications today.

Download free API documentation