Hi Carlos, This is not exactly answer to your question but I am not really convinced that a Phrase structure tree is the best way to extract triplets. A dependency graph is a much better option.
There would be a number of NPs and PPs that are neither the subject nor the object, and not sure at all whether an adjective can be an object. However, if you want to use OpenNLP and the parse tree, maybe you can consider mapping the tree to FrameNet, thus you will see what kind of arguments a verb will have and which of these can potentially be the subject and the object. Best, Svetoslav ________________________________________ Från: Carlos Scheidecker <[email protected]> Skickat: den 26 september 2013 11:37 Till: [email protected] Ämne: Triplet Extraction with OpenNLP Hello all, I am interested in performing Triplet Extraction. For that, I need to traverse the parse tree. I know how to use the ChunkMe, however I am not sure how to use the Parser so that I can create a tree to traverse it. Ideally, I want to obtain the subject, predicate and object. To find the subject I need to search in the NP subtree selecting the first descendent of NP that is a Noun via breadth first search. To find the predicate I will search the VP subtree, the deepest verb descendent on that tree will give the predicate. Now for the object(s) they can be in 3 different subtrees. PP, NP and ADJ. In NP and PP they will be the first noun while on the ADJ we need to locate the first adjective. Therefore, what I need to learn is how to create the parser and the main tree so that I can navigate the subtrees. Thanks for the help, Carlos.
