t4ngo / dragonfly

ARCHIVED! - Speech recognition framework allowing powerful Python-based scripting and extension of Dragon NaturallySpeaking (DNS) and Windows Speech Recognition (WSR)
GNU Lesser General Public License v3.0
364 stars 82 forks source link

Meaning/significance of imported/exported? #39

Closed jgarvin closed 9 years ago

jgarvin commented 9 years ago

Short version: When should I set exported/imported on Rule objects to True/False? What difference does it make to Dragon/WSR?

It's not clear to me from the docs what it means for a Rule object to be imported or exported. The description for exported says top level voice commands, so I assume this is as opposed to rules that are only brought in by RuleRef? The description for imported says "if the rule is imported outside its grammar" -- does that mean you need to set it to true for rules being used in multiple grammars or something else?

Also I noticed MappingRule only takes exported. Is there a reason it never makes sense for it to be imported?

I stumbled on these questions trying to figure out why MappingRule construction is slow, so if it can help with that I'm especially keen ;)

t4ngo commented 9 years ago

The new documentation on exported and imported rules, added in the commit above, is available online here: http://dragonfly.readthedocs.org/en/latest/object_model.html#rules

jgarvin commented 9 years ago

@t4ngo that helps a lot! I was definitely getting confused by the language suggesting rules could be imported across grammars, makes a lot more sense now that I understand WSR supports it but Dragon doesn't.