Presentation is loading. Please wait.

Presentation is loading. Please wait.

LING 581: Advanced Computational Linguistics Lecture Notes March 23rd.

Similar presentations


Presentation on theme: "LING 581: Advanced Computational Linguistics Lecture Notes March 23rd."— Presentation transcript:

1 LING 581: Advanced Computational Linguistics Lecture Notes March 23rd

2 Administrivia Welcome back! Task 3 is due

3 Homework Task Treebank There are VPs in the Wall Street Journal section Q: what kinds of verb frames are attested? EVCA Project Pick verbs that exist in EVCA (evca93.index) and also in the PTB Produce a report that compares EVCA with what is present in the corpus

4 Minimalist Syntax From stochastic parsing to the (near) latest in syntax Paper: – Derivation by Phase (DbP) (Chomsky) – (manuscript 1999, published 2001) 4 files on usb drive – Reading Homework over Spring Break –dpb.pdf (the unlocked published version) you may find the following notes very useful –JU_DbP_1.pdf (DbyP with inline notes from Juan Uriagereka) –JU_DbP_2.pdf (part 2) –Yoon_DbP.pdf (notes from James Yoon, UIUC)

5 Software Code – GUI: (Tcl/Tk side)treeserver.tcl – GUI: (Prolog side) prolog_client.pl – Grammar: (GUI version) grammar8.pl What you need – Tcl/Tk wish interpreter – PrologSWI Prolog – Command line(some) shell

6 Processes Process #1 run treeserver.tcl under wish interpreter – example: bash-3.2$ wish treeserver.tcl Connection from channel closed Process #2 run SWI-Prolog – example: bash-3.2$ swipl Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 5.8.3) ?- [prolog_client, grammar8]. % library(error) compiled into error 0.00 sec, 17,480 bytes % library(lists) compiled into lists 0.01 sec, 39,256 bytes % library(shlib) compiled into shlib 0.01 sec, 59,552 bytes % library(unix) compiled into unix 0.01 sec, 65,968 bytes % prolog_client compiled 0.01 sec, 134,368 bytes % grammar8 compiled 0.00 sec, 46,816 bytes true. chatter: uses sockets to communicate with Prolog side

7 Example 1 John likes Mary Run in SWI Prolog window ?- parse([john,like,mary]). Probe [v*] agrees with goal [n mary] Probe [t] agrees with goal [n john] [c[c][t[n john][t[t][v[n john][v[v*][V[V like][n mary]]]]]]] true ; false. Click to see derivation steps Tree display zoom slider Agree(P,G) computations displayed Agree(P,G) computations displayed terminal parse output: same as last step of GUI output

8 Current Limitations John likes Mary Run in SWI Prolog window ?- parse([john,like,mary]). Probe [v*] agrees with goal [n mary] Probe [t] agrees with goal [n john] [c[c][t[n john][t[t][v[n john][v[v*][V[V like][n mary]]]]]]] true ; false. Implementation limitations: 1.No Spell-Out implemented (just narrow syntax) T + v* f(phi,3-sg-f) + V ( like ) = likes 2.No head movement/affix- hopping implemented (part of Spell-Out) input: awarded -> [ed,award] 3.No undo of displacement implemented (displacement is computed from base position) input: [be,ed,award,several,prizes] Several prizes are awarded Note: not inflected Spell-Out: implementation of simple inflectional morphology would be straightforward Parsing from final landing sites would require an additional computational mechanism Spell-Out: implementation of simple inflectional morphology would be straightforward Parsing from final landing sites would require an additional computational mechanism

9 Interacting with the Grammar parse(List). – Prolog List = input sentence 1.Opens a socket connection to display server 2.Calls the definite clause grammar (DCG) rule for a clause: c(Parse,List,[]). 3.Closes socket connection resetDisplay. 1.Opens a socket connection to display server 2.Clears the display history for a derivation 3.Closes socket connection Components of parse(List) can be called separately –open_connection. –close_connection. –X(Parse,List,[]). X = grammar rule name – useful when other DCG rules need to be called directly Implementation (prolog_client.pl) parse(List) :- open_connection, c(Parse,List,[]), format('~p~n',[Parse]), close_connection. use after each derivation

10 Four Examples

