mystem-wrapper

0.2.0 • Public • Published

mystem-wrapper

The only one clean, simple and performant Yandex mystem app wrapper module.

Read about mystem here. Shorly, mystem does morphological analysis of texts written in Russian language.

Installation

npm i mystem-wrapper --save

During installation mystem app binary file will be downloaded to bin folder of mystem-wrapper module's folder (source is Yandex CDN). To use custom binary set MYSTEM_PATH environment variable.

Example

var mystem = require('mystem-wrapper')();
 
mystem
    .analyze('Жили у бабуси два веселых гуся.')
    .then(console.log)
    .catch(console.error)
    .finally(mystem.close);

Usage

Module exposes function which builds wrapper. You can call it without parameters, or provide any string with command line arguments as you would do normally while working with mystem from command line. For list of mystem command line arguments params please refer to this page.

Then, wrapper itself has two methods: analyze(text) and close(), both return promise (in first case promise will be resolved with analysis results).

License

MIT

Package Sidebar

Install

npm i mystem-wrapper

Weekly Downloads

4

Version

0.2.0

License

MIT

Last publish

Collaborators

  • titarenko