Following blog post uses these examples: Taxonomic Classification of Documents using C#
Last active
November 2, 2021 03:53
-
-
Save GroupDocsGists/ca2a11f8c02562c2a73f419451115fa1 to your computer and use it in GitHub Desktop.
Taxonomic Classification of Documents 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 documents (PDF, Word, ...) with Document Taxonomy using C# | |
*/ | |
Classifier classifier = new Classifier(); | |
var filename = "document.pdf"; | |
var response = classifier.Classify(filename, "<inputFolderPath>" , 4, Taxonomy.Documents); | |
response.BestResults.ToList().ForEach(bestResult => Console.WriteLine($"Class: {bestResult.Name}, \t Probability: {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 documents (PDF, Word, ...) with IAB-2 Taxonomy using C# | |
*/ | |
Classifier classifier = new Classifier(); | |
var filename = "document.pdf"; | |
var response = classifier.Classify(filename, "<inputFolderPath>" , 4, Taxonomy.Iab2); | |
response.BestResults.ToList().ForEach(bestResult => Console.WriteLine($"Class: {bestResult.Name}, \t Probability: {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 password protected documents using C# | |
*/ | |
Classifier classifier = new Classifier(); | |
var filename = "password-protected.docx"; | |
var response = classifier.Classify(filename, "<inputFolderPath>", password: "password"); | |
Console.WriteLine($"Best Class: {response.BestClassName}, \t Probability: {response.BestClassProbability}"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment