PyPI PyPI - Python Version PyPI - Implementation PyPI - Wheel GitHub license

Python SDK for GroupDocs.Classification Cloud REST API

This repository contains GroupDocs.Classification Cloud SDK for Python source code. This SDK allows you to work with GroupDocs.Classification Cloud REST APIs in your Python applications quickly and easily, with zero initial cost.

Classification Processing Features

  • Perform raw text classification.
  • Perform document classification for the supported file formats.
  • Perform multilingual sentiment analysis (binary or 3-classes) in English, Chinese, Spanish, and German.

New Features & Enhancements Version 20.11

  • Batch text classification was added to API. Now up to 10 texts can be classified in one request.
  • Sentiment3 taxonomy (Negative/Neutral/Positive) is supported now.

Supported Document Formats

  • Microsoft Word: DOC, DOCX, DOCM, DOT, DOTX, DOTM
  • OpenOffice: ODT, OTT
  • Portable: PDF
  • Other: RTF, TXT

Supported IAB-2 Taxonomy

  • Automotive,
  • Books_and_Literature,
  • Business_and_Finance,
  • Careers,
  • Education,
  • Events_and_Attractions,
  • Family_and_Relationships,
  • Fine_Art,
  • Food_&_Drink,
  • Healthy_Living,
  • Hobbies_&_Interests,
  • Home_&_Garden,
  • Medical_Health,
  • Movies,
  • Music_and_Audio,
  • News_and_Politics,
  • Personal_Finance,
  • Pets,
  • Pop_Culture,
  • Real_Estate,
  • Religion_&_Spirituality,
  • Science,
  • Shopping,
  • Sports,
  • Style_&_Fashion,
  • Technology_&_Computing,
  • Television,
  • Travel,
  • Video_Gaming

Supported Documents Taxonomy

  • ADVE - advertisements, brochures.
  • Email
  • Form
  • Letter
  • Memo - memorandums.
  • News - articles, including news articles.
  • Invoice
  • Report
  • Resume
  • Scientific - scientific papers.
  • Other - the other classes of documents or cases where the classifier is not sure.

Sentiment Taxonomy

  • Negative
  • Positive

Sentiment3 Taxonomy`

  • Negative
  • Neutral
  • Positive See API Reference for full API specification.

How to use the SDK?

The complete source code is available in this repository folder. You can either directly use it in your project via source code or get PyPi (recommended). For more details, please visit our documentation website.

Prerequisites

To use GroupDocs.Classification Cloud Python SDK you need to register an account with GroupDocs Cloud and lookup/create App Key and SID at Cloud Dashboard. There is free quota available. For more details, see GroupDocs Cloud Pricing.

Installation & Usage

pip install groupdocsclassificationcloud

If the python package is hosted on Github, you can install directly from Github

pip install groupdocsclassificationcloud

(you may need to run pip with root permission: sudo pip install groupdocsclassificationcloud)

Then import the package:

import groupdocsclassificationcloud

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import groupdocsclassificationcloud

Getting Started

Please follow the installation procedure and then run the following:

Get Supported File Formats for Classification

# Load the gem
import groupdocs_classification_cloud

# Get Client Id and Client Secret from https://dashboard.groupdocs.cloud
my_client_id = ""
my_client_secret = ""

# Create instance of the API
configuration = groupdocs_classification_cloud.Configuration(my_client_id, my_client_secret)
apiInstance = groupdocs_classification_cloud.ClassificationApi.from_config(configuration)

# Retrieve supported file-formats
response = api.get_supported_file_formats()

# Print out supported file-formats
print("Supported file-formats:")
for format in response.formats:
	print('{0} ({1})'.format(format.file_format, format.extension))

Test contain various examples of using the SDK. Please put your credentials into Configuration.

Dependencies

  • Python 2.7 and 3.4+
  • referenced packages (see here for more details)

GroupDocs.Classification Cloud Resources

Home | Docs | Demos | API Reference | Blog | Free Support | Free Trial