11 Example 1 There are likely to be awarded several prizes (note input lexme order) ?- parse([be,likely,there,be,ed,award,s everal,prizes]). Probe [a!case ed] agrees with goal [n!case several prizes] Probe [tdef] agrees with goal [n!case several prizes] Probe [t!phi] agrees with goal [n!phi there] Probe [t] agrees with goal [n several prizes] [c[c][t[n there][t[t][v[v be][a[a likely][t[n there][t[tdef][v[v be][a[a ed][V[V award][n several prizes]]]]]]]]]]] true ; false.

12 Example 2 Several prizes are likely to be awarded (note input lexeme order) ?- resetDisplay. true. ?- parse([be,likely,be,ed,award,several, prizes]). Probe [a!case ed] agrees with goal [n!case several prizes] Probe [tdef] agrees with goal [n!case several prizes] Probe [t] agrees with goal [n several prizes] [c[c][t[n several prizes][t[t][v[v be][a[a likely][t[n several prizes][t[tdef][v[v be][a[a ed][V[V award][n several prizes]]]]]]]]]]] true ; false.

13 Example 3 we expect there to be awarded several prizes (note input lexeme order) ?- parse([we,expect,there,be,ed,award,several,prizes]). Probe [a!case ed] agrees with goal [n!case several prizes] Probe [tdef] agrees with goal [n!case several prizes] Probe [v*!phi] agrees with goal [n!phi there] Probe [v*] agrees with goal [n several prizes] Probe [t] agrees with goal [n we] [c[c][t[n we][t[t][v[n we][v[v*][V[V expect][t[n there][t[tdef][v[v be][a[a ed][V[V award][n several prizes]]]]]]]]]]]] true ; false.

14 Example 4 we expect several prizes to be awarded (note input lexeme order) ?- parse([we,expect,be,ed,award,sever al,prizes]). Probe [a!case ed] agrees with goal [n!case several prizes] Probe [tdef] agrees with goal [n!case several prizes] Probe [v*] agrees with goal [n several prizes] Probe [t] agrees with goal [n we] [c[c][t[n we][t[t][v[n we][v[v*][V[V expect][t[n several prizes][t[tdef][v[v be][a[a ed][V[V award][n several prizes]]]]]]]]]]]] true ; false.

15 Basic Computation start with lexical array of syntactic objects: {α,..,ω} Merge “an indispensible operation of a recursive system” (external) – two syntactic objects (SOs): α, β – create merged SO: {α, β} – label({α, β})=label(α) or label(β) (internal), implements Displacement – SOs: α and γ, γ properly contained in α – create SO: {α, γ} – label({α, γ})=label(α) Agree – active probe SO: α (active = uninterpretable features), goal SO: β – match and delete uninterpretable features of probe and goal Convergent derivation: uninterpretable features must be eliminated copy v*: φ, acc N: φ, Case

16 Basic Implementation (1) Definite clause grammar (DCG) (simplified) V([ V V N]) --> V(V), n(N). V([ V Verb]) --> [Verb]. features (V)features (N) – phonetic matrix: f(pmatrix,like) f(pmatrix,john) – (takes an) argument: f(arg,+)f(arg,+) – uninterpretable Case: f(case,_) % (big V) verb classes bV(n('V',[],[V,N])) --> bV0(V), n0(N), {theta(V),theta(N)} report 'theta merge V & N'. bV0(n('V',[f(pmatrix,Verb),f(arg,+)],[])) --> [Verb], {transitive(Verb)}. bV0(n('V',[f(pmatrix,Verb),f(arg,+)],[])) --> [Verb], {unaccusative(Verb)}. bV0(n('V',[f(pmatrix,Verb)],[])) --> [Verb], {unergative(Verb)}. transitive(like). transitive(expect). unergative(run).unaccusative(arrive). n0(n(n,[f(pmatrix,BNoun)|Fs],[])) --> [BNoun], {bareNoun(BNoun,Fs)}. bareNoun(john,[f(phi,3-sg-m),f(case,_),f(arg,+)]). % (big V) verb classes bV(n('V',[],[V,N])) --> bV0(V), n0(N), {theta(V),theta(N)} report 'theta merge V & N'. bV0(n('V',[f(pmatrix,Verb),f(arg,+)],[])) --> [Verb], {transitive(Verb)}. bV0(n('V',[f(pmatrix,Verb),f(arg,+)],[])) --> [Verb], {unaccusative(Verb)}. bV0(n('V',[f(pmatrix,Verb)],[])) --> [Verb], {unergative(Verb)}. transitive(like). transitive(expect). unergative(run).unaccusative(arrive). n0(n(n,[f(pmatrix,BNoun)|Fs],[])) --> [BNoun], {bareNoun(BNoun,Fs)}. bareNoun(john,[f(phi,3-sg-m),f(case,_),f(arg,+)]). variable

