Re: Accessing a parse tree

2009-04-18 Thread Clarendon
Dear John Machin So sorry about the typo. It should be: the program should *see* that the designated *words* are... a long way has two parentheses to the left -- (VP (DT -- before it hits a separate group -- VBD came). If there are three parenthesis, for instance (NP, this will means that what

Re: Accessing a parse tree

2009-04-17 Thread Clarendon
Thank you very much for this information. It seems to point me to the right direction. However, I do not fully understand the flatten function and its output. Some indices seem to be inaccurate. I tried to find this function at nltk.tree.Tree.flatten, but it returns a flattened tree, not a tuple.

Re: Accessing a parse tree

2009-04-17 Thread Aaron Brady
On Apr 17, 4:03 am, Clarendon jine...@hotmail.com wrote: Thank you very much for this information. It seems to point me to the right direction. However, I do not fully understand the flatten function and its output. Some indices seem to be inaccurate. I tried to find this function at

Re: Accessing a parse tree

2009-04-17 Thread John Machin
On 17/04/2009 7:32 PM, Clarendon wrote: Dear John Machin I presume that you replied to me instead of the list accidentally. So sorry about the typo. It should be: the program should *see* that the designated *words* are... a long way has two parentheses to the left -- (VP (DT -- before it

Re: Accessing a parse tree

2009-04-17 Thread Aaron Brady
On Apr 17, 8:22 am, John Machin sjmac...@lexicon.net wrote: On 17/04/2009 7:32 PM, Clarendon wrote: Dear John Machin I presume that you replied to me instead of the list accidentally. So sorry about the typo. It should be: the program should *see* that the designated *words* are...

Accessing a parse tree

2009-04-16 Thread Clarendon
Hello! I need a program that accesses a parse tree based on the designated words (terminals) within the tree. For instance, in: I came a long way in changing my habit. (ROOT (S (NP (PRP I)) (VP (VBD came) (NP (DT a) (JJ long) (NN way)) (PP (IN in) (S (VP

Re: Accessing a parse tree

2009-04-16 Thread John Machin
On Apr 17, 8:55 am, Clarendon jine...@hotmail.com wrote: Hello! I need a program that accesses a parse tree based on the designated words (terminals) within the tree. For instance, in: I came a long way in changing my habit. (ROOT   (S     (NP (PRP I))     (VP (VBD came)       (NP (DT

Re: Accessing a parse tree

2009-04-16 Thread Aaron Brady
On Apr 16, 10:16 pm, John Machin sjmac...@lexicon.net wrote: On Apr 17, 8:55 am, Clarendon jine...@hotmail.com wrote: Hello! I need a program that accesses a parse tree based on the designated words (terminals) within the tree. For instance, in: I came a long way in changing my