<dependency>
    <groupId>com.groupdocs</groupId>
    <artifactId>groupdocs-rewriter-cloud</artifactId>
    <version>24.4</version>
</dependency>
copied!  
compile(group: 'com.groupdocs', name: 'groupdocs-rewriter-cloud', version: '24.4')
copied!  
<dependency org="com.groupdocs" name="groupdocs-rewriter-cloud" rev="24.4">
    <artifact name="groupdocs-rewriter-cloud" ext="jar"/>
</dependency>
copied!  
libraryDependencies += "com.groupdocs" % "groupdocs-rewriter-cloud" % "24.4"
copied!  

Java SDK for GroupDocs.Rewriter Cloud

GitHub license


Docs Swagger Examples Blog Support Release Notes Dashboard


GroupDocs.Rewriter Cloud SDK for Java is a simple Python SDK that enables your cloud Apps to perform paraphrasing, simplification, summarization and paraphrasing detection of Microsoft Word®, OpenOffice, Markdown, HTML and Adobe Acrobat® PDF documents as well as plain text by adding just a few lines of code.

In other words, it’s a SDK for document and plain text rewriting, summarization, etc. in our Cloud, that supports paraphrasing of .doc, .docx, .docm, .pdf, .rtf, .odt, .md, .html, .txt files. Just pass a specific file or text to the GroupDocs.Rewriter Cloud API, and it will process and save result in our Cloud or will return resulting text.

It is easy to get started with GroupDocs.Rewriter Cloud and there is nothing to install. Create an account at GroupDocs Cloud and get your application information, then you are ready to use SDKs.

Cloud Features

  • Paraphrasing / summarization / simplification / paraphrase detection of documents
  • Paraphrasing / summarization / simplification / paraphrase detection / comparison of plain text
  • Words and idioms synonyms finder
  • Return resulting text in response
  • Save processed file in cloud
  • No need to install any 3rd party software

Supported Document Formats

You can specify format of document to process putting in the request’s body:

  • Microsoft Word®: DOC, DOCX, DOCM
  • Adobe®: PDF
  • Markdown: MD
  • HTML: HTML
  • Other: RTF, ODT, TXT

Additionally, user could obtain processed file in any other format available for conversion. Just specify output format of paraphrased document by putting file extension in the request’s body:

  • doc, docx — docx, rtf, html, odt, txt, md, pdf, tiff, svg, xps
  • pdf — docx, pptx, html, svg, xps
  • html — md, pdf, docx, tiff, xps

Please visit Supported Formats for details.

Supported Languages

  • ar — to process Arabic text or document
  • de — to process German text or document
  • en — to process English text or document
  • es — to process Spanish text or document
  • fr — to process French text or document
  • id — to process Indonesian text or document
  • ru — to process Russian text or document
  • uk — to process Ukrainian text or document
  • sk — to process Slovak text or document
  • pt — to process Portuguese text or document
  • it — to process Italian text or document
  • hi — to process Hindi text or document
  • th — to process Thai text or document

How to use the SDK?

Our API is completely independent of your operating system, database system, or development language. You can use any language and platform that supports HTTP to interact with our API. However, manually writing client code can be difficult, error-prone, and time-consuming. Therefore, we provide and support SDKs in many development languages to make it easier for your Cloud Apps to integrate with us.

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven (3.8.3+)/Gradle (7.2+)

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project’s POM:

