[Tutor] extracting phrases and their memberships from syntax

Paul McGuire ptmcg at austin.rr.com
Sat Feb 14 16:10:41 CET 2009


-----Original Message-----
From: Emad Nawfal (عماد نوفل) [mailto:emadnawfal at gmail.com] 
Sent: Saturday, February 14, 2009 8:59 AM
To: Paul McGuire
Cc: tutor at python.org
Subject: Re: [Tutor] extracting phrases and their memberships from syntax


Thank you so much Paul, Kent, and Hoftkamp.
I was asking what the right tools were, and I got two fully-functional
scripts back. Much more than I had expected.

I'm planning to use these scripts instead of the Perl one. I've also started
with PyParsing as it seems to be a little easier to understand than PLY.

<snip>
---------------------------
Glad to help - actually, I sent 2 working scripts, and Kent sent 1, so I
count THREE fully-functional scripts! ;)  Also, Kent's recursive example
code for traversing the returned parse tree should also work with the data
structure that the pyparsing example returns.

Please make use of the pyparsing samples and documentation available at the
pyparsing wiki - pyparsing.wikispaces.com.  Also, if you use the Windows
binary or easy_install installations, you don't get the help and example
directories - download the source ZIP distribution, and you get a lot more
helpful information.

-- Paul



More information about the Tutor mailing list