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.3 LC parsing<br />

(16) Left corner parsing is intermediate between top-down and bottom-up. Like LR, LC parsers adopt a<br />

(17)<br />

strategy <strong>of</strong> “listening first,” but after listening to a “left corner,” the rest <strong>of</strong> the expansi<strong>on</strong> is predicted.<br />

In a c<strong>on</strong>stituent formed by applying a rewrite rule A → BCD, the “left corner” is just the first c<strong>on</strong>stituent<br />

<strong>on</strong> the right side – B in the producti<strong>on</strong> A → BCD.<br />

LC recogniti<strong>on</strong> is defined this way: 24<br />

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

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

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

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

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

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

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

[shift]<br />

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

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

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

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

We want to allow the recognizer to handle empty producti<strong>on</strong>s, that is, producti<strong>on</strong>s (p:-q1,...,qn) ∈ Γ<br />

where n = 0. We do this by saying that is such producti<strong>on</strong>s, the “left corner” is the empty string. With<br />

this policy, the n = 0 instances <strong>of</strong> the lc rules can be written this way:<br />

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

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

[lc-e] if (p:-[]) ∈ Γ<br />

G, Γ ,S ⊢ (?-p, C) [lc-e-complete] if (p:-[]) ∈ Γ<br />

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

(18) Exercise: Use simple propositi<strong>on</strong>al reas<strong>on</strong>ing <strong>of</strong> the sort shown in (2) <strong>on</strong> page 75 and in (10) <strong>on</strong> page<br />

80 to show that the following inference step is sound. (tricky!)<br />

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

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

82<br />

[lc] if (p:-r,s) ∈ Γ

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

Saved successfully!

Ooh no, something went wrong!