Add spell checker
Add a spell checker to the code pane.
Implementation: Use the pyspellchecker checker engine because it is distributed with Python. It is a Levenshtein Distance algorithm to probabilistically identifiy misspelling and is relatively accurate. To help reduce common false positives, we use a whitelist containing some of the words observed in the MP code preloaded examples. We also ignore all MP keywords and metasymbols.
Common variable names such as x
are flagged as misspelled. If desired, we can suppress spell checking for all variables (they are preceded with $
), suppress variable names with one or two letters, or suppress all variable names containing numbers.
Spell checking may be turned on or off using the "Settings | Code editor | Spell checker" option. Default is on.