17 Basic Implementation (2) Definite clause grammar (DCG) (simplified) v([ v N v]) --> n(N), v(v). v([ v v V]) --> v(v), V(V). v( [ v* ]) --> []. – features (v*) uninterpretable φ-features: f(phi,_-_-_) can value accusative Case: f(case,acc) % v*/vP v(n(v,[],[N,V])) --> n0(N), {theta(N)}, v1(V) report 'theta merge N & v'. v1(n(v,[],[V,BV])) --> v0(V), bV(BV), {goals(BV,Goals),agree(V,Goals)} report 'merge v & V'. v0(n('v*',[f(phi,_-_-_),f(case,acc)],[])) --> []. % v*/vP v(n(v,[],[N,V])) --> n0(N), {theta(N)}, v1(V) report 'theta merge N & v'. v1(n(v,[],[V,BV])) --> v0(V), bV(BV), {goals(BV,Goals),agree(V,Goals)} report 'merge v & V'. v0(n('v*',[f(phi,_-_-_),f(case,acc)],[])) --> []. triggers Agree f(phi,_-_-_) f(case,acc) f(phi,3-sg-f) f(case,_)

18 Basic Implementation (2) f(phi,_-_-_) f(case,acc) f(phi,3-sg-f) f(case,_) Agree(v*,N) Operation: unification (Robinson, 1965) (match and instantiate unvalued features) ProbeGoal f(phi,_-_-_) f(phi,3-sg-f) f(case,acc)f(case,_) Operation: unification (Robinson, 1965) (match and instantiate unvalued features) ProbeGoal f(phi,_-_-_) f(phi,3-sg-f) f(case,acc)f(case,_) Uninterpretable/unvalued features (represented by variables) are eliminated

19 Basic Implementation (3) Definite clause grammar (DCG) T([ T N v]) --> n(N), v(v). T([ T N v]) --> v(v), {N a goal} T( [ T ]) --> []. – features (φ-complete T) uninterpretable φ-features: f(phi,_-_-_) can value nominative Case: f(case,nom) EPP t(n(t,[],[N,T])) --> n0(N), {nonarg(N)}, t1(T,_) report 'merge expl & T'. % EPP: (1) merge t(n(t,[],[Goal,T])) --> t1(T,Goal) report 'move to spec-T’. % EPP: (2) move with maximize matching t1(n(t,[],[T,V]),G) --> t0(T), v(V), {goals(V,Goals),agree(T,Goals), Goals = [G|_]} report 'merge T & v’. t0(n(t,[f(phi,_-_-_),f(case,nom)],[])) --> []. t(n(t,[],[N,T])) --> n0(N), {nonarg(N)}, t1(T,_) report 'merge expl & T'. % EPP: (1) merge t(n(t,[],[Goal,T])) --> t1(T,Goal) report 'move to spec-T’. % EPP: (2) move with maximize matching t1(n(t,[],[T,V]),G) --> t0(T), v(V), {goals(V,Goals),agree(T,Goals), Goals = [G|_]} report 'merge T & v’. t0(n(t,[f(phi,_-_-_),f(case,nom)],[])) --> []. triggers Agree defective T φ-incomplete e.g. infinitivals defective T φ-incomplete e.g. infinitivals ╳

20 Putting it all together (1)

21 Putting it all together (2)

22 Putting it all together (3)

23 Putting it all together (4)

24 Putting it all together (5) (EPP requirement)

