Classify Your Text using GroupDocs.Classification Cloud API

Classification of text is also known as text categorization. Text classifiers can be used to establish, structure, and categorize almost anything in the text. For example, new articles can be prearranged by topics, support tickets can be organized by urgency, discussions can be organized by language and brand mentions can be organized by emotion etc.
GroupDocs.Classification Cloud API enables you to classify your raw text as well as documents ‎into the predefined categories. The Classification Cloud supports multiple taxonomy types, such as IAB-2 ‎taxonomy and Document taxonomy. Classification information can be viewed regarding classes as well ‎as their respective probabilities.

Noticeable Features

  • Perform raw text classification as per IAB-2 taxonomy
  • Classify documents based on Document taxonomy
  • View classes with their respective probabilities as classification information
  • Easy integration with REST API
  • Secure APIs that require authentication

Supported formats

GroupDocs.Classification Cloud REST API supports the classification of:

  • Raw text
  • Documents
    • Portable Document Format: PDF
    • Microsoft Word: DOC, DOCX, DOCM, DOT, DOTX, DOTM
    • OpenDocument Formats: ODT, OTT
    • Rich Text Format: RTF
    • Plain Text File: TXT

Raw Text Classification

This API retrieves raw text classification result for IAB-2 taxonomy or Documents taxonomy. It returns an object that contains information about the best class and its probability and about probabilities of the other classes.

Request


curl -v "http://api.groupdocs.com/v1/classification/classify&bestClassesCount=3" 
-H "content-type: application/json"
-X POST -d '{ "Description" : "Medicine is an important part of our life" }'

Response


{
  "bestClassName": "Healthy_Living",
  "bestClassProbability": 53.77,
  "bestResults": [
    {
      "className": "Healthy_Living",
      "classProbability": 53.77
    },
    {
      "className": "Medical_Health",
      "classProbability": 38.27
    },
    {
      "className": "Pets",
      "classProbability": 1.98
    }
  ],
  "code": 200,
  "status": "OK"
}

Documents Classification

GroupDocs.Classification API retrieves document classification result for IAB-2 taxonomy or Documents taxonomy. It returns an object that contains information about the best class and its probability and about probability of other classes. Please click here for further details regarding supported document formats in GroupDocs.Classification Cloud.

Request


curl -v "http://api.groupdocs.com/v1/classification/classify"
-H "content-type: application/json"
-X POST -d '{ "Document": {"Folder": "words/docx","Name": "four-pages.docx" } }'

Response


{
  "bestClassName": "Books_and_Literature",
  "bestClassProbability": 48.92,
  "bestResults": [],
  "code": 200,
  "status": "OK"
}