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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Stabler - Lx 185/209 2003<br />

(8) Then we can have a sessi<strong>on</strong> like this:<br />

1 ?- [provable].<br />

provable compiled, 0.00 sec, 1,432 bytes.<br />

Yes<br />

2 ?- (?˜ [p]).<br />

Yes<br />

3 ?- trace,(?˜ [p]).<br />

Call: ( 7) ?˜[p] ?<br />

Call: ( 8) infer([p], _L154) ?<br />

Call: ( 9) p:˜_L168 ?<br />

Exit: ( 9) p:˜[q, r] ?<br />

Call: ( 9) append([q, r], [], _L154) ?<br />

Call: ( 10) append([r], [], _G296) ?<br />

Call: ( 11) append([], [], _G299) ?<br />

Exit: ( 11) append([], [], []) ?<br />

Exit: ( 10) append([r], [], [r]) ?<br />

Exit: ( 9) append([q, r], [], [q, r]) ?<br />

Exit: ( 8) infer([p], [q, r]) ?<br />

Call: ( 8) ?˜[q, r] ?<br />

Call: ( 9) infer([q, r], _L165) ?<br />

Call: ( 10) q:˜_L179 ?<br />

Exit: ( 10) q:˜[] ?<br />

Call: ( 10) append([], [r], _L165) ?<br />

Exit: ( 10) append([], [r], [r]) ?<br />

Exit: ( 9) infer([q, r], [r]) ?<br />

Call: ( 9) ?˜[r] ?<br />

Call: ( 10) infer([r], _L176) ?<br />

Call: ( 11) r:˜_L190 ?<br />

Exit: ( 11) r:˜[] ?<br />

Call: ( 11) append([], [], _L176) ?<br />

Exit: ( 11) append([], [], []) ?<br />

Exit: ( 10) infer([r], []) ?<br />

Call: ( 10) ?˜[] ?<br />

Exit: ( 10) ?˜[] ?<br />

Exit: ( 9) ?˜[r] ?<br />

Exit: ( 8) ?˜[q, r] ?<br />

Exit: ( 7) ?˜[p] ?<br />

Yes<br />

2.2 A recogniti<strong>on</strong> predicate<br />

(9) Now, we want to model recognizing that a string can be derived from ip in a grammar as finding a pro<strong>of</strong><br />

<strong>of</strong> ip that uses the lexical axioms in that string exactly <strong>on</strong>ce each, in order.<br />

To do this, we will separate the lexical rules Σ from the rest <strong>of</strong> our theory Γ that includes the grammar<br />

rules. Σ is just the vocabulary <strong>of</strong> the grammar.<br />

(10) The following pro<strong>of</strong> system does what we want:<br />

G, Γ ,S ⊢ G [axiom] for definite clauses Γ ,goalG, S ⊆ Σ∗ G, Γ ,S ⊢ (?-p, C)<br />

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

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

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

28<br />

if (p:-q1,...,qn) ∈ Γ

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

Saved successfully!

Ooh no, something went wrong!