0.2.1 • Published 5 years ago

yandex-predictor v0.2.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Yandex Predictor

Yandex.Prediсtor is an application that prompts the most likely continuation of words or phrases typed by the user. It simplifies text entry, especially on mobile devices. In this case, the predictor takes into account possible typos. You can use it with this NPM package.

Follow this list

  • Get the API key here
  • npm i --save yandex-predictor

Here are how to use

// require the package
const YaPre = require('yandex-predictor');
// Create an instance of the class with the API key.
let ya = new YaPre('API_KEY');

getLangs

Get the list of languages

// example of using getLangs method
ya.getLangs((langsObj) => { // callback with the Object of all languages in ISO
  console.log(langsObj);
});
ParamTypeDefault
callbackfunc(obj)-

complete

Get the complete of phrase

// example of using complete method
ya.complete('Кахаю ц', (obj) => {
  console.log(obj); //
}, 'be', 10);
ParamTypeDefault
qstring-
callbackfunc(obj)-
langstring'en'
limitint5
0.2.1

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago