Skip to content

groupdocs-rewriter-cloud/groupdocs-rewriter-cloud-java

Repository files navigation

Java SDK for GroupDocs.Rewriter Cloud

Image GitHub license

Product Page | Documentation | Demos | Swagger UI | Examples | Blog | Search | Free Support | Free Trial

GroupDocs.Rewriter Cloud SDK for Java is a simple Java SDK that enables your cloud Apps to perform paraphrasing, simplification, summarization, comparison, formalization, synonymization, generation of CV, cover letter, keywords or video descriptions, detection of paraphrased, summarized and AI generated content in documents of different formats, images and scans, audio and video files 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 and many other file types. 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 of images and scans
  • Paraphrasing / summarization / simplification / paraphrase detection / comparison of plain text
  • Summarization of audio and video files
  • eBooks summarization
  • Words and idioms synonyms finder
  • Texts comparison to detect if one text is paraphrase or translation of another
  • AI generated texts detection
  • Generation of cover letters and text exercises
  • CV improvement based on current CV and job offer
  • Essay grade estimation
  • Keywords generation for web pages
  • Video description generation
  • Return resulting text in responseA
  • 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
  • Microsoft Word®: PPT, PPTX, PPTM
  • Adobe®: PDF
  • Markdown: MD
  • HTML: HTML
  • Audio / Video: MP3, WAV, FLAC, M4A, AAC, WMA, FLV, MKV, WEBM, AVI, MOV, WMV, RM, MPG
  • Images: BMP, JPG, PNG, SVG, GIF
  • eBooks: EPUB, MOBI, AZW3
  • 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
  • fi — to process Finnish text or document
  • fr — to process French text or document
  • hi — to process Hindi text or document
  • id — to process Indonesian text or document
  • it — to process Italian text or document
  • ja — to process Japanese text or document
  • lt — to process Lithuanian text or document
  • pt — to process Portuguese text or document
  • ru — to process Russian text or document
  • sk — to process Slovak text or document
  • th — to process Thai text or document
  • tr — to process Turkish text or document
  • uk — to process Ukrainian text or document
  • zh — to process Chinese 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>25.7</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:25.7"
  }

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/GroupDocs-rewriter-cloud-25.7.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

