Skip to content

🌍 Simple JavaScript Reverso API. Context, Spell Check, Synonyms, Translation and Conjugation are currently available.

License

Notifications You must be signed in to change notification settings

sk8Guerra/reverso-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(Unofficial) Reverso API

A simple wrapper around reverso.net.

Installing

$ npm install reverso-api

Usage

const Reverso = require('reverso-api');
const reverso = new Reverso();

Congrats! You can use all the methods now.
Let's read through the README and find out how it works.

getContext

reverso.getContext('meet me half way', 'English', 'Russian').then(response => {
    return console.log(response);
}).catch(err => {
    return console.error(err);
});

This method provides you examples of how to use a certain phrase or a word in target language. In this case, the phrase is meet me half way, its language is English and the target language is Russian.

getContext output preview

The method returns an object that contains given text, its language, examples' language, text's translation and examples of usage. Available languages for this method: English, Russian, German, Spanish, French, Italian, Polish.

getSpellCheck

reverso.getSpellCheck('helo', 'English').then(response => {
    return console.log(response);
}).catch(err => {
    return console.error(err);
});

This method provides you your mistakes that you might make in the text. In this case, the text is Helo, its language is English. The response will be corrected version of the text, therefore Hello.

getSpellCheck output preview

The method returns an array of objects. Available languages for this method: English and French.

getSynonyms

reverso.getSynonyms('dzień dobry', 'Polish').then(response => {
    return console.log(response);
}).catch(err => {
    return console.error(err);
});

This method provides you synonyms of word/phrase/sentence. In this case, the text is dzień dobry, its language is Polish.

getSynonyms output preview

The method returns an object that contains given text, its language and array of found synonyms. Available languages for this method: English, Russian, German, Spanish, French, Italian, Polish.

getTranslation

Warning: eventually, this method may stop working because your server's IP address will be banned by Reverso moderators.

reverso.getTranslation('So, how is your day today?', 'English', 'French').then(response => {
    return console.log(response);
}).catch(err => {
    return console.error(err);
});

This method provides you full translation of word/phrase/sentence.

getTranslation output preview

The method returns an object that contains given text, translation, context examples and voice. Available languages for this method: English, Russian, German, Spanish, French, Italian, Polish.

Info

About

🌍 Simple JavaScript Reverso API. Context, Spell Check, Synonyms, Translation and Conjugation are currently available.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%