Classify
Document taxonomy refers to the process of classifying and organizing documents according to their content. It is a way of automatically grouping documents into categories and subcategories based on the topics or subjects they cover. Document taxonomies can be used to classify a wide variety of content, such as email attachments, news articles, research papers, company reports, and so on.
The main goal of document taxonomy is to make it easier to find and retrieve relevant documents. By organizing documents into groups, it becomes easier to navigate through large collections of files and find the required information. This can improve efficiency and productivity, particularly in organizations that rely heavily on document management.
Aspose.Words REST API includes a ClassifyDocumentOnline method that allows developers to automatically classify documents according to their content. The currently supported taxonomies are:
-
Documents Taxonomy
-
2-Class Sentiment Taxonomy: negative/positive
-
3-Class Setiment taxonomy: negative/neutral,positive
Classify a Word document REST API
| Server | Method | Endpoint |
|---|---|---|
https://api.aspose.cloud/v4.0 |
PUT | /words/online/get/classify |
| Parameter Name | Data Type | Required/Optional | Description |
|---|---|---|---|
loadEncoding |
string | Optional | Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML. |
password |
string | Optional | Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don’t recommend to use the parameter to pass a plain password for direct call of API. |
encryptedPassword |
string | Optional | Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details. |
bestClassesCount |
string | Optional | The number of the best classes to return. |
taxonomy |
string | Optional | The taxonomy to use. |
Error reference
| Status | Code | Description | Resolution |
|---|---|---|---|
| 400 | bad_request |
Invalid parameter value or missing required field | Check the parameter format and ensure all required fields are provided |
| 401 | unauthorized |
Missing or invalid access token | Obtain a new access token via the authentication endpoint |
| 403 | forbidden |
Access to the requested resource is denied | Verify that the access token has the required permissions |
| 404 | not_found |
The requested resource does not exist | Check the resource ID or path for typos |
| 429 | rate_limited |
Too many requests — rate limit exceeded | Wait for the Retry-After period before making another request |
| 500 | internal_error |
An unexpected server error occurred | Retry the request after a short delay; contact support if the issue persists |
Usage examples
REST API
SDK
See Also
- Cloud SDKs — Create, Edit, Convert and Render Word documents via REST API.