Presentation is loading. Please wait.

Presentation is loading. Please wait.

22.05.2003CSA2050: DCG IV1 CSA2050: Definite Clause Grammars IV Handling Gaps II Semantic Issues.

Similar presentations


Presentation on theme: "22.05.2003CSA2050: DCG IV1 CSA2050: Definite Clause Grammars IV Handling Gaps II Semantic Issues."— Presentation transcript:

1 CSA2050: DCG IV1 CSA2050: Definite Clause Grammars IV Handling Gaps II Semantic Issues

2 CSA2050: DCG IV2 Resumé Relative clauses such as the book that Bertrand wrote are derived from a corresponding sentence Bertrand wrote the book [that] Bertrand wrote the book

3 CSA2050: DCG IV3 Deriving the DCG We can write down the parts of speech The book [that] Bertrand wrote D N RELPRON N V np(gap) … and try to build the grammar rules. A naïve approach is to derive DCG rule directly NP --> D N RELPRON N V np(gap) A better approach is NP --> D N optrel np(gap)

4 CSA2050: DCG IV4 Rules for optrel (optional relative clause) optrel --> [ ]. An optrel is optional. optrel --> relpron, s(gap(np)). An optrel can be "that" followed by a sentence with a missing np object Next we look at rule for producing s with and without gaps, i.e. s(nogap) and s(gap(np)).

5 CSA2050: DCG IV5 Rules for S s --> s(nogap) A sentence can either have no gap s --> s(gap(np)) or it can have a gap(np) feature. Where does S get the gap feature from? s(G) --> np(nogap), vp(G). It comes from the VP. Note that the subject NP cannot have a gap (i.e. be empty).

6 CSA2050: DCG IV6 Rules for VP vp(G) --> v, np(G). In the case of a transitive verb the gap feature is inherited from the object NP. vp(nogap) --> v. In the case of an intransitive verb, the VP has no gap.

7 CSA2050: DCG IV7 Rules for NP np(nogap) --> det, n, optrel. Normal NP case np(nogap) --> n. This covers case of plurals or proper nouns. np(gap(np)) --> [ ]. The gap case – no lexical material appears on the surface

8 CSA2050: DCG IV8 Grammar and Lexicon % grammar s --> s(nogap). s --> s(gap(np)). s(G) --> np(nogap), vp(G). np(nogap) --> det,n,optrel np(nogap) --> n. np(gap(np)) --> [ ]. optrel --> [ ]. optrel --> rel, s(gap(np)). optrel --> rel, vp(nogap). vp(G) --> v, np(G). vp(nogap) --> v. % lexicon n --> [john]. n --> [bertrand]. n --> [program]. rel --> [that]. det --> [the]. v --> [halts]. v --> [wrote].

9 CSA2050: DCG IV9 Call: (6) s(_G395, [john, wrote], []) ? creep Call: (7) np(nogap, [john, wrote], _G459) ? creep Call: (8) det([john, wrote], _G458) ? creep Fail: (8) det([john, wrote], _G458) ? creep Redo: (7) np(nogap, [john, wrote], _G459) ? creep Call: (8) n([john, wrote], _G458) ? creep Exit: (8) n([john, wrote], [wrote]) ? creep Exit: (7) np(nogap, [john, wrote], [wrote]) ? creep Call: (7) vp(_G395, [wrote], []) ? creep Call: (8) v([wrote], _G458) ? creep Exit: (8) v([wrote], []) ? creep Call: (8) np(_G395, [], []) ? creep Call: (9) det([], _G458) ? creep Fail: (9) det([], _G458) ? creep Redo: (8) np(_G395, [], []) ? creep Call: (9) n([], []) ? creep Fail: (9) n([], []) ? creep Redo: (8) np(_G395, [], []) ? creep Exit: (8) np(gap(np), [], []) ? creep Exit: (7) vp(gap(np), [wrote], []) ? creep Exit: (6) s(gap(np), [john, wrote], []) ? creep X=gap(np)

