def __init__(self, name, registry=None, **kwargs): """ :param name: Passed to dragonfly Grammar_ :param Registry registry: The Registry object that serves as the active `registration` list. It may be shared across RegistryGrammar instances. If None, a local Registry object is created. :param \*\*kwargs: Passed safely to dragonfly Grammar_ """ self.registry = _first_not_none(registry, Registry()) _safe_kwargs(Grammar.__init__, self, name, **kwargs)
def __init__(self, name, registry=None, forced_dictation=False, **kwargs): """ :param string name: The name of this element, used as the keyname in the extras dictionary passed back to _process_recognition :param `Registry` registry: The `Registry` instance that determines what words form a command and what literal tags are in effect. If None, the `ActiveGrammarRule` decorator will set the registry of any `RegistryGrammar` derived instance the containing rule is added to. :param bool forced_dictation: When True, refuses to recognize utterance-initial commands, so as to ensure this element returns non-empty free dictation. :param kwargs: Passed safely to Dictation.__init__ """ self._registry = registry self._forced_dictation = forced_dictation _safe_kwargs(Dictation.__init__, self, name=name, **kwargs)
def __init__(self, **kwargs): """kwargs passed to CompoundRule""" _safe_kwargs(CompoundRule.__init__, self, **kwargs)