The introspect module

Helper functions to inspect and document objects.

decision_tree(lexicon, build=False)[source]

Yield all rules of the lexicon, including variations.

Every rule is a tuple. Items are members of the tuple. A variation (choice) is indicated by a frozenset, which again contains tuples. See also parce.rule.variations_tree().

If build is set to True, Pattern objects are built and ArgItem instances are replaced.

lexicons(lang)[source]

Return a list of all the lexicons on the language.

rule_items(lang)[source]

Yield all rule items in a language, flattening all RuleItem instances.

standardactions(lang)[source]

Return the set of all the StandardAction instances in the language.

Does not follow targets to other languages.

languages(lang)[source]

Return the set of all languages that this language refers to.

Does not follow targets from languages that are referred to.