Name | jupyterlab-spellchecker JSON |
Version |
0.8.4
JSON |
| download |
home_page | |
Summary | A spell checker for JupyterLab. |
upload_time | 2023-07-28 20:19:40 |
maintainer | |
docs_url | None |
author | JupyterLab Spellchecker Development Team |
requires_python | >=3.8 |
license | BSD 3-Clause License Copyright (c) 2020, ijmbarr All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# jupyterlab-spellchecker
[](https://jupyterlab-contrib.github.io/)
[](https://github.com/jupyterlab-contrib/spellchecker/actions)
[](https://mybinder.org/v2/gh/jupyterlab-contrib/spellchecker/master?urlpath=lab)
[](https://pypi.org/project/jupyterlab-spellchecker/)
[](https://anaconda.org/conda-forge/jupyterlab-spellchecker)
A JupyterLab extension highlighting misspelled words in markdown cells within notebooks and in the text files.

The JupyterLab extension is based on [the spellchecker Jupyter Notebook extension](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tree/master/src/jupyter_contrib_nbextensions/nbextensions/spellchecker) and relies on [Typo.js](https://github.com/cfinke/Typo.js) for the actual spell checking.
Spellchecker suggestions are available from the context menu. The style of the highlights can be customized in the _Advanced Settings Editor_.
You can click on the status bar item to:
- change language
- enable spelling in the current document
Spellchecking in comments and strings in code can be configured in settings.
The extension provides (Hunspell) [SCOWL](http://wordlist.aspell.net/) dictionaries for:
- American, British, Canadian, and Australian English
- French,
- German (Germany, Austria, Switzerland)
- Portuguese,
- Spanish
and will also use the Hunspell dictionaries installed in [known paths](https://github.com/jupyterlab-contrib/spellchecker/search?q=OS_SPECIFIC_PATHS) which vary by operating systems.
If you use JupyterLab in a browser running on a different computer than the jupyter server, please note that the dictionaries need to be installed on the server machine.
You can add custom dictionary by placing Hunspell files it in `dictionaries` folder in one of the `data` locations as returned by:
```bash
jupyter --paths
```
You should place two files with extensions `.aff` and `.dic`, and name following [BCP 47](https://datatracker.ietf.org/doc/html/rfc5646#section-2.1) standards.
For more details, please see the [example](#adding-dictionaries---example) below.
## JupyterLab Version
The extension has been tested up to JupyterLab version 4.0.
## Installation
For JupyterLab 3.x and 4.x:
```bash
pip install jupyterlab-spellchecker
```
or
```bash
conda install -c conda-forge jupyterlab-spellchecker
```
For JupyterLab 2.x:
```bash
jupyter labextension install @ijmbarr/jupyterlab_spellchecker
```
### Adding dictionaries - example
If `jupyter --paths` looks like:
```
config:
/home/your_name/.jupyter
/usr/local/etc/jupyter
/etc/jupyter
data:
/home/your_name/.local/share/jupyter
/usr/local/share/jupyter
/usr/share/jupyter
runtime:
/home/your_name/.local/share/jupyter/runtime
```
and you want to add Polish language, you would put `pl_PL.aff` and `pl_PL.dic` in `/home/your_name/.local/share/jupyter/dictionaries` (you will need to create this folder), so that the final structure looks similar to:
```
/home/your_name/.local/share/jupyter
├── dictionaries
│ ├── pl_PL.aff
│ └── pl_PL.dic
├── kernels
│ └── julia-1.5
│ ├── kernel.json
│ ├── logo-32x32.png
│ └── logo-64x64.png
├── nbconvert
│ └── templates
│ ├── html
│ └── latex
├── nbsignatures.db
├── notebook_secret
└── runtime
```
#### Where to get the dictionaries from?
Some good sources of dictionaries include:
- [LibreOffice/dictionaries](https://github.com/LibreOffice/dictionaries) GitHub repository
- [Chromium](https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries/+/master) repository
- (if you know of any other quality resources please send a PR to add them here)
#### Using online dictionaries
An alternative to saving the dictionary on your own disk (or more accurately on the disk where jupyter-server is set up)
is fetching the dictionaries from a remote URL. This requires an Internet connection to load the dictionary
(each time when you open JupyterLab or change the dictionary), and might be useful if you are not able
to save dictionaries on disk (e.g. when using JupyterLab on JupyterHub configured by someone else).
To configure the online dictionaries go to _Advanced Settings Editor_ → _Spellchecker_
and set `onlineDictionaries` to an array of JSON objects like in the example below:
```json
[
{
"id": "en_US-online",
"aff": "https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",
"dic": "https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",
"name": "My favorite variant of English"
}
]
```
## Contributing
### Development install
Note: You will need NodeJS to build the extension package.
The `jlpm` command is JupyterLab's pinned version of
[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
`yarn` or `npm` in lieu of `jlpm` below.
```bash
# Clone the repo to your local environment
# Change directory to the jupyterlab_spellchecker directory
# Install package in development mode
pip install -e .
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
jlpm run build
pip install pytest
```
You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.
```bash
# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm run watch
# Run JupyterLab in another terminal
jupyter lab
```
### Before commit
Make sure that eslint passes:
```bash
jlpm run eslint:check
```
If there are any issues it might be possible to autofix them with:
```bash
jlpm run eslint
```
Run tests:
```bash
python -m pytest
```
Raw data
{
"_id": null,
"home_page": "",
"name": "jupyterlab-spellchecker",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "",
"author": "JupyterLab Spellchecker Development Team",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/97/74/7f05f8ee3c9cb47f4f52ea08e5a56cf8e4ed154a39472330435f977db178/jupyterlab_spellchecker-0.8.4.tar.gz",
"platform": null,
"description": "# jupyterlab-spellchecker\n\n[](https://jupyterlab-contrib.github.io/)\n[](https://github.com/jupyterlab-contrib/spellchecker/actions)\n[](https://mybinder.org/v2/gh/jupyterlab-contrib/spellchecker/master?urlpath=lab)\n[](https://pypi.org/project/jupyterlab-spellchecker/)\n[](https://anaconda.org/conda-forge/jupyterlab-spellchecker)\n\nA JupyterLab extension highlighting misspelled words in markdown cells within notebooks and in the text files.\n\n\n\nThe JupyterLab extension is based on [the spellchecker Jupyter Notebook extension](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tree/master/src/jupyter_contrib_nbextensions/nbextensions/spellchecker) and relies on [Typo.js](https://github.com/cfinke/Typo.js) for the actual spell checking.\nSpellchecker suggestions are available from the context menu. The style of the highlights can be customized in the _Advanced Settings Editor_.\n\nYou can click on the status bar item to:\n\n- change language\n- enable spelling in the current document\n\nSpellchecking in comments and strings in code can be configured in settings.\n\nThe extension provides (Hunspell) [SCOWL](http://wordlist.aspell.net/) dictionaries for:\n\n- American, British, Canadian, and Australian English\n- French,\n- German (Germany, Austria, Switzerland)\n- Portuguese,\n- Spanish\n\nand will also use the Hunspell dictionaries installed in [known paths](https://github.com/jupyterlab-contrib/spellchecker/search?q=OS_SPECIFIC_PATHS) which vary by operating systems.\nIf you use JupyterLab in a browser running on a different computer than the jupyter server, please note that the dictionaries need to be installed on the server machine.\n\nYou can add custom dictionary by placing Hunspell files it in `dictionaries` folder in one of the `data` locations as returned by:\n\n```bash\njupyter --paths\n```\n\nYou should place two files with extensions `.aff` and `.dic`, and name following [BCP 47](https://datatracker.ietf.org/doc/html/rfc5646#section-2.1) standards.\nFor more details, please see the [example](#adding-dictionaries---example) below.\n\n## JupyterLab Version\n\nThe extension has been tested up to JupyterLab version 4.0.\n\n## Installation\n\nFor JupyterLab 3.x and 4.x:\n\n```bash\npip install jupyterlab-spellchecker\n```\n\nor\n\n```bash\nconda install -c conda-forge jupyterlab-spellchecker\n```\n\nFor JupyterLab 2.x:\n\n```bash\njupyter labextension install @ijmbarr/jupyterlab_spellchecker\n```\n\n### Adding dictionaries - example\n\nIf `jupyter --paths` looks like:\n\n```\nconfig:\n /home/your_name/.jupyter\n /usr/local/etc/jupyter\n /etc/jupyter\ndata:\n /home/your_name/.local/share/jupyter\n /usr/local/share/jupyter\n /usr/share/jupyter\nruntime:\n /home/your_name/.local/share/jupyter/runtime\n```\n\nand you want to add Polish language, you would put `pl_PL.aff` and `pl_PL.dic` in `/home/your_name/.local/share/jupyter/dictionaries` (you will need to create this folder), so that the final structure looks similar to:\n\n```\n/home/your_name/.local/share/jupyter\n\u251c\u2500\u2500 dictionaries\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 pl_PL.aff\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 pl_PL.dic\n\u251c\u2500\u2500 kernels\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 julia-1.5\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 kernel.json\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 logo-32x32.png\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 logo-64x64.png\n\u251c\u2500\u2500 nbconvert\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 templates\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 html\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 latex\n\u251c\u2500\u2500 nbsignatures.db\n\u251c\u2500\u2500 notebook_secret\n\u2514\u2500\u2500 runtime\n```\n\n#### Where to get the dictionaries from?\n\nSome good sources of dictionaries include:\n\n- [LibreOffice/dictionaries](https://github.com/LibreOffice/dictionaries) GitHub repository\n- [Chromium](https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries/+/master) repository\n- (if you know of any other quality resources please send a PR to add them here)\n\n#### Using online dictionaries\n\nAn alternative to saving the dictionary on your own disk (or more accurately on the disk where jupyter-server is set up)\nis fetching the dictionaries from a remote URL. This requires an Internet connection to load the dictionary\n(each time when you open JupyterLab or change the dictionary), and might be useful if you are not able\nto save dictionaries on disk (e.g. when using JupyterLab on JupyterHub configured by someone else).\n\nTo configure the online dictionaries go to _Advanced Settings Editor_ \u2192 _Spellchecker_\nand set `onlineDictionaries` to an array of JSON objects like in the example below:\n\n```json\n[\n {\n \"id\": \"en_US-online\",\n \"aff\": \"https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff\",\n \"dic\": \"https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic\",\n \"name\": \"My favorite variant of English\"\n }\n]\n```\n\n## Contributing\n\n### Development install\n\nNote: You will need NodeJS to build the extension package.\n\nThe `jlpm` command is JupyterLab's pinned version of\n[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use\n`yarn` or `npm` in lieu of `jlpm` below.\n\n```bash\n# Clone the repo to your local environment\n# Change directory to the jupyterlab_spellchecker directory\n# Install package in development mode\npip install -e .\n# Link your development version of the extension with JupyterLab\njupyter labextension develop . --overwrite\n# Rebuild extension Typescript source after making changes\njlpm run build\npip install pytest\n```\n\nYou can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.\n\n```bash\n# Watch the source directory in one terminal, automatically rebuilding when needed\njlpm run watch\n# Run JupyterLab in another terminal\njupyter lab\n```\n\n### Before commit\n\nMake sure that eslint passes:\n\n```bash\njlpm run eslint:check\n```\n\nIf there are any issues it might be possible to autofix them with:\n\n```bash\njlpm run eslint\n```\n\nRun tests:\n\n```bash\npython -m pytest\n```\n",
"bugtrack_url": null,
"license": "BSD 3-Clause License Copyright (c) 2020, ijmbarr All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
"summary": "A spell checker for JupyterLab.",
"version": "0.8.4",
"project_urls": {
"Issues": "https://github.com/jupyterlab-contrib/spellchecker/issues",
"Source": "https://github.com/jupyterlab-contrib/spellchecker"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0854b3d575124fa9404ceef40728f205d033fe52cf417a2245c5d108afe728e8",
"md5": "52b5632447daf3ac92a268b2508b51a0",
"sha256": "2701999d6a826e0a54a12fa41c60b9ffef220ee267e78fe20144423dbcc6d6d8"
},
"downloads": -1,
"filename": "jupyterlab_spellchecker-0.8.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "52b5632447daf3ac92a268b2508b51a0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 5328613,
"upload_time": "2023-07-28T20:19:38",
"upload_time_iso_8601": "2023-07-28T20:19:38.479317Z",
"url": "https://files.pythonhosted.org/packages/08/54/b3d575124fa9404ceef40728f205d033fe52cf417a2245c5d108afe728e8/jupyterlab_spellchecker-0.8.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "97747f05f8ee3c9cb47f4f52ea08e5a56cf8e4ed154a39472330435f977db178",
"md5": "0dc1521ec1cbd7dd77774b7d7762e69f",
"sha256": "e0722f00c795e8b5d60655ed475dd91a67fe7180c32ac891a50f38c7abc7684b"
},
"downloads": -1,
"filename": "jupyterlab_spellchecker-0.8.4.tar.gz",
"has_sig": false,
"md5_digest": "0dc1521ec1cbd7dd77774b7d7762e69f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 5390753,
"upload_time": "2023-07-28T20:19:40",
"upload_time_iso_8601": "2023-07-28T20:19:40.629698Z",
"url": "https://files.pythonhosted.org/packages/97/74/7f05f8ee3c9cb47f4f52ea08e5a56cf8e4ed154a39472330435f977db178/jupyterlab_spellchecker-0.8.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-28 20:19:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jupyterlab-contrib",
"github_project": "spellchecker",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "jupyterlab-spellchecker"
}