Method AddSample
- Namespace
- LMKit.TextAnalysis.Training
- Assembly
- LM-Kit.NET.dll
AddSample(string, SentimentCategory)
Adds a training sample from raw text labeled with the expected sentiment.
public void AddSample(string content, SentimentAnalysis.SentimentCategory sentimentCategory)
Parameters
content
stringThe textual content to analyze for sentiment.
sentimentCategory
SentimentAnalysis.SentimentCategoryThe expected target sentiment label for this sample.
Examples
dataset.AddSample(
"Battery life is mediocre and the camera is disappointing.",
SentimentAnalysis.SentimentCategory.Negative);
Remarks
This method calls CreateTrainingSample(Prompt, SentimentCategory, out InferenceModality) to synthesize a chat-based training example. The resulting sample is wrapped in ChatTrainingSample with the resolved InferenceModality.