Presentation is loading. Please wait.

Presentation is loading. Please wait.

Semantics Day 38 LING 681.02 Computational Linguistics Harry Howard Tulane University.

Similar presentations


Presentation on theme: "Semantics Day 38 LING 681.02 Computational Linguistics Harry Howard Tulane University."— Presentation transcript:

1 Semantics Day 38 LING 681.02 Computational Linguistics Harry Howard Tulane University

2 30-Nov-2009LING 681.02, Prof. Howard, Tulane University2 Course organization  http://www.tulane.edu/~howard/NLP/ http://www.tulane.edu/~howard/NLP/

3 Analyzing the meaning of sentences SLPP 10

4 30-Nov-2009LING 681.02, Prof. Howard, Tulane University4 The problem  Suppose we have a program that lets us type in a natural language question and gives us back the right answer:  Which country is Athens in?  Greece.  How hard is it to write such a program?

5 30-Nov-2009LING 681.02, Prof. Howard, Tulane University5 Querying a database CityCountryPopulation athensgreece1368 bangkokthailand1178 barcelonaspain1280 berlineast_germany3481 birminghamunited_kingdom1112

6 30-Nov-2009LING 681.02, Prof. Howard, Tulane University6 SQL  SQL (Structured Query Language) is a language designed for retrieving and managing data in relational databases.  For example, executing the query below will pull out the value 'greece':  SELECT Country FROM city_table WHERE City = 'athens'

7 30-Nov-2009LING 681.02, Prof. Howard, Tulane University7 Parsing into SQL  Can we get the same effect using English as our input to the query system?  The feature-based grammar formalism described in Chapter 9 makes it easy to translate from English to SQL.  Each phrase structure rule is supplemented with a recipe for constructing a value for the feature sem.  We use the string concatenation operation + to splice the values for the child constituents to make a value for the parent constituent.  S[SEM=(?np + WHERE + ?vp)] -> NP[SEM=?np] VP[SEM=?vp]

8 30-Nov-2009LING 681.02, Prof. Howard, Tulane University8 Philosophical problem  Understanding = looking up in a database?  What is a city?  What is a country?  What is a population?

9 30-Nov-2009LING 681.02, Prof. Howard, Tulane University9 Depiction of a situation in which Margrietje loves Brunoke

10 30-Nov-2009LING 681.02, Prof. Howard, Tulane University10 Conclusions  Two fundamental notions in semantics:  Declarative sentences are true or false in certain situations.  Definite noun phrases and proper nouns refer to things in the world.

11 30-Nov-2009LING 681.02, Prof. Howard, Tulane University11 Consistent vs. inconsistent 5a. Sylvania is to the north of Freedonia. 5b. Freedonia is a republic. 6a. The capital of Freedonia has a population of 9,000. 6b. No city in Freedonia has a population of 9,000. 7a. Sylvania is to the north of Freedonia. 7b. Freedonia is to the north of Sylvania.

12 30-Nov-2009LING 681.02, Prof. Howard, Tulane University12 Logic & NL  Broadly speaking, logic-based approaches to natural language semantics focus on those aspects of natural language which guide our judgments of consistency and inconsistency.  The syntax of a logical language is designed to make these features formally explicit.  As a result, determining properties like consistency can often be reduced to symbolic manipulation, that is, to a task that can be carried out by a computer.  In order to pursue this approach, we first want to develop a technique for representing a possible situation.

13 30-Nov-2009LING 681.02, Prof. Howard, Tulane University13 Model  We do this in terms of something that logicians call a model.  A model for a set W of sentences is a formal representation of a situation in which all the sentences in W are true.  The usual way of representing models involves set theory.  The domain D of discourse (all the entities we currently care about) is a set of individuals, while relations are treated as sets built up from D.

14 30-Nov-2009LING 681.02, Prof. Howard, Tulane University14 Example of a model  Our domain D will consist of three children, Stefan, Klaus and Evi = s, k and e.  D = {s, k, e}.  Expressions:  boy denotes the set consisting of Stefan and Klaus,  girl denotes the set consisting of Evi,  is running denotes the set consisting of Stefan and Evi.

15 30-Nov-2009LING 681.02, Prof. Howard, Tulane University15 Propositional logic Boolean OperatorTruth Conditions negation (it is not the case that...) -φ is true in siffφ is false in s conjunction (and)(φ & ψ) is true in siff φ is true in s and ψ is true in s disjunction (or)(φ | ψ) is true in siff φ is true in s or ψ is true in s implication (if..., then...) (φ -> ψ) is true in siff φ is false in s or ψ is true in s equivalence (if and only if) (φ ψ) is true in siff φ and ψ are both true in s or both false in s

16 30-Nov-2009LING 681.02, Prof. Howard, Tulane University16 Quiz grades Q5Q6Q7Q8Q9Q10 MIN 7.06.55.07.09.07.0 AVG 8.88.48.38.89.87.6 MAX 10.0 8.0

17 30-Nov-2009LING 681.02, Prof. Howard, Tulane University17 Missing quiz grades  Michael  Hunter  Leah  Caitlin  Alexander  Parisa  0  P3  P1, P5  P1  P5  P6, P9, P10

18 Next time No quiz NLPP §10 Analyzing the meaning of sentences


Download ppt "Semantics Day 38 LING 681.02 Computational Linguistics Harry Howard Tulane University."

Similar presentations


Ads by Google