All Projects → retextjs → retext-spell

retextjs / retext-spell

Licence: MIT license
plugin to check spelling

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to retext-spell

retext-profanities
plugin to check for profane and vulgar wording
Stars: ✭ 34 (-35.85%)
Mutual labels:  natural-language, retext, retext-plugin
retext-assuming
Check for unhelpful ‘assuming’ phrases such as ‘just’, ‘simply’ or ‘obviously’ with retext
Stars: ✭ 15 (-71.7%)
Mutual labels:  retext, retext-plugin
WordSegmentationDP
Word Segmentation with Dynamic Programming
Stars: ✭ 18 (-66.04%)
Mutual labels:  spell-check, spell-checker
Retext
natural language processor powered by plugins part of the @unifiedjs collective
Stars: ✭ 2,119 (+3898.11%)
Mutual labels:  natural-language, retext
remark-retext
plugin to transform from remark (Markdown) to retext (natural language)
Stars: ✭ 18 (-66.04%)
Mutual labels:  natural-language, retext
nalcos
Search Git commits in natural language
Stars: ✭ 50 (-5.66%)
Mutual labels:  natural-language
n2words
Convert numerical numbers to written numbers, in 25+ languages.
Stars: ✭ 44 (-16.98%)
Mutual labels:  natural-language
LinSpell
Fast approximate strings search & spelling correction
Stars: ✭ 52 (-1.89%)
Mutual labels:  spell-check
parallel-corpora-tools
Tools for filtering and cleaning parallel and monolingual corpora for machine translation and other natural language processing tasks.
Stars: ✭ 35 (-33.96%)
Mutual labels:  natural-language
gdpr-fingerprint-pii
Use Watson Natural Language Understanding and Watson Knowledge Studio to fingerprint personal data from unstructured documents
Stars: ✭ 49 (-7.55%)
Mutual labels:  natural-language
nl4dv
A python toolkit to create Visualizations (Vis) using natural language (NL) or add an NL interface to existing Vis.
Stars: ✭ 63 (+18.87%)
Mutual labels:  natural-language
spacy hunspell
✏️ Hunspell extension for spaCy 2.0.
Stars: ✭ 94 (+77.36%)
Mutual labels:  spell-check
automation-for-humans
Converts English statements to automation.
Stars: ✭ 67 (+26.42%)
Mutual labels:  natural-language
NLP-Natural-Language-Processing
Projects and useful articles / links
Stars: ✭ 149 (+181.13%)
Mutual labels:  natural-language
hunspell-asm
WebAssembly based Javascript bindings for hunspell spellchecker
Stars: ✭ 60 (+13.21%)
Mutual labels:  spell
paper-checker
Find simple grammar mistakes in scientific documents.
Stars: ✭ 16 (-69.81%)
Mutual labels:  spell-checker
spellchecker-wasm
SpellcheckerWasm is an extrememly fast spellchecker for WebAssembly based on SymSpell
Stars: ✭ 46 (-13.21%)
Mutual labels:  spell-check
buzzwords
List of (possible) English buzzword words
Stars: ✭ 51 (-3.77%)
Mutual labels:  natural-language
openvalidation
Compose validation rules in the language you use every day, openVALIDATION handles code creation for you.
Stars: ✭ 62 (+16.98%)
Mutual labels:  natural-language
hedges
List of (possible) English hedge words
Stars: ✭ 39 (-26.42%)
Mutual labels:  natural-language

retext-spell

Build Coverage Downloads Size Sponsors Backers Chat

retext plugin to check spelling (with nspell).

Install

This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required.

npm:

npm install retext-spell

Use

import {reporter} from 'vfile-reporter'
import {retext} from 'retext'
import retextSpell from 'retext-spell'
import dictionary from 'dictionary-en-gb'

retext()
  .use(retextSpell, dictionary)
  .process('Some useles documeant.')
  .then((file) => {
    console.error(reporter(file))
  })

Yields:

   1:6-1:12  warning  `useles` is misspelt; did you mean `useless`?      useles     retext-spell
  1:13-1:22  warning  `documeant` is misspelt; did you mean `document`?  documeant  retext-spell

⚠ 2 warnings

API

This package exports no identifiers. The default export is retextSpell.

unified().use(retextSpell, options)

retext-spell is async; use process, not processSync.

Check spelling (with nspell).

Signatures
  • retext().use(spell, dictionary)
  • retext().use(spell, options)
options.dictionary

A dictionary (Function). Result of requiring one of the dictionaries in wooorm/dictionaries.

options.personal

Personal dictionary (string or a Buffer in UTF-8, optional).

options.ignore

List of words to ignore (Array.<string>, default []).

options.ignoreLiteral

Whether to ignore literal words (boolean?, default true).

options.ignoreDigits

Whether to ignore “words” that contain only digits, such as 123456 (boolean?, default true).

options.normalizeApostrophes

Deal with apostrophes (boolean?, default true). Whether to swap smart apostrophes () with straight apostrophes (') before checking spelling. Dictionaries typically support this, but this option can be used if not.

options.max

Number of unique words to suggest for (number?, default 30). By default, up to thirty words are suggested for. Further misspellings are still warned about, but without suggestions. Increasing this number significantly impacts performance.

Messages

Each message is emitted as a VFileMessage on file, with the following fields:

message.source

Name of this plugin ('retext-spell').

message.ruleId

Normalized not ok word (string, such as 'useles').

message.actual

Current not ok word (string, such as 'Useles').

message.expected

List of suggestions of words to use (Array.<string>, such as ['Useless']).

Related

Contribute

See contributing.md in retextjs/.github for ways to get started. See support.md for ways to get help.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MIT © Titus Wormer

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].