CKEditor SCAYT Extension for hfst-ospell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
client
docs
etc
public
server
.editorconfig
.eslintrc.json
.gitignore
.gitmodules
.travis.yml
Readme.md
package.json
server.js
test.js

Readme.md

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.

Build Status

Install

Since this is based on hfst-ospell-js, you need to have a C++ compiler, python, and libarchive installed on your system (see this Readme for more information), as well as use NPM version 3 (or higher). Then, it's just

$ npm install

For instructions on how to install the CKEditor plugin, please see the Readme.md file in client/ckeditor/plugins/giella/.

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:

  1. Type "Lorem ipsum" into CK Editor
  2. Click "ABC" icon, activate SCAYT
  3. (In the same menu) change language to Northern Sámi
  4. See spelling suggestions
  5. 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 (compressed) HFST 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.