How a Parser Builds Structure
What it is. Computer models of parsing show why human understanding blends prediction from grammar with evidence from the words, step by step.
What it gives you. It connects psychology with how language software and AI read sentences.
Building trees
A top-down parser predicts structure from grammar rules before seeing words. It handles chains that end on the right well, but its memory load grows without limit for chains on the left.
A bottom-up parser builds from words upward. It handles left chains but loads memory with right chains. People find both kinds easy, so neither pure method matches human reading.
A left-corner parser predicts a structure once its first word appears. Its memory grows only with nesting, the one pattern people find hard. Modern language models also predict word by word.
What to know
- Top-down Prediction from grammar works for right chains but overloads memory on long left chains.
- Bottom-up Building from words handles left chains but overloads memory on long right chains.
- Left-corner Mixing prediction and evidence leaves only nesting costly, matching human difficulty.
From models to minds
- Grammar rules How phrases combine.
- Stack Unfinished pieces held in memory.
- Prediction Expecting the next structure.
- Probability Ranking likely structures.
- Surprisal Unexpected words take longer.
- Language models Predict the next word.
How to use it
- Read a left chain.
- Read a right chain.
- Read a nested one.
- Compare.
- Match to a model.
Good models of reading are hard only where people find reading hard.
Uses
- Readability Predict which sentences are hard.
- Software Grammar checkers and translation.
- Theory Testable models of the mind.
Left-corner parsing needs extra memory only for nested structures, exactly where human readers struggle.
Steps
- Read: my friend's brother's neighbour's dog barked.
- Then: the dog of the neighbour of the brother of my friend barked.
- Notice both stay easy.
- Any good model of reading must handle both kinds of chains.
Time. 10 minutes
Words to know
- Parser
- A system that builds sentence structure from words.
- Top-down
- Predicting structure from grammar before seeing words.
- Left-corner
- Predicting a structure only once its first part has been seen.
Summarized by Irina Medelye · IRA X LAB.
