SpellChecker class
(Shortest import: from brian2.utils.stringtools import SpellChecker)
- class brian2.utils.stringtools.SpellChecker(words, alphabet='abcdefghijklmnopqrstuvwxyz0123456789_')[source]
Bases:
object
A simple spell checker that will be used to suggest the correct name if the user made a typo (e.g. for state variable names).
- Parameters:
words : iterable of str
The known words
alphabet : iterable of str, optional
The allowed characters. Defaults to the characters allowed for identifiers, i.e. ascii characters, digits and the underscore.
Methods
edits1
(word)known
(words)known_edits2
(word)suggest
(word)Details