Table of Contents

Class EmotionDetection

Namespace
LMKit.TextAnalysis
Assembly
LM-Kit.NET.dll

Represents a specialized class for analyzing emotional tones in text.
It can identify a range of emotions, such as happiness, sadness, anger and fear, among others.
This class is designed to be used in applications where understanding emotional context is crucial, such as in customer feedback analysis, social media monitoring, or mental health assessment tools.

public sealed class EmotionDetection
Inheritance
EmotionDetection
Inherited Members

Constructors

EmotionDetection(LLM)

Creates an instance of the EmotionDetection class.

Properties

Confidence

Confidence of the last detection process, expressed as a floating-point value ranging from 0 to 1.
A score closer to 1 indicates a higher confidence level in the categorization accuracy, while a score closer to 0 suggests lower confidence.
This metric can be used to evaluate and filter predictions based on their reliability.

Model

Gets the Model instance associated with this object.

NeutralSupport

Specifies whether the neutral category support is enabled or not.

UseEmbeddingClassifier

Gets or sets a value indicating whether the classifier should utilize embeddings strategy instead of completion.

Methods

CreateTrainingObject(IList<(string, EmotionCategory)>, int)

Creates an object for fine-tuning an emotion detection model using the provided training data.

GetEmotionCategory(string, CancellationToken)

Analyzes the emotional tone of a given text and classifies it into a specific category as defined by the EmotionDetection.EmotionCategory enumeration.

GetEmotionCategoryAsync(string, CancellationToken)

Analyzes the emotional tone of a given text and classifies it into a specific category as defined by the EmotionDetection.EmotionCategory enumeration.