All Projects → Linus789 → DeepLTranslator

Linus789 / DeepLTranslator

Licence: Apache-2.0 license
The DeepL Translator is an API written in Java that translates via the DeepL website sentences. Without API key.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to DeepLTranslator

deepl-python
Official Python library for the DeepL language translation API.
Stars: ✭ 548 (+1117.78%)
Mutual labels:  translator, deepl
deepl-rb
A simple ruby gem for the DeepL API
Stars: ✭ 38 (-15.56%)
Mutual labels:  translator, deepl
deepl-php-lib
🧠 DeepL API Client Library supporting PHP >= 7.3
Stars: ✭ 50 (+11.11%)
Mutual labels:  translator, deepl
deepl-api-connector
Connector library for deepl.com rest translation api
Stars: ✭ 12 (-73.33%)
Mutual labels:  translator, deepl
translate
A module grouping multiple translation APIs
Stars: ✭ 321 (+613.33%)
Mutual labels:  translator, deepl
TwitPy
🕊TwitPy - Follow/Unfollow Automation
Stars: ✭ 92 (+104.44%)
Mutual labels:  selenium
selenium-client
A PHP Selenium client
Stars: ✭ 31 (-31.11%)
Mutual labels:  selenium
weibo topic
微博话题关键词,个人微博采集, 微博博文一键删除 selenium获取cookie,requests处理
Stars: ✭ 28 (-37.78%)
Mutual labels:  selenium
translator
Translates for Korean
Stars: ✭ 32 (-28.89%)
Mutual labels:  translator
selenified
The Selenified Test Framework provides mechanisms for simply testing applications at multiple tiers while easily integrating into DevOps build environments. Selenified provides traceable reporting for both web and API testing, wraps and extends Selenium calls to more appropriately handle testing errors, and supports testing over multiple browser…
Stars: ✭ 38 (-15.56%)
Mutual labels:  selenium
PSAVanCanBridge
VAN - CAN protocol bridge (V2C) for cars made by PSA Group (Peugeot, Citroen)
Stars: ✭ 67 (+48.89%)
Mutual labels:  translator
webdriverio-zap-proxy
Demo - how to easily build security testing for Web App, using Zap and Glue
Stars: ✭ 58 (+28.89%)
Mutual labels:  selenium
InstaBot
Simple and friendly Bot for Instagram, using Selenium and Scrapy with Python.
Stars: ✭ 32 (-28.89%)
Mutual labels:  selenium
YouTubeUploader
An automated, headless YouTube Uploader
Stars: ✭ 116 (+157.78%)
Mutual labels:  selenium
testbench
Vaadin TestBench is a tool for automated user interface testing of Vaadin Framework applications.
Stars: ✭ 20 (-55.56%)
Mutual labels:  selenium
FUTpuppeteer
This is an auto-clicker bot used to trade players and items on FIFA Ultimate Team's Web App.
Stars: ✭ 11 (-75.56%)
Mutual labels:  selenium
DocumentTranslation
Command Line tool and Windows application for document translation, a local interface to the Azure Document Translation service for Windows, macOS and Linux.
Stars: ✭ 61 (+35.56%)
Mutual labels:  translator
pyderman
Install Selenium-compatible Chrome/Firefox/Opera/PhantomJS/Edge webdrivers automatically.
Stars: ✭ 24 (-46.67%)
Mutual labels:  selenium
nightwatch101
使用 Nightwatch 實現 End-to-End Testing ★
Stars: ✭ 42 (-6.67%)
Mutual labels:  selenium
JamTools
JamTools是一个跨平台的小工具集,包含了截屏、录屏、文字识别、各种格式转换、鼠标键盘动作录制播放、文件传输、聊天机器人等功能
Stars: ✭ 73 (+62.22%)
Mutual labels:  translator

DeepLTranslator

This project is a simple DeepL Translator API written in Java. It translates via the DeepL website sentences. This works without having a premium access and can be used free of charge.

Prerequisites

  • ChromeDriver installed and located in PATH

Install

Maven

Add the JitPack repository in your pom.xml

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

Add the dependency

<dependency>
    <groupId>com.github.Linus789</groupId>
    <artifactId>DeepLTranslator</artifactId>
    <version>2.0.0</version>
</dependency>

Gradle

Add the JitPack repository in your root build.gradle at the end of repositories

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Add the dependency

dependencies {
    implementation 'com.github.Linus789:DeepLTranslator:2.0.0'
}

Examples

Using a configuration

DeepLConfiguration deepLConfiguration = new DeepLConfiguration.Builder()
        .setTimeout(Duration.ofSeconds(10))
        .setRepetitions(3)
        .setRepetitionsDelay(retryNumber -> Duration.ofMillis(3000 + 5000 * retryNumber))
        .setPostProcessing(false)
        .build();

DeepLTranslator deepLTranslator = new DeepLTranslator(deepLConfiguration);

Synchronous translating

try {
    String translation = deepLTranslator.translate("I ran into a similar problem yesterday.", SourceLanguage.ENGLISH, TargetLanguage.GERMAN);
    System.out.println(translation);
} catch (Exception e) {
    e.printStackTrace();
}

Asynchronous translating

deepLTranslator.translateAsync("Detected cow running backwards.", SourceLanguage.ENGLISH, TargetLanguage.GERMAN)
        .whenComplete((res, ex) -> {
            if (ex != null) {
                ex.printStackTrace();
            } else {
                System.out.println(res);
            }
        });

Await termination

Blocks until all async translations from one DeepLTranslator instance have completed execution, or the timeout occurs, or the current thread is interrupted, whichever happens first.

try {
    deepLTranslator.awaitTermination(Long.MAX_VALUE, TimeUnit.SECONDS);
} catch (InterruptedException e) {
    e.printStackTrace();
}

Shutdown

Stops all running threads

DeepLTranslator.shutdown();

Example

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].