plover.orthography – Orthography rules¶
This module provides functionality for generating candidates from attaching
orthographic suffixes to translated words. The functions below depend on the
orthography rules for the current steno system – see plover.system – Steno systems, and
especially the documentation for
ORTHOGRAPHY_RULES, for more information.
- plover.orthography.make_candidates_from_rules(word: str, suffix: str[, check: Function[str, bool]]) List[str]¶
Using the orthography rules of the current system, calculate the possible results of attaching
suffixto the rootword.Not all of these may be valid words in the system’s language;
add_suffix()will automatically look up candidate words to find the orthographically-correct translation.Pass a
checkfunction to filter out candidate words. In most cases this will not be needed; by default this is set tolambda x: True, returning all candidates.
- plover.orthography.add_suffix(word: str, suffix: str) str¶
Add the
suffixto theword, calculating candidates frommake_candidates_from_rules(). IfORTHOGRAPHY_WORDSexists, this looks up the best candidate from the list; if not, Plover does a simple join and attaches the suffix as is without any spelling changes.Returns the result of attaching the suffix to the word respecting orthographic rules.