<dependency>
  <groupId>com.groupdocs</groupId>
  <artifactId>GroupDocs-rewriter-cloud</artifactId>
  <version>24.4</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project’s build file:

  repositories {
    mavenCentral()     // Needed if the 'GroupDocs-rewriter-cloud' jar has been published to maven central.
    mavenLocal()       // Needed if the 'GroupDocs-rewriter-cloud' jar has been published to the local maven repo.
  }

  dependencies {
     implementation "com.groupdocs:GroupDocs-rewriter-cloud:24.4"
  }

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/GroupDocs-rewriter-cloud-24.4.jar
  • target/lib/*.jar

Quickstart

1. Get Started

It is easy to get started with GroupDocs.Rewriter Cloud. Simply, create an account at GroupDocs Cloud and get your application information, then you are ready to use the SDKs.

2. Run Demo

  • Checkout the SDK
  • Open Demo.java
  • Set Your ClientId & ClientSecret
  • Run

Rewrite plain text

package com.groupdocs;
// Import classes:

import com.groupdocs.model.*;
import org.openapitools.client.api.ParaphraseApi;

public class Demo {
    public static void main(String[] args) {
        String basePath = "https://api.groupdocs.cloud/v2.0/rewriter";
        // Get Client Id and Client Secret from https://dashboard.groupdocs.cloud
        String cliendId = "YOUR_CLIENT_ID";
        String clientSecret = "YOUR_CLIENT_SECRET";
        
        // Create instance of the API
        ApiClient defaultClient = new ApiClient(basePath, cliendId, clientSecret, null);
        ParaphraseApi apiInstance = new ParaphraseApi(defaultClient);

        String s = "TEXT_TO_PARAPHRASE";

        ParaphraseTextRequest request = new ParaphraseTextRequest();
        request.setLanguage("en");
        request.setText(s);

        try {
            StatusResponse response = apiInstance.paraphraseTextPost(request);
            String response_id = response.getId();
            if (!response.getStatus().toString().equals("BadRequest")){
                while (true){
                    ParaphraseTextResponse paraphraseTextResponse = apiInstance.paraphraseTextRequestIdGet(response_id);
                    if (paraphraseTextResponse.getStatus().toString().equals("OK")) {
                        System.out.println(paraphraseTextResponse);
                        break;
                    }
                    try {
                        Thread.sleep(2000);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }
        } catch (ApiException e) {
            System.err.println("Exception when calling ParaphraseApi#paraphraseTextPost");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://api.groupdocs.cloud/v2.0/rewriter

ClassMethodHTTP requestDescription
DetectApidetectDocumentPostPOST /detect/documentDetect paraphrasing in the document
DetectApidetectDocumentRequestIdGetGET /detect/document/{requestId}Return document detection status. Also return probability of paraphrasing for the whole document and per paragraph
DetectApidetectDocumentTrialPostPOST /detect/document/trialTrial detect paraphrasing in the document
DetectApidetectHcGetGET /detect/hcHealth check for detect all services.
DetectApidetectTextPostPOST /detect/textDetect paraphrasing in text
DetectApidetectTextRequestIdGetGET /detect/text/{requestId}Return text detection status. Also return probability of paraphrasing for the whole text
DetectApidetectTextTrialPostPOST /detect/text/trialTrial detect paraphrasing in text
FileApifileUploadPostPOST /file/upload
InfoApiinfoAvailableLanguagesGetGET /info/availableLanguages
ParaphraseApiparaphraseDocumentPostPOST /paraphrase/documentParaphrase document
ParaphraseApiparaphraseDocumentRequestIdGetGET /paraphrase/document/{requestId}Return document rewriting status. Also return URLs for downloading of rewritten document if paraphrasig was successful
ParaphraseApiparaphraseDocumentTrialPostPOST /paraphrase/document/trialTrial paraphrase document
ParaphraseApiparaphraseHcGetGET /paraphrase/hcHealth check for all paraphrase services.
ParaphraseApiparaphraseSupportedConversionsGetGET /paraphrase/supportedConversions
ParaphraseApiparaphraseTextPostPOST /paraphrase/textRewrite text
ParaphraseApiparaphraseTextRequestIdGetGET /paraphrase/text/{requestId}Return text rewriting status. Also return rewritten text if paraphrasing was successful
ParaphraseApiparaphraseTextTrialPostPOST /paraphrase/text/trialTrial rewrite text
SimplifyApisimplifyDocumentPostPOST /simplify/documentSimplify document
SimplifyApisimplifyDocumentRequestIdGetGET /simplify/document/{requestId}Return document simplifying status. Also return URLs for downloading of simplified document if paraphrasig was successful
SimplifyApisimplifyDocumentTrialPostPOST /simplify/document/trialTrial simplify document
SimplifyApisimplifyHcGetGET /simplify/hcHealth check for all simplify services.
SimplifyApisimplifySupportedConversionsGetGET /simplify/supportedConversions
SimplifyApisimplifyTextPostPOST /simplify/textSimplify text
SimplifyApisimplifyTextRequestIdGetGET /simplify/text/{requestId}Return text simplifying status. Also return simplified text if paraphrasing was successful
SimplifyApisimplifyTextTrialPostPOST /simplify/text/trialTrial simplify text
SummarizeApisummarizeDocumentPostPOST /summarize/documentSummarize document
SummarizeApisummarizeDocumentRequestIdGetGET /summarize/document/{requestId}Return document summarizing status. Also return URLs for downloading of summarized document if summarization was successful
SummarizeApisummarizeDocumentTrialPostPOST /summarize/document/trialTrial summarize document
SummarizeApisummarizeHcGetGET /summarize/hcHealth check for all summarize services.
SummarizeApisummarizeSupportedConversionsGetGET /summarize/supportedConversions
SummarizeApisummarizeTextPostPOST /summarize/textSummarize text
SummarizeApisummarizeTextRequestIdGetGET /summarize/text/{requestId}Return text summarizing status status. Also return rewrote text if translation was successful
SummarizeApisummarizeTextTrialPostPOST /summarize/text/trialTrial summarize text
SwaggerApiswaggerSpecGetGET /swagger/spec
SynonymizeApisynonymizeHcGetGET /synonymize/hcHealth check for all synonymizer services.
SynonymizeApisynonymizeTextPostPOST /synonymize/textSynonymize word
SynonymizeApisynonymizeTextRequestIdGetGET /synonymize/text/{requestId}Return text synonymizing status. Also return list of synonyms if it was successful
SynonymizeApisynonymizeTextTrialPostPOST /synonymize/text/trialTrial synonymize word

Documentation for Models

BaseTextRequest, CloudTextRequest, DegreeEnum, DetectionFileRequest, DetectionFileResponse, DetectionTextRequest, DetectionTextResponse, DetectionTrialFileRequest, FileSavingMode, HealthCheckInfo, HealthCheckResponse, HttpStatusCode, LanguageInfo, Model, Opt, ParaphraseFileRequest, ParaphraseFileResponse, ParaphraseTextRequest, ParaphraseTextResponse, ParaphraseTrialFileRequest, SimplifyFileRequest, SimplifyFileResponse, SimplifyTextResponse, SimplifyTrialFileRequest, StatusResponse, SummarizationFileRequest, SummarizationFileResponse, SummarizationTextRequest, SummarizationTextResponse, SummarizationTrialFileRequest, SupportedConversionsFormats, SynonymizeTextRequest, SynonymizeTextResponse, Tokenizer, TrialSupportedFormats


GroupDocs.Rewriter Cloud SKDs

GitHub

GitHub GitHub GitHub

Package Manager

NuGet Maven PyPI


Docs Swagger Examples Blog Support Release Notes Dashboard

VersionRelease Date
24.6June 30, 2024
24.5May 31, 2024
24.4April 26, 2024