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 aBuffer
for the dictionary file atindex.dic
(in UTF-8) -
aff
is aBuffer
for the affix file atindex.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
- Dictionary and affix files - MIT License (@orlean-git).
- NPM package: MIT License (@noomorph).
Acknowledgements
The original README: Titus Wormer.