jupyterlab-contrib / spellchecker

Spellchecker for JupyterLab notebook markdown cells and file editor.
BSD 3-Clause "New" or "Revised" License
204 stars 20 forks source link

Change dict loading mechanism from internal static to server extension #74

Closed krassowski closed 3 years ago

krassowski commented 3 years ago

Builds upon #70

Closes #31

In the follow up PR: split the existing dictionaries into separate packages so that one does not need to install the dictionaries they don't need

github-actions[bot] commented 3 years ago

Binder :point_left: Launch a binder notebook on branch _krassowski/jupyterlabspellchecker/ocordes-server-ext

ocordes commented 3 years ago

This looks good! I agree to look for dictionaries manually, without a lang.json file. But how can we implement a language description which is able to load files directly from the network? With lang.json this is easy, okay, one can argue "download everything you need" is sufficient ;-)

krassowski commented 3 years ago

But how can we implement a language description which is able to load files directly from the network? With lang.json this is easy, okay, one can argue "download everything you need" is sufficient ;-)

I have mixed feelings here. I did think about making another setting for "online dictionaries" so that one would go to the advanced settings and add something like:

{
    "ignore": ["JupyterLab", "Notebook", "Notatnik"],
    "language": "pl_PL-online",
    "onlineDictionaries": [
        {
            "id": "pl_PL-online",
            "aff": "http://some-url/pl_PL.aff",
            "dic": "http://some-url/pl_PL.dic",
            "name": "polski (Polska)"
        }
    ]
}

I'm not convinced that this is necessary now, given that the dictionaries loaded locally to the disk are more reliable, but I see that for some very specific use cases this might be useful. I will open a new issue to track this one.