I am going to use Stanford Corenlp 2013 to find phrase heads. I saw this thread.
But, the answer was not clear to me and I couldn't add any comment to continue that thread. So, I'm sorry for duplication.
What I have at the moment is the parse tree of a sentence (using Stanford Corenlp) (I also tried with CONLL format which is created by Stanford Corenlp). And what I need is exactly the head of noun phrases.
I don't know how I can use dependencies and the parse tree to extract heads of nounphrases.
What I know is that if I have nsubj (x, y)
, y is the head of the subject. If I have dobj(x,y)
, y is the head of the direct object. f I have iobj(x,y)
, y is the head of the indirect object.
However, I am not sure if this way is the correct way to find all phrase heads. If it is, which rules I should add to get all heads of noun phrases?
Maybe, it is worth saying that I need the heads of noun phrases in a java code.