Sentiment classification usage

Create an instance of SentimentClassifier class

Creates SentimentClassifier instance

var sentimentClassifier = new SentimentClassifier();

Creates SentimentClassifier instance for the Chinese language

var sentimentClassifier = new SentimentClassifier(SentimentConfig.ChineseLanguage);

Creates an instance of the Sentiment Classifier with multi-language support and auto-detection is English or Chinese

var sentimentClassifier = new SentimentClassifier(SentimentConfig.AllLanguages);

and call PositiveProbability method

Classifies sentiment by text

var positiveProbability = sentimentClassifier.PositiveProbability("This is a new must-have thing.");
Console.WriteLine($"The probability of a positive sentiment is { positiveProbability }");

or call Classify method

Classifies sentiment by text

var response = sentimentClassifier.Classify("This is a new must-have thing.");
Console.WriteLine($"The best class name:{response.BestClassName}, probability: {response.BestClassProbability}");

**SentimentClassifier **class is thread-safe.