Transcript Lecture 3

Introduction to Computational
Linguistics
Eleni Miltsakaki
AUTH
Fall 2005-Lecture 3
1
Review exercise 1
• Identify every major phrase in the following
sentences. Indicate the head and any
complements of the head.
– The man played his guitar in the street
– The people dissatisfied with the verdict left
the courtroom
2
Review exercise 2
• Classify the following verbs as being intransitive,
transitive or ditransitive. If the verb can be used
in more than one of these forms, give each
possible classification. Give an example
sentence to demonstrate your analysis.
–
–
–
–
Cry
Sing
Donate
put
3
Review exercise 3
• Parse the following sentences
– The old man put his violin in its case
– We had to call off the meeting until next
Monday
4
What makes a good grammar?
• Generality
– The range of sentences covered by the rules
• Selectivity
– The range of sentences that can be identified
as ungrammatical
• Understandability
– How simple the grammar is
5
Hint for making rules general
• Pay attention to constituents
• Diagnostic of constituency
– Conjunction
• Compare
–
–
–
–
–
–
I ate a hamburger and a hot dog
I will eat the hamburger and throw away the hot dog
I ate a hamburger and John ate a hot dog
*I ate a hamburger and on the stove
*I ate a cold hot dog and well burned
*I ate the hot dog
6
How the conjunction test can help
• Compare
– I looked up John’s number
– I looked up John’s chimney
– *I looked up John’s number and in his
cupboards
– I looked up John’s chimney and in his
cupboards
7
Parsing strategies
• Top-down
– A top down parser starts with S and attempts to rewrite it into a
sequence of terminal symbols that matches the words in the input
sentence
• Bottom-up
– You take a sequence of symbols and match it to the right hand side of
the rule, i.e. start with Det N and match it to get the NP
• Bottom-up chart parsing
– To avoid unnecessary repetition of the matching process you use a data
structure called chart that allows you to record partial results
We’ll see examples in J. Allen’s Natural Language Understanding, Chapter 3
8
What is generative capacity?
• The range of languages that a formalism can
describe
• Formal languages allow a precise (mathematic)
characterization
• Natural languages CANNOT be characterized
precisely enough to define generative capacity
9
Chomsky’s hierarchy of languages
• Regular
– S  a S1
• In the right-hand side of the rule you have one terminal followed by one nonterminal
• YOU CAN’T COUNT
• Context-free
– SaSb
– Number of a’s followed by equal number of b’s
– YOU CAN’T COUNT MORE THAN 2 ELEMENTS
• Context-sensitive
– aAb  aΨβ
a and b can be any sequence of symbols
• Type 0 grammars
– Allow any arbitrary rewrite rules
10
What’s next
• Lexicalized grammars
– Lexicalized Tree Adjoining Grammar (LTAG)
– Lexical Functional Grammar (LFG)
– Head Driven Phrase Structure Grammar (HPSG)
• Human parsing preferences
• Then move on to how to represent meaning
– Two basic logical languages
• Propositional logic
• Predicate logic
11