Search code examples
javanlpstanford-nlp

How can I get the Syntactic Tree from a SemanticGraph?


I have a SemanticGraph object and I want to get the syntactic tree (Tree Object) from that SemanticGraph. I know that the SemanticGraph is(can) be generated from a Tree, what I ask for is the inverse.


Solution

  • I don't think this is supported at this time. The easiest thing to do is use an Annotation object which will store the SemanticGraph and Tree object for a given sentence together.