integrate Dragonfly ideas with natlink/unimacro?
Hello all,
As can be read from some of my recent contributions I am not happy with the development of dragonfly separate of other natlink developments. Unimacro was developed for unifying natlink grammars and ideas about that. I think I have ideas for merging things together.
I think the starting point of Chris was the objection that grammar rules (Grammar specification) were separated from the functions that were performed when the grammar was recognised (callback functions). For this objection I can think of making the gotResults_rule functions with the grammar specification line in the doc string. So now there is
gramSpec = """<ruleone> exported = example <ruletwo> <ruletwo> = of (a rule | a function | something else);"""
and gotResults functions for each of these two rules.
The gramSpec part can be completely dismissed if we make:
def gotResults_ruleone(self,words,fullResults):
"exported: example <ruletwo>"
pass
def gotResults_ruletwo(self,words,fullResults):
"of (a rule | a function | something else);"
print "caught example: %s"% words
In the package "ply" (python lex and yacc) this idea has been proven to be very readable and useful.
Just an idea, Chris, others please think about this...
Nice sunday, Quintijn

Working together
Hi Quintijn,
What a coincidence, both of us posting at nearly the same time on this peaceful Sunday.
You mentioned an interesting idea here. Using doc strings like this. I wonder if and how this will help tackle problems like Mark's duplicate-callback we discussed a few days ago.
To help you understand what Dragonfly is about, I wrote this post:
http://www.speechcomputing.com/node/2256
In it I show how the language model used can make a very big difference when writing voice-command macros. Quintijn, I'm interested in your feedback.
-- Chris.
more details of PLY usage?
can you provide more details of the PLY usage?
Delve into
Delve into http://www.dabeaz.com/ply/
The documentation gives an overview and examples,
Quintijn