10 CSA2050: DCG IV10 Handling NLP Semantics In order handle semantics of NL sentences we have to do at least the following: –Decide what is meant by semantics. –Create a suitable representation to encode the semantics. –Figure out how to compute the semantic representation of sentences –Link this computation to the to the grammar and lexicon.

11 CSA2050: DCG IV11 Remarks on DCGs Simple tool for encoding CFG Arguments, variables and arbitrary progams take it beyond CF power, but can get clumsy and yield unreadable grammars Reasonable for linguistic applications, but cannot handle left recursion. Compared to standard PLs, you get quite far quite fast.

12 CSA2050: DCG IV12 Semantics: Semantics is the study of the meaning of words, phrases, and sentences in language. Semantics explores the minimum of knowledge about a linguistic sign or combinations of signs such that the expression can convey a specific communicative content. [Olsen et. Al berlin.de/angl/ling_pages/semantics.html]

13 CSA2050: DCG IV13 Semantic Theories Cognitive Semantics (Rosch 1973) –word/concept oriented –prototype theory: meanings are identified, often pictorially, by characteristic instances of whatever class of objects, etc. a word denotes Truth Conditional Semantics (Hume, Russell, Carnap, Frege…)

14 CSA2050: DCG IV14 Truth Conditional Semantics Basic idea behind TCS is that to know the meaning of a sentence is know exactly the conditions under which it is true. So for example you know the meaning of "Gianni ate fish yesterday" if you know exactly how to apply it to the real world and decide whether it is true or false. On this view, the task of semantic theory is to define the truth conditions of sentences.

15 CSA2050: DCG IV15 Expressing Truth Conditions If semantics identifies truth conditions, how can they be expressed: i.e, how are they written down? Logical form (LF) is the notation we use formalism we use to write down the truth conditions. One example of logical form is first order logic (FOL)

16 CSA2050: DCG IV16 wordPOSLogicRepresentation Mikeproper nounindividual constant mike cowcommon noun1 place predicate cow(x) redadjective1 place predicate red(x) big red caradj/noun1 place predicate big(x) & red(x) & car(x) sleepsintrans verb1 place predicate sleep (x) kickstrans. verb2 place predicate kick(x,,y) givesditrans verb3 place predgive(x,y,z)

17 CSA2050: DCG IV17 Logical Forms of Sentences John kicked Fido: kick(john,fido) Every student wrote a program all(x,student(x) => exist(y, program(y)& write(x,y))). exist(y, program(y) all(x,student(x) => write(x,y))). Ambiguity Relation between semantics of sentence and subphrases

18 CSA2050: DCG IV18 Compositional Semantics Frege's Principle of Compositionality The semantics of the whole sentence can be computed from the semantics of the subphrases, i.e. Given the syntactic rule X  Y Z. Suppose [Y], [Z] are the LFs of Y, and Z respectively. Then [X] =  ([Y],[Z]) where  is some function for semantic combination

19 CSA2050: DCG IV19 Richard Montague: Rule to Rule Hypothesis Each context free syntax rules is associated with a semantic rule that describes how the LF of the LHS category is composed from the LF of its subconstituents 1:1 corrspondence between syntax and semantics. Can and does lead to difficulties. Functional composition proposed as the mechanism for descibing the composition. Lambda calculus.

20 CSA2050: DCG IV20 Sentence Rule Syntactic Rule: S  NP VP Semantic Rule: [S] = [VP]([NP]) i.e. the LF of S is obtained by "applying" the LF of VP to the LF of NP. For this to be possible [VP] must be a function, and [NP] the argument to the function.

21 CSA2050: DCG IV21 S write(bertrand,principia) NP bertand VP y.write(y,principia) V x. y.write(y,x) NP principia bertrand writes principia Parse Tree with Logical Forms

22 CSA2050: DCG IV22 Problems Truth Conditional Semantics problems: not all sentences have a truth value. questions; orders; speech acts. Determiners and Quantification: exact truth conditions are hard to formulate you can fool most of the people most of the time. Lambda calculus is too powerful.


Download ppt "22.05.2003CSA2050: DCG IV1 CSA2050: Definite Clause Grammars IV Handling Gaps II Semantic Issues."

Similar presentations


Ads by Google