ling c sc psyc 438 538
Download
Skip this Video
Download Presentation
LING/C SC/PSYC 438/538

Loading in 2 Seconds...

play fullscreen
1 / 19

LING/C SC/PSYC 438/538 - PowerPoint PPT Presentation


  • 100 Views
  • Uploaded on

LING/C SC/PSYC 438/538. Lecture 14 Sandiway Fong. Administrivia. Midterm This Wednesday A bit like doing a homework in real time Bring your laptop Exam slides available at class time Answer as many questions as you can and email me your answers at 7pm

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' LING/C SC/PSYC 438/538' - harry


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
ling c sc psyc 438 538

LING/C SC/PSYC 438/538

Lecture 14

Sandiway Fong

administrivia
Administrivia
  • Midterm
    • This Wednesday
    • A bit like doing a homework in real time
    • Bring your laptop
    • Exam slides available at class time
    • Answer as many questions as you can and email me your answers at 7pm
    • Tested on material covered up to and including today
    • If you are unable to attend class, you must make alternative arrangements with me
  • Next week (2nd half of the course begins)
    • Morphology: reading Chapter 3
administrivia1
Administrivia
  • Guest Lectures
    • Dr. Jerry Ball, Army Research Lab, Mesa AZ
    • October 25th and November 1st
    • Abstract on next slide…
administrivia2
Administrivia

A Pseudo-Deterministic Model of Human Language Processing with a Computational Implementation

  • A cognitively plausible and functional model of human language processing (HLP) will be presented which combines an incremental, serial, pseudo-deterministic processing mechanism and a non-monotonic mechanism of context accommodation, with an interactive, probabilistic mechanism that uses all available information in parallel to select the best choice at each choice point. The results of processing are linguistic representations that combine structural and functional information that is largely consistent with the “Simpler Syntax” of Culicover & Jackendoff, as well as Huddleston & Pullum’s comprehensive grammar of English.
  • The first lecture will focus on the theoretical underpinnings of the system of linguistic representation and the pseudo-deterministic processing mechanism.
  • The second lecture will focus on the computational implementation and will go into more detail on the linguistic representations that are generated by the model. The second lecture will include a demo of the model.

References

  • Ball, J., Freiman, M., Rodgers, S. & Myers, C. (2010). Toward a Functional Model of Human Language Processing. Proceedings of the 32nd Annual Meeting of the Cognitive Science Society.
  • Culicover, P. (2009) Natural Language Syntax. Oxford.
  • Culicover, P. & Jackendoff, J. (2005). Simpler Syntax. Oxford.
  • Huddleston, R. & Pullum, G. (2002). The Cambridge Grammar of the English Language. Cambridge.
extra argument parse tree
Recovering a parse tree

when want Prolog to return more than just Yes/Noanswers

in case of Yes, we can compute a syntax tree representation of the parse

by adding an extra argument to nonterminals

applies to all grammar rules (not just regular grammars)

Example

sheeptalk again

DCG (non-regular, context-free):

s --> [b], [a], a, [!].

a --> [a]. (base case)

a --> [a], a. (recursive case)

s

b

a

a

!

a

a

a

Extra Argument: Parse Tree
extra argument parse tree1
Tree:

Prolog data structure:

term

hierarchical

allows sequencing of arguments

functor(arg1,..,argn)

each argi could be another term or simple atom

s

b

a

a

!

a

a

a

Extra Argument: Parse Tree

s(b,a,a(a,a(a)),!)

extra arguments parse tree

s

b

a

a

!

a

a

a

Extra Arguments: Parse Tree
  • DCG
    • s --> [b],[a], a, [!].
    • a --> [a].(base case)
    • a --> [a], a.(right recursive case)
  • base case
    • a --> [a].
    • a(subtree) --> [a].
    • a(a(a)) --> [a].

s(b,a,a(a,a(a)),!)

  • recursive case
    • a --> [a], a.
    • a(subtree) --> [a], a(subtree).
    • a(a(a,A)) --> [a], a(A).

Idea: for each nonterminal, add an argument to store its subtree

extra arguments parse tree1

s

b

a

a

!

a

a

a

Extra Arguments: Parse Tree
  • Prolog grammar
    • s --> [b], [a], a, [!].
    • a --> [a].(base case)
    • a --> [a], a.(right recursive case)
  • base and recursive cases
    • a(a(a)) --> [a].
    • a(a(a,A)) --> [a], a(A).

s(b,a,a(a,a(a)),!)

  • start symbol case
    • s --> [b], [a], a, [!].
    • s(tree) --> [b], a(subtree), [!].
    • s(s(b,a,A,!)) --> [b], [a], a(A), [!].
extra arguments parse tree2
Extra Arguments: Parse Tree
  • Prolog grammar
    • s --> [b], [a], a, [!].
    • a --> [a].(base case)
    • a --> [a], a.(right recursive case)
  • Equivalent Prolog grammar computing a parse
    • s(s(b,a,A,!)) --> [b], [a], a(A), [!].
    • a(a(a)) --> [a].
    • a(a(a,A)) --> [a], a(A).
extra arguments agreement
Idea:

We can also use an extra argument to impose constraints between constituents within a DCG rule

(in fact, we can have multiple extra arguments)

Example:

English determiner-noun number agreement

Data:

the man

the men

a man

*a men

Lexical Features:

man singular

men plural

