🧪 Linguistics Computational Linguistics Simulation
Watch the CYK dynamic-programming algorithm fill a triangular parse table bottom-up, turning a sentence's tokens into nonterminal categories and revealing genuine syntactic ambiguity like 'I saw the man with the telescope' as two distinct parses.
This simulation introduces computational linguistics through one of its foundational algorithms: Cocke-Younger-Kasami (CYK) parsing. A small Chomsky-Normal-Form grammar tokenizes and parses toy English sentences by filling a triangular dynamic-programming table one cell at a time — each cell rendered as a 3D tower whose height and color report which grammatical categories (S, VP, NP, PP, and lexical parts of speech) can be derived over that word span. Step through the fill order manually or let it play automatically, then compare an unambiguous sentence against the classic "I saw the man with the telescope" attachment ambiguity, where the algorithm discovers two independent derivations of the same string.
This simulation introduces users to computational linguistics by demonstrating how algorithms are used to analyze and process language data. It explores concepts like parsing, tokenization, and basic natural language processing techniques.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install