Re: [Tutor] extracting phrases and their memberships from syntax

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

Re: [Tutor] extracting phrases and their memberships from syntax

2009-02-14 Thread Paul McGuire
-Original Message- From: Emad Nawfal (عماد نوفل) [mailto:emadnaw...@gmail.com] Sent: Saturday, February 14, 2009 8:59 AM To: Paul McGuire Cc: tutor@python.org Subject: Re: [Tutor] extracting phrases and their memberships from syntax Thank you so much Paul, Kent, and Hoftkamp. I was

Re: [Tutor] extracting phrases and their memberships from syntax

2009-02-14 Thread عماد نوفل
On Fri, Feb 13, 2009 at 10:20 AM, Paul McGuire wrote: > Pyparsing has a built-in helper called nestedExpr that fits neatly in with > this data. Here is the whole script: > > from pyparsing import nestedExpr > > syntax_tree = nestedExpr() > results = syntax_tree.parseString(st_data) > > from ppri

Re: [Tutor] extracting phrases and their memberships from syntax

2009-02-13 Thread Paul McGuire
Pyparsing has a built-in helper called nestedExpr that fits neatly in with this data. Here is the whole script: from pyparsing import nestedExpr syntax_tree = nestedExpr() results = syntax_tree.parseString(st_data) from pprint import pprint pprint(results.asList()) Prints: [[['S', ['NP-SB

Re: [Tutor] extracting phrases and their memberships from syntax trees

2009-02-13 Thread Kent Johnson
On Thu, Feb 12, 2009 at 6:20 PM, Emad Nawfal (عماد نوفل) wrote: > Dear Tutors, > I have syntax trees like the one below. I need to extract the membership > information like which adjective belongs to which noun phrase, and so on. In > short, I want to do something like this: > http://ilk.uvt.nl/te

Re: [Tutor] extracting phrases and their memberships from syntax trees

2009-02-12 Thread A.T.Hofkamp
Emad Nawfal (عماد نوفل) wrote: just want to be able to do this myself. My question is: what tools do I need for this? Could you please give me pointers to where to start? I'll then try to do it myself, and ask questions when I get stuck. I'd start with parsing (reading) the tree to a generic ab

[Tutor] extracting phrases and their memberships from syntax trees

2009-02-12 Thread عماد نوفل
Dear Tutors, I have syntax trees like the one below. I need to extract the membership information like which adjective belongs to which noun phrase, and so on. In short, I want to do something like this: http://ilk.uvt.nl/team/sabine/chunklink/README.html I already have the Perl script that does th