Notes on computational linguistics.pdf - UCLA Department of ...
Notes on computational linguistics.pdf - UCLA Department of ...
Notes on computational linguistics.pdf - UCLA Department of ...
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 />
1 Setting the stage: logics, prolog, theories<br />
1.1 Summary<br />
(1) We will use the programming language prolog to describe our language processing methods.<br />
Prolog is a logic.<br />
(2) We propose, following M<strong>on</strong>tague and many others:<br />
Each human language is a logic.<br />
(3) We also propose:<br />
a. Standard sentence recognizers can be naturally represented as logics.<br />
(A “recognizer” is something that tells whether an input is a sentence or not.<br />
Abstracting away from the “c<strong>on</strong>trol” aspect <strong>of</strong> the problem, we see a recognizer as taking the input<br />
as an axiom, and deducing the category <strong>of</strong> the input (if any).<br />
We can implement the deducti<strong>on</strong> relati<strong>on</strong> in this logic in the logic <strong>of</strong> prolog. Then prolog acts as a<br />
“metalanguage” for calculating pro<strong>of</strong>s in the “object language” <strong>of</strong> the grammar.)<br />
b. Standard sentence parsers can be naturally represented as logics.<br />
(A “parser” is something that outputs a structural representati<strong>on</strong> for each input that is a sentence,<br />
and otherwise it tells us the input is not a sentence.<br />
As a logic, we see a parser as taking the input as an axiom from which it deduces the structure <strong>of</strong><br />
the input (if any).)<br />
All <strong>of</strong> the standard language processing methods can be properly understood from this very simple<br />
perspective. 1<br />
(4) What is a logic? A logic has three parts:<br />
i. a language (a set <strong>of</strong> expressi<strong>on</strong>s) that has<br />
ii. a “derives” relati<strong>on</strong> ⊢ defined for it (a syntactic relati<strong>on</strong> <strong>on</strong> expressi<strong>on</strong>s), and<br />
iii. a semantics: expressi<strong>on</strong>s <strong>of</strong> the language have meanings.<br />
a. The meaning <strong>of</strong> an expressi<strong>on</strong> is usually specified with a “model” that c<strong>on</strong>tains a semantic<br />
valuati<strong>on</strong> fucti<strong>on</strong> that is <strong>of</strong>ten written with double brackets. So instead <strong>of</strong> writing<br />
semantic_value(socrates_is_mortal)=true<br />
we write<br />
[[socrates_is_mortal]] = 1<br />
b. Once the meanings are given, we can usually define an “entails” relati<strong>on</strong> ⊨, sothatforanyset<br />
<strong>of</strong> expressi<strong>on</strong>s Γ and any expressi<strong>on</strong> A, Γ ⊨ A means that every model that makes all sentences<br />
in Γ true also makes A true.<br />
And we expect the derives relati<strong>on</strong> ⊢ should corresp<strong>on</strong>d to the ⊨ relati<strong>on</strong> in some way: for<br />
example, the logic might be sound and complete in the sense that, given any set <strong>of</strong> axioms Γ we<br />
might be able to derive all and <strong>on</strong>ly the expressi<strong>on</strong>s that are entailed by Γ .<br />
So a logic has three parts: it’s (i) a language, with (ii) a derives relati<strong>on</strong> ⊢, and with (iii) meanings.<br />
1 Cf. Shieber, Schabes, and Pereira (1993), Sikkel and Nijholt (1997). Recent work develops this perspective in the light <strong>of</strong> resource logical<br />
treatments <strong>of</strong> language (Moortgat, 1996, for example), and seems to be leading towards a deeper and more principled understanding<br />
<strong>of</strong> parsing and other linguistic processes. More <strong>on</strong> these ideas later.<br />
4