CKEditor SCAYT Extension for hfst-ospell
This project contains a server based on Node.js that enables you to use the spellcheck-as-you-type extions for CKEditor with hfst-ospell dictionaries.
The server auto loads dictionary files. It means that languages are added, updated or removed when dictionaries are added to or removed from the dictionary directory.
Install
- Go to https://rustup.rs and install the stable Rust toolchain.
$ git submodule init
$ git submodule update
$ npm install
Running Example
To get see an example, just run
$ npm start
and open http://localhost:3000/ in your browser.
Assuming you have some dictionaries installed (see below), you can test the functionality like this:
- Type "Lorem ipsum" into CK Editor
- Click "ABC" icon, activate SCAYT
- (In the same menu) change language to Northern Sámi
- See spelling suggestions
- Successfully correct "Lorem ipsum" to "bore Epsom"!
Dictionaries
By conventions, all dictionary files need to be
- placed in the local
etc/
directory, - called
LANG_COUNTRY.zhfst
, - and, of couse, be valid (stored, without compression) ZHFST files.
You can find several dictionaries on divvun.no. Many are under the GPL, for some there is no license specified, though.
Assuming you accept the respective licensing terms, you can e.g. use
$ curl http://divvun.no/static_files/zhfsts/se.zhfst > "etc/sme_NO.zhfst"
$ curl http://divvun.no/static_files/zhfsts/smj.zhfst > "etc/smj_NO.zhfst"
$ curl http://divvun.no/static_files/zhfsts/sma.zhfst > "etc/sma_NO.zhfst"
to download the files for Northern, South, and Lule Sámi.