If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.
If you experience errors, when you try to download a file, make sure your network policies (enforced by your company or ISP) allow downloading ZIP and/or MSI files.

安装
该软件包在PyPI可用,可以通过执行以下命令通过pip安装:
pip install groupdocs-classification-cloud

要求
依赖关系
SDK自动安装以下软件包:
| Package | Constraint |
|---|
| urllib3 | >= 1.15 |
| six | >= 1.10 |
| certifi | — |
| python-dateutil | — |
文档分类Python云REST API
GroupDocs.Classification Cloud Python SDK 是一款功能强大的REST API,专为需要高级文本和文档分类功能的开发人员而设计。该 API 支持多种文档格式和广泛的分类法,允许您对不同类别的原始文本、文档和批量文本进行分类,包括 IAB-2、Documents 和 Sentiment 分类法。 API 通过 JWT 身份验证进行保护,Python SDK 简化了与 Web 应用程序、脚本和自动化工作流程的集成。
文档分类功能
文件格式支持 - 对 PDF、DOCX、TXT 等多种格式的文本和文档进行分类。
多语言支持 - 对多种语言的文档进行分类,包括英语、中文、西班牙语和德语。
自定义分类 - 创建自定义分类类别以满足您的需求。
批量分类 - 在一个请求中最多对 10 个文本进行分类。
基于内容的分类 - 根据文档正文内容对文档进行分类。
分类学分类特征
IAB-2 分类法 - 使用数字内容和广告的 IAB-2 标准分类法进行分类。
文档分类 - 将文档分类为 ADVE、电子邮件、表格、信件、备忘录、发票、报告、简历等类别。
Sentiment 分类法 - 将文本分类为正面或负面情绪。
Sentiment3 分类法 - 将文本分类为正面、中性或负面情绪。
API 集成功能
RESTful API - 通过 REST API 访问分类,以便于集成。
实时分类 - 对文本和文档进行实时分类。
JSON 和 XML 响应 - 接收 JSON 或 XML 格式的结果,以便于系统集成。
安全和身份验证功能
JWT 身份验证 - 通过 JWT 身份验证确保 API 访问安全。
Client ID 和 Secret - 使用 Client ID 和 Secret 进行安全 API 调用。
数据加密 - 加密客户端应用程序和 Classification Cloud API 之间的通信。
性能特点
可扩展的基础设施 - 有效处理大量文档。
高精度 - 使用先进的机器学习算法提供高度准确的结果。
快速处理 - 针对高性能应用程序的快速分类进行了优化。
许可和身份验证
评估模式 - 使用免费试用帐户试用 API。
安全身份验证 - 使用 Client ID 和 Client Secret 进行安全 API 访问。
MIT License - Python SDK 根据 MIT License 获得许可。
支持的文档格式
GroupDocs.Classification Cloud支持以下文件格式的分类:
| Format Name | Extension |
|---|
| Portable Document Format | PDF |
| Words Document Formats | DOC, DOCX, DOCM, DOT, DOTX, DOTM |
| Rich Text Formats | RTF |
| Plain Text File | TXT |
| OpenDocument Formats | ODT, OTT |
完整的格式列表请参见文档。
支持的分类法
IAB-2 分类法 - 汽车、书籍与文学、商业与金融、技术与计算、旅游等类别。
Documents 分类 - ADVE、电子邮件、表格、信件、备忘录、新闻、发票、报告、简历、科学、其他等分类。
Sentiment 分类法 - 二元情感分类:负面和正面。
Sentiment3 分类法 - 三类情绪:负面、中性、正面。
有关分类的详细信息,请参阅文档。
快速入门
获取您的 API 凭证
要使用GroupDocs.Classification Cloud,请在GroupDocs.Cloud仪表板注册并获取您的Client ID和Client Secret。
初始化API
使用以下代码开始使用GroupDocs.Classification Cloud SDK for Python:
import groupdocsclassificationcloud
from groupdocsclassificationcloud import ClassificationApi, Configuration
# Get your ClientId and ClientSecret at https://dashboard.groupdocs.cloud
client_id = "YourClientId"
client_secret = "YourClientSecret"
# Create API configuration
configuration = Configuration(client_id, client_secret, "https://api.groupdocs.cloud")
# Create instance of the Classification API
classification_api = ClassificationApi(configuration=configuration)
对原始文本进行分类
初始化后,使用此基本示例对原始文本进行分类:
import groupdocsclassificationcloud
from groupdocsclassificationcloud import ClassificationApi, Configuration, BaseRequest, ClassifyRequest
client_id = "YourClientId"
client_secret = "YourClientSecret"
configuration = Configuration(client_id, client_secret, "https://api.groupdocs.cloud")
classification_api = ClassificationApi(configuration=configuration)
request = ClassifyRequest(BaseRequest("Try text classification"), 3)
result = classification_api.classify(request)
print("Best class name = " + result.best_class_name)
print("Best class probability = " + str(result.best_class_probability))
通过本快速入门指南,您已准备好开始在 Python 应用程序中使用 GroupDocs.Classification Cloud 对文本和文档进行分类。欲了解更多详情,请访问文档。
获取支持的文件格式
通过分类 API 检索可用的受支持文件格式的完整列表。
import groupdocsclassificationcloud
from groupdocsclassificationcloud import ClassificationApi, Configuration, GetSupportedFileFormatsRequest
client_id = "YourClientId"
client_secret = "YourClientSecret"
configuration = Configuration(client_id, client_secret, "https://api.groupdocs.cloud")
classification_api = ClassificationApi(configuration=configuration)
request = GetSupportedFileFormatsRequest()
response = classification_api.get_supported_file_formats(request)
print("Supported file-formats:")
for fmt in response.formats:
print("{0} ({1})".format(fmt.file_format, fmt.extension))
对云存储中的文档进行分类
使用 Documents 分类法对 GroupDocs 云存储中存储的文档进行分类。
import groupdocsclassificationcloud
from groupdocsclassificationcloud import ClassificationApi, Configuration, BaseRequest, ClassifyRequest, FileInfo
client_id = "YourClientId"
client_secret = "YourClientSecret"
configuration = Configuration(client_id, client_secret, "https://api.groupdocs.cloud")
classification_api = ClassificationApi(configuration=configuration)
request = ClassifyRequest(
BaseRequest(document=FileInfo(name="test_multi_pages.docx", folder="Temp/SdkTests/python"))
)
result = classification_api.classify(request)
print("Best class name = " + result.best_class_name)
print("Best class probability = " + str(result.best_class_probability))
使用 Sentiment 分类法对文本进行分类
对原始文本执行二元或三类情感分析。
import groupdocsclassificationcloud
from groupdocsclassificationcloud import ClassificationApi, Configuration, BaseRequest, ClassifyRequest
client_id = "YourClientId"
client_secret = "YourClientSecret"
configuration = Configuration(client_id, client_secret, "https://api.groupdocs.cloud")
classification_api = ClassificationApi(configuration=configuration)
request = ClassifyRequest(
BaseRequest("This product exceeded my expectations!"),
best_classes_count=1,
taxonomy="Sentiment3"
)
result = classification_api.classify(request)
print("Sentiment = " + result.best_class_name)
GitHub 上的示例项目
GroupDocs.Classification Cloud Python SDK 存储库包含可立即运行的单元测试和示例,涵盖:
| Category | Examples |
|---|
| Text Classification | Classify raw text with IAB-2 taxonomy |
| Document Classification | Classify documents stored in cloud storage |
| Info | Supported file formats |
| Sentiment Analysis | Binary and three-class sentiment classification |
如何运行示例
1.克隆或下载SDK存储库
2. 编辑Settings/servercreds.json并设置AppSid和AppKey
3.安装依赖:pip install groupdocs-classification-cloud -U
4. 从存储库根运行测试:python -m unittest discover -s test
欲了解更多详情,请访问入门。

标签
Document Classification API | Python Cloud API | GroupDocs.Classification Cloud | REST API | Text Classification | Document Taxonomy | IAB-2 Taxonomy | Sentiment Taxonomy | Sentiment3 Taxonomy | JWT Authentication | Multi-language Support | Batch Classification | Content-Based Classification | Real-time Classification | Sentiment Analysis | Machine Learning Classification | High Accuracy Classification | Secure API Access | Cloud Storage Integration | Customer Feedback Analysis | Social Media Monitoring | Cross-platform API