dictionary-isv

0.1.3 • Public • Published

dictionary-isv

Interslavic spelling dictionary in UTF-8.

Useful with hunspell, nodehun, nspell, Open Office, LibreOffice, Firefox and Thunderbird, or macOS.

Generated by @orlean-git's Python package in this repository.

Install

npm:

npm install dictionary-isv

Use

The package exports multiple dictionaries:

  • combined (the default one), which can check Interslavic texts written both in Latin and Cyrillic scripts:
    var dictionary = require('dictionary-isv');
    // or the aliased version:
    var dictionary = require('dictionary-isv/combined');
  • etymological, not recommended for daily use, but useful for flavorizing texts to specific Slavic target languages and also for dictionary development:
    var dictionary = require('dictionary-isv/etymological');
  • Latin-only, a lightweight and a faster alternative to the default combined dictionary which works only for Interslavic written in Latin script:
    var dictionary = require('dictionary-isv/latin');
  • Cyrillic-only, a lightweight and a faster alternative to the default combined dictionary which works only for Interslavic written in Cyrillic script:
    var dictionary = require('dictionary-isv/cyrillic');

Every exported module is an asynchronous function with a callback, e.g.:

dictionary(function (err, result) {
  console.log(err || result)
  // -> {dic: <Buffer>, aff: <Buffer>}
});

where:

  • dic is a Buffer for the dictionary file at index.dic (in UTF-8)
  • aff is a Buffer for the affix file at index.aff (in UTF-8).

Also, you can directly load the files, using the respective IETF BCP 47 language codes:

var path = require('path')
var base = path.dirname(require.resolve('dictionary-isv'));

// combined:
fs.readFileSync(path.join(base, 'dict/art-x-interslv.dic'), 'utf-8')
fs.readFileSync(path.join(base, 'dict/art-x-interslv.aff'), 'utf-8')

// etymological:
fs.readFileSync(path.join(base, 'dict/art-Latn-x-interslv-etymolog.dic'), 'utf-8')
fs.readFileSync(path.join(base, 'dict/art-Latn-x-interslv-etymolog.aff'), 'utf-8')

// Latin:
fs.readFileSync(path.join(base, 'dict/art-Latn-x-interslv.dic'), 'utf-8')
fs.readFileSync(path.join(base, 'dict/art-Latn-x-interslv.aff'), 'utf-8')

// Cyrillic:
fs.readFileSync(path.join(base, 'dict/art-Cyrl-x-interslv.dic'), 'utf-8')
fs.readFileSync(path.join(base, 'dict/art-Cyrl-x-interslv.aff'), 'utf-8')

License

Acknowledgements

The original README: Titus Wormer.


Package Sidebar

Install

npm i dictionary-isv

Weekly Downloads

0

Version

0.1.3

License

MIT

Unpacked Size

3.16 MB

Total Files

19

Last publish

Collaborators

  • interslavic-bot