Grammars for a Natural Language - PowerPoint PPT Presentation

1 / 33
About This Presentation
Title:

Grammars for a Natural Language

Description:

Example: I will purchase the new book. What book will I purchase? ... Can you find the car? Who ate the pizza? The man who ate the pizza spent fifteen dollars. ... – PowerPoint PPT presentation

Number of Views:51
Avg rating:3.0/5.0
Slides: 34
Provided by: jeffrey115
Category:

less

Transcript and Presenter's Notes

Title: Grammars for a Natural Language


1
Grammars for a Natural Language
  • 5.1 Auxiliary Verbs and Verb Phrases
  • 5.2 Movement Phenomena in Language
  • 5.3 Handling Questions in CFGs
  • 5.4 Relative Clauses
  • 5.5 The Hold Mechanism in ATNs
  • 5.6 Gap Threading

2
5.1 Auxiliary Verbs
  • Additional pre-verb completing sentence
  • can, have, shall, may, do, will, must, need,
    dare, ought to, used to, be going to
  • I will watch the movie.
  • My friend should see it for himself.
  • Henry might want to take a vacation.
  • Next week, they will have been missing for
    fifteen days.
  • Very ordered structure in grammar (not random)
  • Auxiliary verbs determine main verb structure

3
Testing for Auxiliary Verbs
  • Can be placed before not
  • He can not say those things.
  • I eat not a bite more.
  • Can precede the subject NP in a question
  • Would we run the entire race?
  • Enjoys she her job?
  • May not appear as the only verb
  • John shall the weekend.
  • Mary loves the weekend.

4
Modal COMPFORM
  • Modal auxiliaries exclude be, have
  • Appear only in finite tense (present and past)
  • Can only be auxiliary verbs
  • Non-modal auxiliaries include be, have
  • Can appear in variety of tenses
  • Can be main verbs as well as auxiliary
  • COMPFORM
  • Feature used to specify form of main verb

5
COMPFORM Chart
  • Chart reproduced from Fig. 5.1 on p. 124 of text
  • I can see the house. COMPFORM base
  • I have seen the house. COMPFORM pastprt
  • I am lifting the box. COMPFORM ing
  • I was seen by the crowd. COMPFORM pastprt

6
Grammars with Auxiliaries
  • Grammar rule for VP
  • VP ? (AUX COMPFORM ?s)(VP VFORM ?s)
  • I must complete this work.
  • I have known that answer for a while.
  • I am crying.
  • Restriction 1
  • Modal have be (progressive) be (passive)
  • The song might have been being played as we
    left.

7
More Auxiliary Restrictions
  • 1 Modal have be (prog.) be (pass.)
  • Exception I regret having been chosen to go.
  • 2 Auxiliary sequences can appear as VP
    complements for certain verbs
  • Exception I must be having been singing.
  • 3 Add a MAIN feature to signal a main verb, and
    a PASS feature to signal passive
  • VP ? AUXbe VPing, main
  • VPpass ? AUXbe VPpassprt, main

8
Features main, pass
  • VP ? AUXbe VPing, main
  • VPpass ? AUXbe VPpassprt, main
  • VP ? V....
  • Examples
  • I was helping the boy.
  • I was seen by the boy.
  • I was being good.
  • Parse trees at Fig. 5.4 on page 128 of text

9
Passive Sentences
  • Passive sentences reverse order of NPs
  • I will hide my hat.
  • The hat will be hidden by me.
  • Object may be removed from passive
  • The hat will be hidden.
  • Feature signals missing object passgap
  • VPpassgap ? VPnp
  • VP-passgap ? VPnp NP

10
5.2 Movement Phenomena
  • Movement Phenomena moving parts of a sentence
    around, such as in questioning
  • Subject-aux inversion
  • Rearranging the subject and auxiliary verb to ask
    a question
  • John is going to the store.
  • Is John going to the store?
  • Henry found four dollars.
  • Did Henry find four dollars?

11
Local Unbounded Movement
  • Local Movement
  • Movement of constituents within limited rules
  • Subject-aux inversion
  • Unbounded Movement
  • Arbitrary movement of constituents in sentence
  • Wh-questions
  • Wh-questions
  • Forming a question by using a wh- word (e.g.,
    what, who, why, when)

