Raw Text Classification

This API retrieves raw text classification result for IAB-2, Documents or Sentiment taxonomy. It returns an object that contains information about the best class and its probability and about probabilities of the other classes. For Sentiment taxonomy Chinese and English are supported with the language auto-detection.

See Classify request parameters for request’s details.

Resource

This resource represents a controller for single call text classification.

Classify raw text with IAB-2 taxonomy.

cURL REST Example

Request

curl -v "http://api.groupdocs.cloud/v1.0/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"
}

SDK example

The API is completely independent of your operating system, database system or development language. We provide and support API SDKs in many development languages in order to make it even easier to integrate. You can see our available SDKs list here

Classify raw text

C#