Table of Contents

Method AddSample

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

AddSample(string, EmotionCategory)

Adds a training sample from raw text labeled with the expected emotion.

public void AddSample(string content, EmotionDetection.EmotionCategory emotionCategory)

Parameters

content string

The textual content to analyze for emotion.

emotionCategory EmotionDetection.EmotionCategory

The expected target emotion label for this sample.

Examples

dataset.AddSample(
    "Thank you so much for your help — I'm thrilled!",
    EmotionDetection.EmotionCategory.Joy);

Remarks

This method calls CreateTrainingSample(Prompt, EmotionCategory, out InferenceModality) to synthesize a chat-based training example. The resulting sample is wrapped in ChatTrainingSample with the resolved InferenceModality.