๐ณ Parsing
= checking if words or statements conform to the rules of a ๐ Formal grammar1
How?
โ use ๐ฐ Automata
Directions
- โฌ๏ธ Top-Down (= goal-driven)
- Start at S and progressively replace left-hand sides with right hand sides that match the string
- Problems:
- Left recursion (= NT at left edge of left-hand side)
- Ambiguity
- ๐ผ Bottom-Up (= data-driven)
- Start at word level, progressively replace strings that match right-hand sides with left-hand sides
- Problems when only using TD/BU parsing:
- Left recursion
- Ambiguity
- BU: backtracking โ lower โก๏ธ Efficiency
Strategies
Evaluation
- Correctness
- Completeness
- Efficiency
๐ Example result:
- Bracketing: [(S)[(NP) The children][(VP) ate[(NP) the cake]]]
- Trees: