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