Dragon Macros (was: RE: Help Rewriting/Refactoring/Rethinking Parsing Algorythm)

Mike C. Fletcher mcfletch at home.com
Mon Mar 19 00:22:16 EST 2001


For those who are curious, here's a set of macros that seem to work nicely
for the names:

In VocEdit, define the following, then train them in vocabulary editor (the
items with nothing before the slash are supposed to have nothing there,
these are non-visible elements)...
	\pyname, LowerCase next word, Turn Capitalisation On, Turn off Spacing
between words
	\pycaps, Turn Capitalisation On, Turn off Spacing between words
	\pynorm, Restore Normal Capitalisation, Restore Normal Spacing
	\pynormal, Restore Normal Capitalisation, Restore Normal Spacing
	if __name__ == "__main__":\pymainline, Follow with one newline character

The last entry eliminates the need for a __name__ and __main__ entry, which
frees up the pyname entry for use as a lowerUpperUpper macro (and yes, I did
dictate that using the macro :) ).  pynormal is more natural feeling than
pynorm when you're first getting used to it.

I'm considering adding "add an extra space following this word" for pynorm
(without it you get some less-than-attractive effects, but with it I'd need
another phrase for "stop the caps and spaces but don't space" for when doing
a dotted name.  Oh, pyconstant might be introduced to give an ALL-CAPS + No
Space macro.

Making a script that auto-created all those + the def, equals, triple-quote,
etceteras and asked the user to train each a couple of times would be cool.
Maybe when I'm out of a job I'll look into it.

Anyway, enjoy all,
Mike

-----Original Message-----
From: Mike C. Fletcher [mailto:mcfletch at home.com]
Sent: Sunday, March 18, 2001 11:32 PM
To: 'Boopy Bootles'; python-list at python.org
Subject: RE: Help Rewriting/Refactoring/Rethinking Parsing Algorythm
...
Looking at your list, adding:
	py-caps  -> \No-Space-On\Caps-On
	py-norm  -> \No-Space-Off\Caps-Off
	py-name  -> <word> \No-Space-On\Caps-On [ not sure if you can do this
without a macro... ]
...
-----Original Message-----
From: Boopy Bootles [mailto:aschneid at mindspring.com]
Sent: Sunday, March 18, 2001 8:57 PM
To: python-list at python.org
Subject: Help Rewriting/Refactoring/Rethinking Parsing Algorythm


I'm trying to write a simple piece of code to make programming by voice
recognition software easier to do.  I wrote a very simple function that
would, for example, convert "number customers equals 5" to
"numberCustomers = 5".  But once I started using it, I quickly
discovered several more cases I had to handle.  So far, this is the
list:
...





More information about the Python-list mailing list