<commit_before>Spellchecker
============

This nbextension provides a CodeMirror overlay mode to highlight incorrectly
spelled words in Markdown and Raw cells:

![screenshot.png](./screenshot.png)

It was inspired in part by
[NextStepWebs/codemirror-spell-checker](https://github.com/NextStepWebs/codemirror-spell-checker/blob/78773ebdd6c8cf8acd043342023636ae345ca0f3/src/js/spell-checker.js)
at the
[suggestion](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/issues/521)
of [@JanSchulz](https://github.com/JanSchulz).


Spellchecking
-------------

The actual spellchecking is performed by the
[Typo.js](https://github.com/cfinke/Typo.js) library, which is included as a
dependency, with its own license.
Typo.js allows the use of
[hunspell](https://en.wikipedia.org/wiki/Hunspell)-style dictionaries in a
javascript-based spellchecker.


Dictionaries
------------

The dictionaries used by the nbextension are fetched according to the
parameters stored in config. To keep this repository lightweight, no
dictionaries are incuded, and by default the nbextension fetches an `en_US`
dictionary from the [jsdelivr.net cdn](https://cdn.jsdelivr.net).
However, you can also add your own dictionaries for other languages, or to
remove dependency on the cdn (and thus make the nbextension usable offline).
To use your own dictionary, you'll need to alter the `.aff` and `.dic` urls in
the nbextension's config.
The urls can be relative (for files on your jupyter server) or absolute (for
files hosted elsewhere, e.g. on a cdn, like the defaults).

This is probably easiest to understand with some explicit examples.
Let's say I want to install a `de_DE` dictionary.
I can get the hunspell files from anywhere I like, but in this example I'm
going to download copies of the ones listed in the
[chromium source distribution](https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries/+/master),
which includes quite a lot of different languages.<commit_msg>[docs] fix links which have been redirected by renames<commit_after>Spellchecker
============

This nbextension provides a CodeMirror overlay mode to highlight incorrectly
spelled words in Markdown and Raw cells:

![screenshot.png](./screenshot.png)

It was inspired in part by
[sparksuite/codemirror-spell-checker](https://github.com/sparksuite/codemirror-spell-checker/blob/78773ebdd6c8cf8acd043342023636ae345ca0f3/src/js/spell-checker.js)
at the
[suggestion](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/issues/521)
of [@jankatins](https://github.com/jankatins).


Spellchecking
-------------

The actual spellchecking is performed by the
[Typo.js](https://github.com/cfinke/Typo.js) library, which is included as a
dependency, with its own license.
Typo.js allows the use of
[hunspell](https://en.wikipedia.org/wiki/Hunspell)-style dictionaries in a
javascript-based spellchecker.


Dictionaries
------------

The dictionaries used by the nbextension are fetched according to the
parameters stored in config. To keep this repository lightweight, no
dictionaries are incuded, and by default the nbextension fetches an `en_US`
dictionary from the [jsdelivr.net cdn](https://www.jsdelivr.com/).
However, you can also add your own dictionaries for other languages, or to
remove dependency on the cdn (and thus make the nbextension usable offline).
To use your own dictionary, you'll need to alter the `.aff` and `.dic` urls in
the nbextension's config.
The urls can be relative (for files on your jupyter server) or absolute (for
files hosted elsewhere, e.g. on a cdn, like the defaults).

This is probably easiest to understand with some explicit examples.
Let's say I want to install a `de_DE` dictionary.
I can get the hunspell files from anywhere I like, but in this example I'm
going to download copies of the ones listed in the
[chromium source distribution](https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries/+/master),
which includes quite a lot of different languages.
{'fraction_non_alphanumeric': 0.09594188376753507, 'fraction_numerical': 0.014028056112224449, 'mean_word_length': 4.837719298245614, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 14, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '679490', 'n_tokens_mistral': 1268, 'n_tokens_neox': 1203, 'n_words': 451}