12
Wh-questions
  • Joe had written a letter to the congressman last
    night.
  • Who had written a letter to the congressman
    last night?
  • What had Joe written to the congressman last
    night?
  • To whom had Joe written a letter last night?
  • When had Joe written a letter to the congressman
    ?
  • Inverts auxiliary and subject
  • Allows inversion rules to apply
  • Questions begin with a wh-word
  • A gap appears in each sentence at

13
Handling Gaps
  • Gap space where word has been removed
  • Filler moved constituent
  • Transformational Grammar
  • Maps a regular CFG (deep structure) to an altered
    CFG (surface structure)
  • Box 5.1 on page 131 of text
  • Hold List on CFGs
  • Allows constituents to be saved until later

14
Handling Gaps
  • Slash categories
  • Nonterminals of form X/Y, where X is the real
    constituent and Y is the missing constituent
  • Increases grammar size
  • Feature GAP
  • Same format as slash category
  • Grammar size not increased

15
Other Movement Types
  • Box 5.2 on p. 132 of text
  • Topicalization
  • Movement for emphasis
  • This picture, I had never liked.
  • Adverb preposing
  • Adverb moved to beginning of sentence
  • Tomorrow, I will see you.
  • Extraposition
  • NP moved to sentence close
  • A book was written discussing evolution

16
5.3 Handling Questions in CFGs
  • Goal Extend CFG minimally for questions
  • Yes/No questions
  • Sinv ? (AUX COMPFORM ?s) (NP) (VP VFORM ?s)
  • Gap Rule
  • (NP GAP ((CAT NP)(AGR ?a)) AGR ?a) ? ?
  • Nonlexical subconstituent
  • (S GAP ?g) ? (NP GAP -)(VP GAP ?g)
  • Lexical subconstituent
  • (VP GAP ?g) ? V_np_vpinf(NP GAP ?g)(PP GAP-)
  • (VP GAP ?g) ? V_np_vpinf(NP GAP -)(PP GAP ?g)

17
Analyzing Fillers
  • Filler moved subconstituent
  • Word types
  • Pronouns who, whom, what
  • Determiners what, which
  • Prepositions where, when
  • Adverbial modifier how
  • Possessive Pronoun whose
  • Feature WH
  • Value Q wh-question
  • Value R relative clause

18
New Syntactic Categories
  • WH (feature, not syntactic category)
  • Signals question
  • Propagates up through rules (i.e., WH PP S)
  • QDET
  • Determiners introducing WH-terms
  • PP-WRD
  • Words that act as prepositional phrases
  • CNP
  • Common noun phrase

19
Grammar Rules for Wh-words
  • Grammar 5.7 on p. 135 of the text
  • 2. (NP WH ?w) ? (DET WH ?w AGR ?a)(CNP AGR ?a)
  • 3. CNP ? N
  • 5. DET ? ART
  • 7. (DET WH ?w) ? (QDET WH ?w)
  • 8. (PP WH ?w) ? P (NP WH ?w)
  • 9. (PP WH ?w) ? (PP-WRD WH ?w)
  • Examples
  • Which book did you read? 2, 7, 3
  • Where did you find the file? 9
  • In what context did you mean that? 8, 2, 7, 3

20
Grammar Rules for Wh-questions
  • Grammar 5.9 on p. 137 of text
  • 11. (Sinv WH ?w GAP ?g) ? (AUX COMPFORM ?s AGR
    ?a)(NP WH ?w AGR ?a GAP-)(VP VFORM ?s GAP ?g)
  • 12. S ? (NPQ,-gap AGR ?a)(Sinv GAP (NP AGR
    ?a))
  • 16. (VP GAP ?g) ? V_np (NP GAP ?g)
  • Example I will purchase the new book.
  • What book will I purchase?
  • 12 NP What book S will I purchase
  • 2, 7, 3 QDET What CNP book
  • 11 AUX will NP I VP purchase
  • 16 V purchase NP ?

21
Parsing With Gaps
  • Top-down parsing
  • Not problematic gaps are predictable
  • Bottom-up parsing
  • Problematic gaps may exist at any position
  • Strategy for charting
  • Automatically insert gap wherever it is legal
  • Works for both top-down and bottom-up, although
    top-down creates fewer combinations of
    constituents with gaps

