Class SentimentAnalysis
- Namespace
- LMKit.TextAnalysis
- Assembly
- LM-Kit.NET.dll
A dedicated class for performing sentiment analysis on plain text, designed to assess and categorize emotional tone.
public sealed class SentimentAnalysis
- Inheritance
-
SentimentAnalysis
- Inherited Members
Constructors
- SentimentAnalysis(LLM)
Creates an instance of the SentimentAnalysis class.
Properties
- Confidence
Confidence of the last sentiment analysis 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(TrainingDataset, int, bool, int?)
Creates a training object for fine-tuning a sentiment analysis model using a specified dataset.
- CreateTrainingObject(IList<(string, SentimentCategory)>, int)
Creates an object for fine-tuning a sentiment analysis model using the provided training data.
- GetSentimentCategory(string, CancellationToken)
Analyzes the sentiment of a specified text and classifies it into a category defined in the SentimentAnalysis.SentimentCategory enumeration.
- GetSentimentCategoryAsync(string, CancellationToken)
Analyzes the sentiment of a specified text and classifies it into a category defined in the SentimentAnalysis.SentimentCategory enumeration.
- GetTrainingData(TrainingDataset, int, bool, int?)
Retrieves training data for fine-tuning a sentiment analysis model from a specified dataset.