Hello, Yes, thanks, I just needed to do a recursion over a parse object using the getHead function.
On Wed, Mar 20, 2013 at 9:34 AM, Jörn Kottmann <[email protected]> wrote: > Hello, > > the head finder in the parser is rule bases and can also be used > standalone I think. > > Parse.getHead should work as far as I know gives you the head, you could > then > just change the label yourself to attach the H tag. > > Jörn > > > On 03/14/2013 11:16 AM, Rodrigo Agerri wrote: > >> Hello! >> >> I am using the parser (chunking) from the API. I currently get this >> >> ( (S (NP-SBJ-A (NP (NNP Pierre) (NNP Vinken)) (, ,) (ADJP (NP (CD 61) >> (NNS years)) (JJ old)) (, ,)) (VP-H (MD will) (VP-A (VB join) (NP-A >> (DT the) (NN board)) (PP-CLR (IN as) (NP-A (DT a) (JJ nonexecutive) >> (NN director))) (NP-TMP (NNP Nov.) (CD 29)))) (. .))) >> >> Which is fine, but I what I really want is this: >> >> ( (S-H (NP-SBJ-A (NP-H (NNP Pierre) (NNP-H Vinken)) (, ,) (ADJP (NP >> (CD 61) (NNS-H years)) (JJ-H old)) (, ,)) (VP-H (MD-H will) (VP-A >> (VB-H join) (NP-A (DT the) (NN-H board)) (PP-CLR (IN-H as) (NP-A (DT >> a) (JJ nonexecutive) (NN-H director))) (NP-TMP (NNP-H Nov.) (CD 29)))) >> (. .))) >> >> Is there a functionality implemented to obtain the parse tree with the >> heads of every constituent? I have been looking at the HeadFinder >> functions and the Parse getHead() functions but I do not seem to find >> a way to obtain this from the API. >> >> Cheers, >> >> Rodrigo >> > >
