在 Python 中基于 GroupDocs.Rewriter API 创建跨平台的数据科学、AI 与自动化解决方案。专注业务逻辑,而非技术细节。
开始免费试用GroupDocs.Rewriter 是一款易于使用且多功能的在线服务,可在完整保留原意的前提下改写文本。其先进的 AI 能读取并理解文本,然后以多种表述方式进行改写,提供不失原意的防抄袭结果。虽然后台过程非常复杂且资源密集,但您无需担心公式、机器学习和负载–我们的云服务会完成所有工作。
此 SDK 大幅简化了从 Python 代码调用 GroupDocs.Rewriter Cloud 服务的交互,使您能够专注于业务逻辑,而非技术细节。它处理所有常规操作,例如建立连接、发送 API 请求以及解析响应,并将这些任务封装为少量简易方法,可在任何 Python 应用程序或工作簿中使用。Python SDK、演示应用、文档和示例均以 MIT 许可证开源发布。您可以将其用于任何目的,并修改代码的任何部分。
针对 Python 的 GroupDocs.Rewriter Cloud API 附带详细的开发者指南和所有主流编程语言的实时代码示例,让您能够快速开始使用 API 功能。只需在 GroupDocs Cloud 创建免费账户,获取 APP SID 和密钥信息,以便与 GroupDocs Cloud 的 API 通信,即可使用 SDK。
//Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).
public FileResponse RewriteDocument(Configuration conf)
{
string name = "test.docx";
string folder = "";
string language = "en";
string format = "docx";
string storage = "First Storage";
string saveFile = "translation.docx";
string savePath = "";
RewriterApi api = new RewriterApi(conf);
RewriteDocumentRequest request = api.CreateDocumentRequest(name, folder, language, format, storage, saveFile, savePath, masters, elements);
FileResponse response = api.RunRewritingTask(request);
return response;
}
GroupDocs.Rewriter Cloud 是基于 REST 的 API,可轻松集成到任何语言或平台,能够管理 HTTP 请求和响应。它支持所有流行的云存储服务,如 Google Cloud、Drive、DropBox 和 Amazon S3,无需任何依赖即可交互。
//Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).
public TextResponse TranslateText(Configuration conf)
{
string language = "en";
string text = "The client’s mission is to make the world a healthier place and to make traveling and visiting public places safer and more comfortable for people.";
RewriterApi api = new RewriterApi(conf);
RewriteTextRequest request = api.CreateTextRequest(language, text);
TextResponse response = api.RunRewritingTextTask(request);
return response;
}
GroupDocs.Rewriter Cloud API 已经 SSL 加密,身份验证请求需要签名以及 AppSID 查询参数或 OAuth 2.0 授权头。