Context-Sensitive Spelling Checker (csSpell) is a spelling checker that examines words and their context to detect potential misspellings instead of using a spelling dictionary (the cs in csSpell stands for context sensitive). csSpell can scan plain text files; files that contain non-text elements such as SGML, HTML, or XML tags; and even files that contain program code.
How does it work?
csSpell scans a group of files, analyzes each word in each file, and reports potential inconsistencies. Instead of comparing each word to a list of known words (as dictionary-based spelling checkers do), csSpell compares each word to all the other words in the group of files being scanned. It can therefore identify likely misspellings that dictionary-based spell checkers cannot, such as
- misspellings of words not listed in any spelling dictionary (for example, product names, product acronyms, and command keywords)
- misspellings that are correct spellings of a different, unintended word (for example, mange instead of manage)
There are certain types of misspellings that csSpell cannot identify. For example, if a word is consistently misspelled, csSpell will not know to flag it. For this reason, csSpell should be used in addition to, not instead of, a dictionary-based spelling checker.