Related blog post: Taxonomic Classification of Text using C#
Last active
November 4, 2021 05:38
-
-
Save GroupDocsGists/68adb40cdb317125614e04c8d1cf56b7 to your computer and use it in GitHub Desktop.
Taxonomic Classification of Text using C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Classify Text with Document Taxonomy using C# | |
*/ | |
Classifier classifier = new Classifier(); | |
string statement = "Sooner or later technology will overcome labor work"; | |
var response = classifier.Classify(statement, 2, Taxonomy.Documents); | |
response.BestResults.ToList().ForEach(bestResult => Console.WriteLine($"Class: {bestResult.Name}, \tProbability: {bestResult.Probability}")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Classify Text with IAB-2 Taxonomy using C# | |
*/ | |
Classifier classifier = new Classifier(); | |
string statement = "Medicine is an important part of our lives"; | |
var response = classifier.Classify(statement, 3, Taxonomy.Iab2); | |
response.BestResults.ToList().ForEach(bestResult => Console.WriteLine($"Class: {bestResult.Name}, \tProbability: {bestResult.Probability}")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment