🌳 Syntax Tree Builder: Constituency Parsing & Structural Ambiguity
Interactive phrase-structure (constituency) parse-tree builder: pick a preset sentence, watch the S / NP / VP / PP tree grow step by step, and compare the two valid parses of a structurally ambiguous sentence side by side.
Pick a preset English or Ukrainian sentence and watch a phrase-structure (constituency) parse tree grow top-down from S through NP/VP/PP down to individual words, using simplified rewrite rules (S to NP VP, NP to Det N, VP to V NP PP, PP to P NP). A step slider and Play button animate the derivation level by level. The classic PP-attachment example 'I saw the man with the telescope' can be shown as two side-by-side trees at once, exposing the structural ambiguity between VP-attachment and NP-attachment readings.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install