25 Putting it all together (6) Operation: Spell-Out (not currently implemented) “John likes Mary” only one copy of John is pronounced bundle T + v* f(phi,3-sg-f) + V ( like ) = likes Operation: Spell-Out (not currently implemented) “John likes Mary” only one copy of John is pronounced bundle T + v* f(phi,3-sg-f) + V ( like ) = likes

26 A Worked Example Consider the derivation of several prizes are likely to be awarded (= 4(b)(ii)) awarded = award + -ed (adjectival participle) ?- parse([be,likely,be,ed,award,several,prizes]). Probe [a!case ed] agrees with goal [n!case several prizes] Probe [tdef] agrees with goal [n!case several prizes] Probe [t] agrees with goal [n several prizes] [c[c][t[n several prizes][t[t][v[v be][a[a likely][t[n several prizes][t[tdef][v[v be][a[a ed][V[V award][n several prizes]]]]]]]]]]] ?- parse([be,likely,be,ed,award,several,prizes]). Probe [a!case ed] agrees with goal [n!case several prizes] Probe [tdef] agrees with goal [n!case several prizes] Probe [t] agrees with goal [n several prizes] [c[c][t[n several prizes][t[t][v[v be][a[a likely][t[n several prizes][t[tdef][v[v be][a[a ed][V[V award][n several prizes]]]]]]]]]]] ϕ - incomplete: uninterpretable Number and Gender only uninterpretable Case morphologically unrealized in English (cf. Icelandic) -ed Agree(a,N) -ed: φ, Case N: φ, Case

27 A Worked Example

28 Agree(a,N) -ed: φ, Case N: φ, Case Agree(a,N) -ed: φ, Case N: φ, Case Notation: !case means feature is unvalued

29 A Worked Example Agree(Tdef,N) Tdef: φ N: φ, Case Agree(Tdef,N) Tdef: φ N: φ, Case

30 A Worked Example (several prizes raises to subject position of embedded infinitival)

31 A Worked Example Agree(T,N) T: φ, Nominative N: φ, Case Agree(T,N) T: φ, Nominative N: φ, Case Case for –ed also valued because of earlier unification step Agree(a,N) -ed: φ, Case N: φ, Case Case for –ed also valued because of earlier unification step Agree(a,N) -ed: φ, Case N: φ, Case Matrix T Unification presents an possible advantage: computation is more local

32 Probing with multiple goals (Chomsky 2001) compare with…

33 A Worked Example Spell-Out Several prizes are likely to be awarded

34 Another Example ?- parse([be,likely,there,be,ed,award,several,prizes]). Probe [a!case ed] agrees with goal [n!case several prizes] Probe [tdef] agrees with goal [n!case several prizes] Probe [t!phi] agrees with goal [n!phi there] Probe [t] agrees with goal [n several prizes] [c[c][t[n there][t[t][v[v be][a[a likely][t[n there][t[tdef][v[v be][a[a ed][V[V award][n several prizes]]]]]]]]]]] ?- parse([be,likely,there,be,ed,award,several,prizes]). Probe [a!case ed] agrees with goal [n!case several prizes] Probe [tdef] agrees with goal [n!case several prizes] Probe [t!phi] agrees with goal [n!phi there] Probe [t] agrees with goal [n several prizes] [c[c][t[n there][t[t][v[v be][a[a likely][t[n there][t[tdef][v[v be][a[a ed][V[V award][n several prizes]]]]]]]]]]] Consider also the derivation of There are likely to be awarded several prizes(= 4(b)(i)) pleonastic there: φ-incomplete (Person only) Agree(a,N) -ed: φ, Case N: φ, Case Agree(T,N) T: φ N: φ

35 Another Example Agree(a,N) -ed: φ, Case N: φ, Case Agree(a,N) -ed: φ, Case N: φ, Case

36 Examples (Chomsky 2001) Examples (ECM): – (i) we expect there to be awarded several prizes – (ii) we expect several prizes to be awarded Examples (ECM): – (i) we expect there to be awarded several prizes – (ii) we expect several prizes to be awarded

37 Example: we expect several prizes to be awarded Prior Unification : locality advantage Prior Unification : locality advantage Case

38 Example: we expect several prizes to be awarded Spell-Out We expect several prizes to be awarded


Download ppt "LING 581: Advanced Computational Linguistics Lecture Notes March 23rd."

Similar presentations


Ads by Google