Table of Contents

Method GetEmotionCategory

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

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.

public EmotionDetection.EmotionCategory GetEmotionCategory(string text, CancellationToken cancellationToken = default)

Parameters

text string

The text to analyze for emotional content. This should be a non-empty string representing the textual content whose emotion is to be classified.

cancellationToken CancellationToken

Optional. A CancellationToken for handling cancellation requests.

Returns

EmotionDetection.EmotionCategory

A member of the EmotionDetection.EmotionCategory enumeration that matches the category associated with the plain text.

Exceptions

OperationCanceledException

Thrown when the operation is cancelled based on the CancellationToken.