20.07.2013 Views

Notes on computational linguistics.pdf - UCLA Department of ...

Notes on computational linguistics.pdf - UCLA Department of ...

Notes on computational linguistics.pdf - UCLA Department of ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Stabler - Lx 185/209 2003<br />

6 C<strong>on</strong>text free parsing: stack-based strategies<br />

6.1 LL parsing<br />

(1) Recall the definiti<strong>on</strong> <strong>of</strong> TD, which uses an “expansi<strong>on</strong>” rule that we will now call “LL,” because this<br />

method c<strong>on</strong>sumes the input string from Left to right, and it c<strong>on</strong>structs a Leftmost parse:<br />

G, Γ ,S ⊢ G [axiom] for definite clauses Γ ,goalG, S ⊆ Σ ∗<br />

G, Γ ,S ⊢ (?-p, C)<br />

G, Γ ,S ⊢ (?-q1,...,qn,C)<br />

G, Γ ,wS ⊢ (?-w,C) [scan]<br />

G, Γ ,S ⊢ (?-C)<br />

[ll] if (p:-q1,...,qn) ∈ Γ<br />

(2) As discussed in §1 <strong>on</strong> page 6, the rule ll is sound. To review that basic idea from a different perspective,<br />

notice, for example, that [ll] licenses inference steps like the following:<br />

G, Γ ,S ⊢ (?-p, q)<br />

G, Γ ,S ⊢ (?-r,s,q)<br />

[ll] if (p:-r,s) ∈ Γ<br />

In standard logic, this reas<strong>on</strong>ing might be represented this way:<br />

¬(p ∧ q) ∧ ((r ∧ s) → p)<br />

¬(r ∧ s ∧ q)<br />

Is this inference sound in the propositi<strong>on</strong>al calculus? Yes. This could be shown with truth tables, or<br />

we could, for example, use simple propositi<strong>on</strong>al reas<strong>on</strong>ing to deduce the c<strong>on</strong>clusi<strong>on</strong> from the premise<br />

using tautologies and modus p<strong>on</strong>ens.<br />

¬(p ∧ q) ∧ ((r ∧ s) → p)<br />

¬(A∧B)↔(¬A∨¬B)<br />

(¬p ∨¬q) ∧ ((r ∧ s) → p) (¬A∨B)↔(A→B)<br />

(p →¬q) ∧ ((r ∧ s) → p) (A∧B)↔(B∧A)<br />

((r ∧ s) → p) ∧ (p →¬q) ((A→B)∧(B→C))→(A→C)<br />

(r ∧ s) →¬q (A→B)↔(¬A∨B)<br />

¬(r ∧ s) ∨¬q ¬(A∧B)↔(¬A∨¬B)<br />

(¬r ∨¬s ∨¬q) (¬A∨¬B∨¬C)↔¬(A∧B∧C)<br />

¬(r ∧ s ∧ q)<br />

75

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!