Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
reverso-api
Advanced tools
Translate, get context examples or synonyms of words - this and much more you can do with your text queries via this API wrapper.
$ npm i reverso-api
const Reverso = require('reverso-api')
const reverso = new Reverso()
Congrats! You can use all the available methods now.
Let's read through the README and find out how the things work.
You can pass either callback function...
reverso.getContext(...params, (err, response) => {
...
})
or use .then()
function.
reverso.getContext(...params).then((response) => {
...
})
All the examples below are given using callback function.
getContext
reverso.getContext(
'meet me half way',
'english',
'russian',
(err, response) => {
if (err) throw new Error(err.message)
console.log(response)
}
)
Response:
{
ok: Boolean,
text: String,
source: String,
target: String,
translations: [String, ...],
examples: [
{
id: Number,
source: String,
target: String
},
...
]
}
Error:
{ ok: Boolean, message: String }
getSpellCheck
reverso.getSpellCheck('helo', 'english', (err, response) => {
if (err) throw new Error(err.message)
console.log(response)
})
Response:
{
ok: Boolean,
text: String,
sentences: [ { startIndex: Number, endIndex: Number, status: String } ... ],
stats: {
textLength: Number,
wordCount: Number,
sentenceCount: Number,
longestSentence: Number,
},
corrections: [
{
id: Number,
text: String,
type: String,
explanation: String,
corrected: String,
suggestions: [
{
text: String,
definition: String,
category: String,
},
...
],
},
]
}
Error:
{ ok: Boolean, message: String }
getSynonyms
reverso.getSynonyms('dzień dobry', 'polish', (err, response) => {
if (err) throw new Error(err.message)
console.log(response)
})
Response:
{
ok: true,
text: String,
source: String,
synonyms: [
{ id: Number, synonym: String },
...
]
}
Error:
{ ok: Boolean, message: String }
getTranslation
⚠️ WARNING: eventually, your server's IP address might get banned by Reverso moderators and you won't receive any data.
reverso.getTranslation(
'how is going?',
'english',
'chinese',
(err, response) => {
if (err) throw new Error(err.message)
console.log(response)
}
)
Response:
{
text: String,
source: String,
target: String,
translations: [String, ...],
context: {
examples: [
{
source: String,
target: String,
source_phrases: [
{
phrase: String,
offset: Number,
length: Number
},
...
],
target_phrases: [
{
phrase: String,
offset: Number,
length: Number
},
...
]
},
...
],
rude: Boolean
}, // or null
detected_language: String,
voice: String // or null
}
Error:
{ ok: Boolean, message: String }
getConjugation
reverso.getConjugation('идти', 'russian', (err, response) => {
if (err) throw new Error(err.message)
console.log(response)
})
Response:
{
ok: Boolean,
infinitive: String,
verbForms: [
{
id: Number,
conjugation: String,
verbs: [String, ...],
},
...
]
}
Error:
{ ok: Boolean, message: String }
FAQs
Unofficial Reverso API
The npm package reverso-api receives a total of 0 weekly downloads. As such, reverso-api popularity was classified as not popular.
We found that reverso-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.