semantics day 38 ling 681.02 computational linguistics harry howard tulane university
TRANSCRIPT
SemanticsDay 38
LING 681.02Computational Linguistics
Harry HowardTulane University
30-Nov-2009 LING 681.02, Prof. Howard, Tulane University
2
Course organization
http://www.tulane.edu/~howard/NLP/
Analyzing the meaning of sentences
SLPP 10
30-Nov-2009 LING 681.02, Prof. Howard, Tulane University
4
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?
30-Nov-2009 LING 681.02, Prof. Howard, Tulane University
5
Querying a database
City Country Population
athens greece 1368
bangkok thailand 1178
barcelona spain 1280
berlin east_germany 3481
birmingham united_kingdom 1112
30-Nov-2009 LING 681.02, Prof. Howard, Tulane University
6
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'
30-Nov-2009 LING 681.02, Prof. Howard, Tulane University
7
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]
30-Nov-2009 LING 681.02, Prof. Howard, Tulane University
8
Philosophical problem
Understanding = looking up in a database?What is a city?What is a country?What is a population?
30-Nov-2009 LING 681.02, Prof. Howard, Tulane University
9
Depiction of a situation in which Margrietje loves Brunoke
30-Nov-2009 LING 681.02, Prof. Howard, Tulane University
10
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.
30-Nov-2009 LING 681.02, Prof. Howard, Tulane University
11
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.
30-Nov-2009 LING 681.02, Prof. Howard, Tulane University
12
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.
30-Nov-2009 LING 681.02, Prof. Howard, Tulane University
13
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.
30-Nov-2009 LING 681.02, Prof. Howard, Tulane University
14
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.
30-Nov-2009 LING 681.02, Prof. Howard, Tulane University
15
Propositional logic
Boolean Operator Truth Conditions
negation (it is not the case that ...)
-φ is true in s iff φ is false in s
conjunction (and) (φ & ψ) is true in s iffφ is true in s and ψ is true in s
disjunction (or) (φ | ψ) is true in s iffφ is true in s or ψ is true in s
implication (if ..., then ...)
(φ -> ψ) is true in s iffφ is false in s or ψ is true in s
equivalence (if and only if)
(φ <-> ψ) is true in s iffφ and ψ are both true in s or both false in s
30-Nov-2009 LING 681.02, Prof. Howard, Tulane University
16
Quiz grades
Q5 Q6 Q7 Q8 Q9 Q10
MIN 7.0 6.5 5.0 7.0 9.0 7.0
AVG 8.8 8.4 8.3 8.8 9.8 7.6
MAX 10.0 10.0 10.0 10.0 10.0 8.0
30-Nov-2009 LING 681.02, Prof. Howard, Tulane University
17
Missing quiz grades
MichaelHunterLeahCaitlinAlexanderParisa
0P3P1, P5P1P5P6, P9, P10
Next time
No quiz
NLPP §10
Analyzing the meaning of sentences
Structured programming 4 Day 34 LING 681.02 Computational Linguistics Harry Howard Tulane University
UNICODE DAY 12 - 9/22/14 LING 3820 & 6820 Natural Language Processing Harry Howard Tulane University