22
Parsing Example With Gaps
  • Which dogs did he see?
  • Rule 7 Which Rule 3 dogs
  • Rule 12 Which dogs
  • Rule 11 did he see
  • Rule 1 he
  • Rule 16 see Add EMPTY NP
  • No unnecessary EMPTY constituents added here

23
5.4 Relative Clauses
  • Embedded sentence missing a noun, connected by a
    special relative pronoun (who, whom, which, when,
    where, whose)
  • New syntactic category REL
  • CNP ? CNP REL
  • REL ? (NP WH R AGR ?a)(S-inv, fin GAP (NP AGR
    ?a))
  • REL ? (PP WH R PFORM ?p)(S-inv, fin GAP (PP
    PFORM ?p))
  • The man who we saw at the store was the culprit.
  • The exam in which you found the error was
    corrected.
  • The man whose book you stole is going to the
    police.

24
Gaps in Relative Clause
  • Gaps are not allowed inside subject
  • Subject of relative clause becomes relative
    pronoun
  • REL ? NPR VPfin
  • The firefighter who rescued the people
  • The newspaper which ran the story
  • The man who watched the baby

25
Relative Pronoun That
  • Added to wh-words already listed
  • WH feature set to value R only
  • Can use all rules applied to R wh-words
  • The book that I lent you
  • The search that began four days ago
  • Sometimes the relative pronoun is missing
    altogether (implied)
  • The investigation (that) Mary has undertaken
  • The programmers (who) I recommended

26
Reduced Relative Clauses
  • Relative clauses without an explicit pronoun
    (implied) AND that implied pronoun is the missing
    subject
  • The damage caused by the storm was awful.
  • The issue creating the argument is age-old.
  • Additional rules
  • REL ? (VP VFORM ing pastprt)
  • REL ? (Sfin GAP (NP AGR ?a))
  • Although multiple gaps now can appear in a
    sentence, they do not conflict

27
5.5 Hold Mechanism in ATNs
  • Hold list
  • Alternative method for handling movement (to gap
    features)
  • Functions by holding special constituents to be
    used instead at other places
  • Hold list stores constituents until later
  • Gaps process constituents as they exist, but plan
    for where they are missing

28
Holding
  • Hold action
  • Adds a constituent to a hold list
  • Occurs on an arc transfer in an ATN
  • HOLD
  • Emptying list
  • VIR arc removes held word of specified type
  • Cannot pop from ATN until list is completely
    emptied

29
Holding Examples
  • Grammar 5.14 on p. 145 of the text
  • Example sentences
  • The dog bit the cat.
  • Can you find the car?
  • Who ate the pizza?
  • The man who ate the pizza spent fifteen dollars.
  • Who do I see?

30
Comparing GAPs Hold Lists
  • Three considerations
  • Coverage Can it handle all examples?
  • Selectivity Does it reject ill-formed examples?
  • Conciseness How easily are the rules specified?
  • Coverage is equal among the two methods
  • Selectivity and conciseness need to be analyzed
    and considered

31
Selectivity Conciseness
  • GAPs require an NP with an NP gap be empty
  • ATNs allow held constituents to be used in ways
    that violate this rule
  • Who did the man who saw hit the boy?
  • Relative clause who saw
  • Main sentence Who did the man hit the boy
  • To make ATN as selective as GAPs, add complexity,
    reduce conciseness
  • Fine line between formalism as enabler and
    restrictor

32
5.6 Gap Threading
  • Third method for handling rearrangement of
    constituents
  • Used in logic grammars
  • Predicates defined containing
  • Position-in and position-out, which define the
    range of the input
  • A list of fillers that exist before the rule is
    applied
  • A list of fillers existing after the rule is
    applied

33
Filler Lists
  • Subconstituents can be removed from the input
    filler list if they are used as part of the
    constituents construction
  • Subconstituents can be added to the output filler
    list if they are parsed but not used as part of
    the constituent
  • Flexible, but constraints are explicitly
    enforced, not part of the formalism (similar to
    hold lists)
Write a Comment
User Comments (0)
About PowerShow.com