yan-predictor
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

YanPredictor

Yandex Predictor Simple Node API

Шаг 1: Сгенерировать ключ

Документация API

Шаг 2: Установить npm пакет

npm install yan-predictor --save

Шаг 3: Использовать

const YanPredictor = require('yan-predictor').default;
(async function () {
  const yanPredictor = new YanPredictor('pdct.1.1.XXX.YYY.ZZZ');
  const result = await yanPredictor.predict({
    query: 'Аппетитная поп',
    lang: 'ru',
  });
  console.log(result) // => { endOfWord: false, pos: -3, text: [ 'попалась' ] }
})();

Package Sidebar

Install

npm i yan-predictor

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

4.99 kB

Total Files

7

Last publish

Collaborators

  • qertis