DOC PREVIEW
MIT 6 863J - Semantic Interpretation with phrase structure grammars

This preview shows page 1-2-23-24 out of 24 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 24 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Massachusetts Institute of Technology6.863J/9.611J, Natural Language Processing, Spring, 2003Department of Electrical Engineering and Computer ScienceDepartment of Brain and Cognitive SciencesLaboratory 4: Semantic Interpretation with phrase structure grammarsHanded out: March 21, 2003 Due: April 9, 20031 Introduction: Goals of the LaboratoryAs we’ve seen in lecture, broadly speaking there are two distinct current approaches to semantic inter-pretation, each with its own characteristics and (perhaps) applications.Accordingly, In this laboratory you will design and write rules to extend a system that does semanticinterpretation. The system works in conjunction with a context-free parser and the same kind of atomicnonterminal phrase structure grammar you wrote in Laboratory 3. When you have completed theassignment, you should understand the principles of compositionality in semantics and how that relatesto syntactic analysis. And, you should know how to “put it all together”: you will have extended anEnglish interface to a simple database that will be able to either add facts to the database or retrieveanswers from it:athena>(top-level)shall i clear the database? (y or n) ysem-interpret>John saw Mary in the parkok.sem-interpret>where did john see maryin the park.sem-interpret>john gave fido to maryok.sem-interpret>who gave john fidoi don’t knowsem-interpret>who gave mary fidojohnsem-interpret>john saw fidook.sem-interpret>who did john seefido and maryIn general, this laboratory will involve a lot more reading and thinking than code writing. Most of therules for the system have been already written; you will simply be adding some new ones to handlenew sentence types, including some of those above (see section 3 below). For instance, the rules asgiven cannot handle John gave Fido to Mary or Who gave Mary Fido. Once you understand the basicidea behind the system, described in more detail in section 4, it is fairly straightforward to add newSemantic Interpretation with phrase structure grammars 2capabilities; in fact, if you examine the existing system you will find that many of its capabilities havenot been exploited in this laboratory. (See section 4 for more example traces.)As usual, a completed laboratory will consist of a description and explanation of what you did toget your new rules to work, along with traces demonstrating that your new rules operate as advertised,and can reproduce the input-output described below. As usual, send a pointer to your web write-up [email protected] particular, this laboratory is designed to get you to understand the following four assumptions aboutthe design of semantic interpreters, which have played a leading role in m any contemporary approachesto sentence meaning (the method adopted here is one due essentially to R. Montague, but the sameassumptions show up in many other systems):1. The rule-to-rule principle of semantic interpretation: for each syntactic rule in the grammar,there is one rule of semantic interpretation. In the laboratory system this is implemented directlyby pairing each context-free rule with a corresponding semantic rule (see section 4 below).2. Compositionality: The meaning of a phrase is a function of the (meaning of) its parts, andnothing more. Again, this is implemented transparently by defining the “meaning” of, say, anS in the rule S→ NP VP as the result of the composition of the “meaning” of the VP and the“meaning” of the NP. In particular, we take the VP’s meaning as s upplying a procedure that iscalled with the “meaning” of the NP as its argument. (You might want to think about what sortsof sentences do not obey this principle, a question we raise again below.)3. Truth-conditional meaning: the meaning of a sentence is equated with a set of conditionsthat make the sentence true or false. That is , it assumes that to know the meaning of a sentenceis to know the set of conditions or the way the world would have to be in order for the se ntence tobe true—a relation between language and the world. Hence this approach adopts what is calleda correspondence theory of truth. This is not a logically necessary component of a theory ofmeaning; there are alternatives such as the “mental picture” view or the “appropriate use” viewof sentence meaning.In our laboratory’s database world, the conditions for truth-correspondence are simple: the collec-tion of “true facts” is represented by a set of (rec ursive) templates that stand for “event structures”of the form,(EVENT :condition1 val1 :condition2 val2 ... :conditionN valN)where an EVENT is just the main verb of a sentence and a constructed template is true iffit matches some template in this set (using a definition of match that is defined in the filematch-allowing-extras). Note that we could also think of this as a thematic representationof the sentence.4. Model-theoretic semantics: the correlation between language and the world can be explicatedby building mathematical models of worlds using the machinery of s et theory, and mapping linguis-tic expressions into them. Typically, lexical items are associated with set-theoretic objects. Forexample, we might associate the nouns of a language (Mary, guy) with the subsets of individualsin our model world that contains Mary or guy, etc. Syntactic rules for building phrases are associ-ated with rules for combining set-theoretic objects. In our laboratory system, the rule-combiningfunctions are built by constructing lisp procedures (in effect, the lambda-calculus).It’s easy to see why these assumptions have proved so popular with a database-oriented query languagedesign: after all, we can view objects and relations in databases as just sets of objects. In this laboratory,it is interesting to see just how each of these assumptions gets cashed out.Semantic Interpretation with phrase structure grammars 32 Loading and running the systemFirst, attach 6.863 as usual, and then cd to the directory semantics under the course locker. AddAllegro common lisp via the following commands, and fire up Allegro common lisp via the commandmlisp as shown. We have indicated how to use mlisp by running it under xemacs — this is much easierto use than just the command-line interface one would get with mlisp alone.athena>add acl; mlisp-xemacs &If one runs just the command mlisp alone, you will get back just the following immediately below.Otherwise, with the mlisp-xemacs& command, an em acs window should


View Full Document

MIT 6 863J - Semantic Interpretation with phrase structure grammars

Documents in this Course
N-grams

N-grams

42 pages

Semantics

Semantics

75 pages

Semantics

Semantics

82 pages

Semantics

Semantics

64 pages

Load more
Download Semantic Interpretation with phrase structure grammars
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Semantic Interpretation with phrase structure grammars and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Semantic Interpretation with phrase structure grammars 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?