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 />

7.3 Earley recogniti<strong>on</strong> for CFGs<br />

(16) Earley (1968) showed, in effect, how to build an oracle into a chart c<strong>on</strong>structi<strong>on</strong> algorithm for any<br />

grammar G =〈Σ,N,→, s〉. With this strategy, the algorithm has the “prefix property,” which means<br />

that, processing a string from left to right, an ungrammatical prefix (i.e. a sequence <strong>of</strong> words that is not<br />

a prefix <strong>of</strong> any grammatical string) will be recognized at the the earliest possible point.<br />

For A, B, C ∈ N and some designated s ′ ∈ N, forS,T,U,V ∈ (N ∪ Σ) ∗ , and for input w1 ...wn ∈ Σn ,<br />

(0, 0) : s ′ → [] • s [axiom]<br />

(i, j) : A → S • wj+1T<br />

(i, j + 1) : A → Swj+1 • T<br />

(i, j) : A → S • BT<br />

(j, j) : B →•U<br />

(i, k) : A → S • BT (k,j) : B → U•<br />

(i, j) : A → SB • T<br />

[scan]<br />

[predict] if B:-U and (U = ɛ ∨ U = CV ∨ (U = wj+1V)<br />

[complete]<br />

The input is recognized iff (0,n): S ′ → S• is in the closure <strong>of</strong> the axioms (in this case, the set <strong>of</strong> axioms<br />

has just <strong>on</strong>e element) under these inference rules.<br />

Also note that in order to apply the scan rule, we need to be able to tell which word is in the j + 1’th<br />

positi<strong>on</strong>.<br />

113

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

Saved successfully!

Ooh no, something went wrong!