Extra Arguments: Agreement
extra arguments agreement1
Context-Free Grammar of English:

s(s(Y,Z)) --> np(Y), vp(Z).

np(np(Y)) --> pronoun(Y).

pronoun(i) --> [i].

pronoun(we) --> [we].

np(np(D,N)) --> det(D), common_noun(N).

det(det(the)) --> [the].

det(det(a)) --> [a].

common_noun(n(ball)) --> [ball].

common_noun(n(man)) --> [man].

common_noun(n(men)) --> [men].

vp(vp(Y)) --> unergative(Y).

vp(vp(Y,Z)) --> transitive(Y), np(Z).

unergative(v(ran)) --> [ran].

transitive(v(hit)) --> [hit].

Extra Arguments: Agreement
  • Example sentences
    • We ran
    • The men hit the ball
    • etc.
    • *A men hit a ball
extra arguments agreement2
Let’s test and modify this grammar in Prolog

Test:

?- s(Tree,Sentence,[]).

Sentence is a Prolog list to be supplied by user

Tree a variable

Extra Arguments: Agreement
extra arguments agreement3
Extra Arguments: Agreement
  • Data:
    • the man/men
    • a man/*a men
  • Grammar: (NP section)
    • np(np(Y)) --> pronoun(Y).
    • np(np(D,N)) --> det(D), common_noun(N,Number).
    • det(det(the)) --> [the].
    • det(det(a)) --> [a].
    • common_noun(n(ball),sg) --> [ball].
    • common_noun(n(man),sg) --> [man].
    • common_noun(n(men),pl) --> [men].
    • pronoun(i) --> [i].
    • pronoun(we) --> [we].
  • Idea:
    • specify singular (sg) and plural (pl) for common nouns using an extra argument
  • Rules
    • the can combine with singular or plural nouns
    • a can combine only with singular nouns
extra arguments agreement4
Extra Arguments: Agreement
  • Data:
    • the man/men
    • a man/*a men
  • Grammar: (NP section)

np(np(Y)) --> pronoun(Y).

np(np(D,N)) --> det(D,Number), common_noun(N,Number).

det(det(the),sg) --> [the].

det(det(the),pl) --> [the].

det(det(a),sg) --> [a].

common_noun(n(ball),sg) --> [ball].

common_noun(n(man),sg) --> [man].

common_noun(n(men),pl) --> [men].

pronoun(i) --> [i].

pronoun(we) --> [we].

  • Idea:
    • give determiners a number feature as well
    • and make it agree with the noun
  • Rules
    • the can combine with singular or plural nouns
    • a can combine only with singular nouns
extra arguments agreement5
Extra Arguments: Agreement
  • Simplifying the grammar:

det(det(the),sg) --> [the].

det(det(the),pl) --> [the].

det(det(a),sg) --> [a].

  • Grammar is ambiguous:
    • two rules for determiner the
  • Agreement Rule (revisited):
    • the can combine with singular or plural nouns
    • i.e. the doesn’t care about the number of the noun
  • DCG Rule:

np(np(D,N)) --> det(D,Number), common_noun(N,Number).

det(det(the),_) --> [the].

Note: _ is a variable

used underscore character because we don’t care about the name of the variable

extra arguments agreement6
Note:

Use of the extra argument for agreement here is basically “syntactic sugar” and lends no more extra expressive power to the grammar rule system

i.e. we can enforce the agreement without the use of the extra argument at the cost of more rules

Instead of

np(np(D,N)) --> det(D,Number), common_noun(N,Number).

we could have written:

np(np(D,N)) --> detsg(D), common_nounsg(N).

np(np(D,N)) --> detpl(D), common_nounpl(N).

detsg(det(a)) --> [a].

detsg(det(the)) --> [the].

detpl(det(the)) --> [the].

common_nounsg(n(ball)) --> [ball].

common_nounsg(n(man)) -->[man].

common_nounpl(n(men)) --> [men].

Extra Arguments: Agreement
extra arguments expressive power
Extra Arguments: Expressive Power
  • General Question:
    • Does the extra argument change the system?
    • i.e. does it offer the grammar more expressive power?
  • Answer:
    • Yes
  • Example:
    • We can write an otherwise regular-looking DCG for the non-regular language

Lab = { anbn | n ≥ 1 }

(which cannot be encoded by any regular grammar)

extra arguments expressive power1

s --> [a],b.

b --> [a],b.

b --> [b],c.

b --> [b].

c --> [b],c.

c --> [b].

Extra Arguments: Expressive Power

s(X) --> [a],b(a(X)).

b(X) --> [a],b(a(X)).

b(a(X)) --> [b],c(X).

b(a(0)) --> [b].

c(a(X)) --> [b],c(X).

c(a(0)) --> [b].

Query:?- s(0,L,[]).

a+b+

a regular grammar

regular grammar + extra argument

extra arguments expressive power2
Extra Arguments: Expressive Power
  • Computation tree:
    • ?- s(0,[a,a,b,b],[]).
    • ?- b(a(0),[a,b,b],[]).
    • ?- b(a(a(0)),[b,b],[]).
    • ?- c(a(0),[b],[]).
    • Yes

s(X) --> [a],b(a(X)).

b(X) --> [a],b(a(X)).

b(a(X)) --> [b],c(X).

b(a(0)) --> [b].

c(a(X)) --> [b],c(X).

c(a(0)) --> [b].

ad