not just those patterns that are listed in book! Email Ani if cant access links on homework page
What is Syntax?
Study of structure of language
Specifically, goal is to relate surface form
(e.g., interface to phonological component) to semantics (e.g., interface to semantic component) Morphology, phonology, semantics farmed out (mainly), issue is word order and structure Representational device is tree structure
formal linguistics Major contribution: syntax is cognitive reality Humans able to learn languages quickly, but not all languages universal grammar is biological Goal of syntactic study: find universal principles and language-specific parameters Specific Chomskyan theories change regularly These ideas adopted by almost all contemporary syntactic theories
of a language; often good enough for NLP engineering work Explanatory: provide principles-andparameters style account of syntax of (preferably) several languages Prescriptive: prescriptive linguistics is an oxymoron
Structure in Strings
Some words: the a small nice big very boy girl sees likes Some good sentences: o the boy likes a girl o the small girl likes the big girl o a very small nice boy sees a very nice boy Some bad sentences: o *the boy the girl o *small boy likes nice girl Can we find subsequences of words
boy the
likes a
girl
Node Labels?
((the) boy) likes ((a) girl) Deliberately chose constituents so each one has
one non-bracketed word: the head Group words by distribution of constituents they head (part-of-speech, POS):
o
Noun (N), verb (V), adjective (Adj), adverb (Adv), determiner (Det)
Node Labels
(((the/Det) boy/N) likes/V ((a/Det) girl/N))
S NP DetP
likes
NP
boy
DetP
girl
the
distributionally defined classes Additional support for class definition of word class comes from morphology
Many subtypes: o eats/V eat/VB, eat/VBP, eats/VBZ, ate/VBD, eaten/VBN, eating/VBG, o Reflect morphological form & syntactic function
adjective or participle?
a
seen event, a rarely seen event, an unseen event, an event rarely seen in Idaho, *a rarely seen in Idaho event
child seat, *a very child seat, *this seat is child
o o
noun or adjective?
a
preposition or particle?
he
threw out the garbage, he threw the garbage out, he threw the garbage out the door, *he threw the garbage the door out
Part-of-Speech Tagging
Problem: assign POS tags to words in a
sentence
o
Part-of-Speech Tagging
Problem: assign POS tags to words in a
sentence
o
Part-of-Speech Tagging
Problem: assign POS tags to words in a
sentence
o
fruit/N flies/N like/V a/DET banana/N o fruit/N flies/V like/P a/DET banana/N
Part-of-Speech Tagging
Problem: assign POS tags to words in a
sentence
o
fruit/N flies/N like/V a/DET banana/N o fruit/N flies/V like/P a/DET banana/N
Part-of-Speech Tagging
Problem: assign POS tags to words in a
sentence
o
fruit/N flies/N like/V a/DET banana/N o fruit/N flies/V like/P a/DET banana/N
2nd example: o the/Det flies/N like/V a/Det banana/N Useful for parsing, but also partial
or transformation-based learning)
Role of corpus:
o o o o
No corpus (hand-written) No machine learning (hand-written) Unsupervised learning from raw data Supervised learning from annotated data
Methodological Points
When looking at problem in NLP, need to
against annotated naturally occurring corpus against hand-crafted corpus against human task performance
method do? Need to do topline: given evaluation, what is meaninful best result?
Methodological Points
When looking at problem in NLP, need to
against naturally occurring annotated corpus (POS tagging: 96%) against hand-crafted corpus against human task performance
method do? (POS tagging: 91%) Need to do topline: given evaluation, what is meaninful best result? (POS tagging: 97%)
tags (T), given the string of words (W) W = w1, w2, , wn T = t1, t2, , tn I.e., want argmaxT p(T | W) Problem: sparse data
estimation (next slide) But: need smoothing for unseen words Easy to determine the argmax (Viterbi algorithm in time linear in sentence length)