Spell Checker Tool Reference
Requirement
Python 3 and above
Usage
html_spell.py main_dict custom_dict [-i -s]
Source
code for spell checker.
Current Features
Interactive mode (toggled with -i flag):
a REPL for addressing typos on-the-go.
Fix words in-place in a file, by opening to the
specific line and word in vim.
Add custom words to a custom dictionary (/utils/data/custom-dict.txt).
Uses Regular Expression to skip words containing any characters other
than a letter, hyphen or apostrophe.
Exit with error code if aborted while the -i flag is provided,
or upon encountering a misspelt word when the -i flag is not provided.
Future Features?
Currently, the spell-checker is intended to be used to parse
one html file at a time. This means that for every file parsed,
the program has to read a large file (the english dictionary)
from disk. In the future, the program might be changed to process
files in batches, rather than one-by-one, to avoid this upfront cost.
It might be worthwhile to rewrite this application in a compiled
language (or cython?), in order to boost runtime speed. This
application's primary activity is parsing, and compiled languages
are the lingua franca of this arena. Might consider Rust, or Go.