Spelling

Spelling

Class representing the spell checked content which contains the raw text, cleaned text, misspelt Words, and spelling suggestions according to a specific language (i.e. a single NSpell instance). The methods, while documented, are private and should not be called outside class instantiation.

Constructor

new Spelling(speller, content)

Create a Spelling class
Source:
Parameters:
Name Type Description
speller NSpell an nspell instance
content string the content to be spell checked

Methods

_generateStrings() → {Array.<string>}

Generates misspelt strings. Should only be called during class instantiation.
Source:
Returns:
Type:
Array.<string>
An array of misspelt strings

_generateSuggestions() → {Suggestions}

Generates a Suggestions object. Should only be called during class instantiation.
Source:
Returns:
Type:
Suggestions
A Suggestions object

_generateWords() → {Array.<Word>}

Generates array of misspelt Words by checking the spelling of each bit of cleaned text. Should only be called during class instantiation.
Source:
See:
Returns:
Type:
Array.<Word>
An array of misspelt Words