Skip to content

Showing constituent parse trees in the browser

Update: Added the Stanford NLP link for constituent parse trees in text form

I needed to visualize a sentence parse tree of the “constituent” variety (you know, one of those with S, NP, VP and all the goods) and googled “show constituent trees”, expecting to see good quality hits on search result page 1. Turns out, there are no good quality web tools out there. Sure, there are sites that will offer you to download “applications that run on any version of Vista”, but my Vista desktop was temporarily unavailable that day. Google’s Cloud NLP front page offers a nifty tool to parse and display trees, but those are of the “dependency” variety.

I dug a little and here is what I found. Here is a link to the Carnegie Mellon page that will return the constituency tree in text form (update: Stanford NLP has a similar feature at this location)

Take this text, replace round brackets with the square ones, and plug that text into the phpSyntaxTree tool, or any of its clones (e.g. this one).

Voila, here is your tree.

Leave a Reply