Class Method HTTP request Description
CompareApi compareHcGet GET /compare/hc Health check for all comparer services.
CompareApi compareTextPost POST /compare/text Compare texts and detect if one is translation or paraphrase of another
CompareApi compareTextRequestIdGet GET /compare/text/{requestId} Return text comparing status. Also return probability if one text is paraphrasing or translation of another
CompareApi compareTextSummarizationPost POST /compare/text/summarization Compare texts and detect if one is summarization of another
DetectApi detectAiGenerationDocumentPost POST /detect/ai-generation/document Detect ai generated text in the document
DetectApi detectAiGenerationOcrPost POST /detect/ai-generation/ocr Detect ai generation content in the image or scanned document
DetectApi detectAiGenerationTextPost POST /detect/ai-generation/text Detect ai generated text
DetectApi detectDocumentPost POST /detect/document Obsolete. Will be removed in the next version, use /detect/paraphrase/document/ instead this.
DetectApi detectDocumentRequestIdGet GET /detect/document/{requestId} Return document detection status. Also return probability of paraphrasing for the whole document and per paragraph
DetectApi detectDocumentTrialPost POST /detect/document/trial Trial detect paraphrasing in the document
DetectApi detectHcGet GET /detect/hc Health check for detect all services.
DetectApi detectOcrPost POST /detect/ocr Obsolete. Will be removed in the next version, use /detect/paraphrase/ocr instead this.
DetectApi detectParaphraseDocumentPost POST /detect/paraphrase/document Detect paraphrasing in the document
DetectApi detectParaphraseOcrPost POST /detect/paraphrase/ocr Detect paraphrasing in the image or scanned document
DetectApi detectParaphraseTextPost POST /detect/paraphrase/text Detect paraphrasing in text
DetectApi detectSummarizationDocumentPost POST /detect/summarization/document Detect summarization in the document
DetectApi detectSummarizationOcrPost POST /detect/summarization/ocr Detect summarization in the image or scanned document
DetectApi detectSummarizationTextPost POST /detect/summarization/text Detect summarization in text
DetectApi detectTextPost POST /detect/text Obsolete. Will be removed in the next version, use /detect/paraphrase/text instead this.
DetectApi detectTextRequestIdGet GET /detect/text/{requestId} Return text detection status. Also return probability of paraphrasing for the whole text
DetectApi detectTextTrialPost POST /detect/text/trial Trial detect paraphrasing in text
EstimateApi estimateDocumentPost POST /estimate/document Estimate grade of the document
EstimateApi estimateDocumentRequestIdGet GET /estimate/document/{requestId} Return essay estimate grade.
FileApi fileUploadPost POST /file/upload
FormalizeApi formalizeDocumentPost POST /formalize/document Formalize document
FormalizeApi formalizeDocumentRequestIdGet GET /formalize/document/{requestId} Return document formalizinh status. Also return URLs for downloading of formalized document if paraphrasing was successful
FormalizeApi formalizeHcGet GET /formalize/hc Health check for all simplify services.
FormalizeApi formalizeOcrPost POST /formalize/ocr Formalize scanned image or document
FormalizeApi formalizeSupportedConversionsGet GET /formalize/supportedConversions
FormalizeApi formalizeTextPost POST /formalize/text Formalize text
FormalizeApi formalizeTextRequestIdGet GET /formalize/text/{requestId} Return text formalizing status. Also return formalized text if paraphrasing was successful
GenerateApi generateCoverLetterPost POST /generate/cover-letter Generate cover letter based on job description and optionally CV and cover letter that should be adopted to this offer
GenerateApi generateCvPost POST /generate/cv Generate CV adopted to job description and optionally original CV
GenerateApi generateHcGet GET /generate/hc Health check for generation services.
GenerateApi generateKeywordsPost POST /generate/keywords Generate keywords for provided web page
GenerateApi generateRequestIdGet GET /generate/{requestId} Return generation status. Also return generated result
GenerateApi generateTestExercisePost POST /generate/test-exercise Generate test exercise based on job description and optionally CV
GenerateApi generateTestQuestionsPost POST /generate/test-questions Generate questions for technical interview based on job description and optionally CV
GenerateApi generateVideoDescriptionPost POST /generate/video-description Generate video description for provided video file
InfoApi infoAvailableLanguagesGet GET /info/availableLanguages
ParaphraseApi paraphraseDocumentPost POST /paraphrase/document Paraphrase document
ParaphraseApi paraphraseDocumentRequestIdGet GET /paraphrase/document/{requestId} Return document rewriting status. Also return URLs for downloading of rewritten document if paraphrasig was successful
ParaphraseApi paraphraseDocumentTrialPost POST /paraphrase/document/trial Trial paraphrase document
ParaphraseApi paraphraseHcGet GET /paraphrase/hc Health check for all paraphrase services.
ParaphraseApi paraphraseOcrPost POST /paraphrase/ocr Rewrite scanned image or PDF
ParaphraseApi paraphraseSupportedConversionsGet GET /paraphrase/supportedConversions
ParaphraseApi paraphraseTextPost POST /paraphrase/text Rewrite text
ParaphraseApi paraphraseTextRequestIdGet GET /paraphrase/text/{requestId} Return text rewriting status. Also return rewritten text if paraphrasing was successful
ParaphraseApi paraphraseTextTrialPost POST /paraphrase/text/trial Trial rewrite text
SimplifyApi simplifyDocumentPost POST /simplify/document Simplify document
SimplifyApi simplifyDocumentRequestIdGet GET /simplify/document/{requestId} Return document simplifying status. Also return URLs for downloading of simplified document if paraphrasig was successful
SimplifyApi simplifyDocumentTrialPost POST /simplify/document/trial Trial simplify document
SimplifyApi simplifyHcGet GET /simplify/hc Health check for all simplify services.
SimplifyApi simplifyOcrPost POST /simplify/ocr Simplify scanned image or document
SimplifyApi simplifySupportedConversionsGet GET /simplify/supportedConversions
SimplifyApi simplifyTextPost POST /simplify/text Simplify text
SimplifyApi simplifyTextRequestIdGet GET /simplify/text/{requestId} Return text simplifying status. Also return simplified text if paraphrasing was successful
SimplifyApi simplifyTextTrialPost POST /simplify/text/trial Trial simplify text
SummarizeApi summarizeDocumentPost POST /summarize/document Summarize document
SummarizeApi summarizeDocumentRequestIdGet GET /summarize/document/{requestId} Return document summarizing status. Also return URLs for downloading of summarized document if summarization was successful
SummarizeApi summarizeDocumentTrialPost POST /summarize/document/trial Trial summarize document
SummarizeApi summarizeHcGet GET /summarize/hc Health check for all summarize services.
SummarizeApi summarizeMediaPost POST /summarize/media Summarize media file
SummarizeApi summarizeOcrPost POST /summarize/ocr Summarize image or scanned PDF
SummarizeApi summarizeSupportedConversionsGet GET /summarize/supportedConversions
SummarizeApi summarizeTextPost POST /summarize/text Summarize text
SummarizeApi summarizeTextRequestIdGet GET /summarize/text/{requestId} Return text summarizing status status. Also return rewrote text if translation was successful
SummarizeApi summarizeTextTrialPost POST /summarize/text/trial Trial summarize text
SwaggerApi swaggerSpecGet GET /swagger/spec
SynonymizeApi synonymizeDocumentPost POST /synonymize/document Synonyize document
SynonymizeApi synonymizeHcGet GET /synonymize/hc Health check for all synonymizer services.
SynonymizeApi synonymizeOcrPost POST /synonymize/ocr Synonymize scanned image or document
SynonymizeApi synonymizeTextPost POST /synonymize/text Synonymize word
SynonymizeApi synonymizeTextRequestIdGet GET /synonymize/text/{requestId} Return text synonymizing status. Also return list of synonyms if it was successful
SynonymizeApi synonymizeTextTrialPost POST /synonymize/text/trial Trial synonymize word

Documentation for Models

GroupDocs.Rewriter Cloud SDKs in Popular Languages

.NET Python Java Android Go
GitHub GitHub GitHub GitHub GitHub
NuGet PyPi Maven Maven

Product Page | Docs | Demos | Swagger UI | Examples | Blog | Search | Free Support | Free Trial

About

GroupDocs.Rewriter Cloud SDK for Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published