3

How can you develop a tree for the syntax analysis in google nl api. Like stanford corenlp uses brat annotation tool to generate the tree. Can we use something like that to generate a dependency parse tree for the json response for google nl api, if so how?

Thanks in advance :)

  • You can use [embedded brat](http://brat.nlplab.org/embed.html) manual page to see how to use brat to visualise JSON data (but you will have to transform it into brat's JSON format, of course, but this is not hard). – Amadan Nov 22 '16 at 01:06

2 Answers2

2

There's the demo UI -- go to the NL API home page and scroll down to the interactive demo. There you can put in a sentence, click on "syntax" and get a pretty tree that shows the parse tree.

Parse tree visualization

In the actual demo, you can mouse over the tokens to see more detail, like morphology.

This will help for individual examples. If you want to visualize these things programatically, you'll have to implement that yourself, or use existing tools.

Dave Orr
  • 1,082
  • 1
  • 9
  • 18
  • Hey thanks for the reply. I know how the demo works. I just needed it to be implemented separately on a server or something, where I can compare it with another parser like core NLP, for checking both of their precision. Was searching for a tool, which would do this. I guess it's time to program my own config, in brat. Any suggestions there would help. Thanks – Amrit Bulusu Nov 21 '16 at 00:01
0

I'm not able to find any pre-existing tools that do this, but the documentation for the Google NL API has a section on dependency trees which include pseudocode for iterating over the analysis response. This could be useful for parsing the response into a format that brat or another syntax tree visualization tool understands.

Adam
  • 5,697
  • 1
  • 20
  • 52
  • That's actually what I'm doing right now coz I was not able to find any tools, but can you suggest any other tree visualization tools other than brat coz brat requires the data to be in .ann format. – Amrit Bulusu Nov 16 '16 at 18:36