GroupDocs.Classification for .NET 20.3 Release Notes

Major Features

Sentiment Classification (Analysis) was added.

Raw text classification speed has been increased several times.

All Changes

CLASSNET-6Implement Sentiment ClassificationFeature
CLASSNET-26Increase processing speed for raw text classificationFeature

Public API and Backward Incompatible Changes

Added a new class SentimentClassifier

It can be used without initialization of Classifier class. It requires less memory and initializes faster.

var sentimentClassifier = new SentimentClassifier();
/// PositiveProbability method returns the probability of the positive sentiment.
var positiveProbability = sentimentClassifier.PositiveProbability("This is a new must-have thing.");
Console.WriteLine($"The probability of a positive sentiment is { positiveProbability }");
/// Classify method returns ClassificationResult object with the best class probability and name.
var response = sentimentClassifier.Classify("This is a new must-have thing.");
Console.WriteLine($"The best class name:{response.BestClassName}, probability: {response.BestClassProbability}");

Added a new taxonomy: Taxonomy.Sentiment

Taxonomy.Sentiment can be used with Classifier class

var classifier = new Classifier();
var response = classifier.Classify("This is a new must have thing.", bestClassesCount: 1, taxonomy: Taxonomy.Sentiment);

Taxonomy.Sentiment contains two classes: Negative and Positive.

It also can be used with files

var response = classifier.Classify(filename, folder, taxonomy: Taxonomy.Sentiment);

or with file streams

using (var stream = File.OpenRead(filepath))
    var result = classifier.Classify(stream, null, taxonomy: Taxonomy.Sentiment);

© Aspose Pty Ltd 2001-2022. All Rights Reserved.