NLP
Introduction to NLP
Shallow parsing Useful for information extraction –noun phrases, verb phrases, locations, etc. Example –FASTUS (Appelt and Israel, 1997) Sample rules for noun groups: –NG Pronoun | Time-NP | Date-NP –NG (DETP) (Adjs) HdNns | DETP Ving HdNns –DETP DETP-CP | DETP-CP
Incident: Date 19 Apr 89 Incident: Location El Salvador: San Salvador (CITY) Incident: Type Bombing Perpetrator: Individual ID "urban guerrillas" Perpetrator: Organization ID "FMLN" Perpetrator: Organization Suspected or Accused by Authorities: "FMLN" Confidence Physical Target: Description "vehicle" Physical Target: Effect Some Damage: "vehicle" Human Target: Name "Roberto Garcia Alvarado" Human Target: Description "attorney general": "Roberto Garcia Alvarado" "driver" "bodyguards" Human Target: Effect Death: "Roberto Garcia Alvarado" No Injury: "driver" Injury: "bodyguards"
Example –The dogs bites (agreement) Example –many water (count/mass nouns) Idea –S NP VP (if the person of the NP is equal to the person of the VP)
Types of unification grammars –LFG, HPSG, FUG Handle agreement –e.g., number, gender, person Unification –Two constituents can be combined only if their features can unify
CAT NP PERSON 3 NUMBER SINGULAR CAT NP NUMBER SINGULAR PERSON 3 CAT NP NUMBER SINGULAR PERSON 3 U
CAT NP PERSON 3 NUMBER SINGULAR CAT NP PERSON 1 PERSON 3 U FAILURE
S NP VP {NP PERSON} = {VP PERSON} S Aux NP VP {Aux PERSON} = {NP PERSON} Verb bites {Verb PERSON} = 3 Verb bite {Verb PERSON} = 1
VP Verb {VP SUBCAT} = {Verb SUBCAT} {VP SUBCAT} = INTRANS VP Verb NP {VP SUBCAT} = {Verb SUBCAT} {VP SUBCAT} = TRANS VP Verb NP NP {VP SUBCAT} = {Verb SUBCAT} {VP SUBCAT} = DITRANS
NLP
Introduction to NLP
Tree Substitution Grammar (TSG) –Terminals generate entire tree fragments –TSG and CFG are formally equivalent Tree Adjoining Grammar (TAG) Combinatory Categorial Grammar (CCG)
Like TSG but allow adjunction It can generate languages like a n b n c n or ww (cross-serial dependencies): –e.g., Mary gave a book and a magazine to Chen and Mike, respectively. Expressive power –TAG is formally more powerful than CFG –TAG is less powerful than CSG Card game online! – – VP
Complex types –E.g., X/Y and X\Y –These take an argument of type Y and return an object of type X. –X/Y – means that Y should appear on the right –X\Y – means that Y should appear on the left Expressive power –CCGs can generate the language a n b n c n d n, n>0 Example from Jonathan Kummerfeld, Aleka Blackwell, and Patrick Littell
Introduction to NLP
Associate a semantic expression with each node Javier eats pizza V: λ x,y eat(x,y)N: pizza VP: λx eat(x,pizza)N: Javier S: eat(Javier, pizza)
Introduction to NLP
Twodee (by Jason Eisner) – One, Two, Tree (by Noah Smith, Kevin Gimbel, and Jason Eisner) – CCG (by Jonathan Kummerfeld, Aleka Blackwell, and Patrick Littell) – Combining categories in Tok Pisin (same authors) – Grammar Rules (Andrea Schalley and Pat Littell) – Sk8 Parser (Pat Littell) –
NLP