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

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

Quote:
-----Original Message-----

Sent: Sunday, March 18, 2001 11:32 PM

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-----

Sent: Sunday, March 18, 2001 8:57 PM

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:
...



Fri, 05 Sep 2003 13:22:16 GMT  
 Dragon Macros (was: RE: Help Rewriting/Refactoring/Rethinking Parsing Algorythm)
Thanks, Mike.  Clearly this is the way to go.  I'll still probably write a few
simple Natlink python macros for some special  cases (e.g., "grab lines 10 through
15" to select lines 10-15), but you've saved me a bunch of coding.

Since you've obviously figured out a lot about how to use DNS, I've got one more
question.  Using file dialog boxes, either for opening a file in a different
directory or for saving a file in a different directory, is a real pain.  Any tricks
to make life easier?

Thanks,
Anders

Quote:

> 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-----

> Sent: Sunday, March 18, 2001 11:32 PM

> 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-----

> Sent: Sunday, March 18, 2001 8:57 PM

> 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:
> ...



Fri, 05 Sep 2003 20:57:39 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help Rewriting/Refactoring/Rethinking Parsing Algorythm

2. ?MyControl[array]{prop:something} ???

3. graphical-functional-programming-environment

4. EXTERNPROTO/CreateVRMLFromString/EAI

5. ----------------------------------------------------*Question*-------------------------------------------------------------------------

6. ANNOUNCE: Tclsock uploaded to ftp.aud.alcatel.com/tcl/incoming

7. HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

8. Rewriting data using REWRITE ?

9. Refactoring Browser. VSE Refactoring Browser

 

 
Powered by phpBB® Forum Software