View
32
Download
0
Category
Preview:
DESCRIPTION
Week 3: Syntax van Natuurlijke Taal. Taaltheorie en Taalverwerking. Vorige weken: Formele Talen & Formele Grammatica's. Taaltheorie en Taalverwerking. Nu: Toepassing op Natuurlijke Taal. Taaltheorie en Taalverwerking. Natuurlijke Taal B.v.: Engels. Natuurlijke Taal B.v.: Engels - PowerPoint PPT Presentation
Citation preview
Taaltheorie en Taalverwerking
Week 3:
Syntax van Natuurlijke Taal
Taaltheorie en Taalverwerking
Vorige weken:
Formele Talen & Formele Grammatica's
Taaltheorie en Taalverwerking
Nu:
Toepassing op Natuurlijke Taal
Natuurlijke Taal
B.v.: Engels
Natuurlijke Taal
B.v.: Engels
Opmerking:
– Niet alle talen lijken sprekend op 't Engels.– Sommige zijn “makkelijker”:
Aboriginal-talen (b.v. Warlpiri) ,
Papoea-talen, Amazone-gebied.– Sommige zijn “moeilijker”
(b.v.: Nederlands, Züüritüütsch).
Engels
Tamelijk unieke taal:
• nauwelijks morphologie (verbuigingen, vervoegingen,
e.d.)• vaste woordvolgorde
Woordvolgorde: Engels vs. Nederlands
Jan gaf vanochtend Marie het geld. Jan gaf Marie vanochtend het geld. Jan gaf Marie het geld vanochtend. Vanochtend gaf Jan Marie het geld.
* John gave Mary this morning the money.* John gave this morning Mary the money. John gave Mary the money this morning. This morning, John gave Mary the money.
Woordvolgorde: Engels vs. Nederlands
Op het dak zag Jan een kat zitten. Jan zag op het dak een kat zitten. Jan zag een kat op het dak zitten. Jan zag een kat zitten op het dak.
* On the roof, John saw a cat sitting.* John saw on the roof a cat sitting.* John saw a cat on the roof sitting. John saw a cat sitting on the roof.
Grammatica voor Engels
Contextvrije grammatica's als verantwoording van intuïtieve ideeën over constituentenstructuur.
articlethe
nounwumpus
copulais
S
NP VP
adjectivedead
S NP VP
NP article noun
VP copula adjectiveVP verbverb walks
article thearticle a
noun wumpusnoun boy
copula iscopula was
adjective deadadjective happy
articlethe
nounwumpus
copulais
S
NP VP
adjectivedead
Hoe verzin je zoiets?
articlethe
nounwumpus
copulais
S
NP VP
adjectivedead
Hoe verzin je zoiets?
(1) Teken de intuïtief correcte hiërarchische structuur.
articlethe
nounwumpus
copulais
S
NP VP
adjectivedead
Hoe verzin je zoiets?
(1) Teken de intuïtief correcte hiërarchische structuur.(2) Labelling: Constituenten met dezelfde categorie moeten intersubstitueerbaar zijn.
articlethe
nounwumpus
copulais
S
NP VP
adjectivedead
Hoe verzin je zoiets?
(1) Teken de intuïtief correcte hiërarchische structuur.(2) Labelling: Constituenten met dezelfde categorie moeten intersubstitueerbaar zijn.
Cognitie: Categorie = klasse van intersubstitueerbare woorden.
articlethe
nounwumpus
copulais
S
NP VP
adjectivedead
Hoe verzin je zoiets?
(1) Teken de intuïtief correcte hiërarchische structuur.(2) Labelling: Constituenten met dezelfde categorie moeten intersubstitueerbaar zijn.(3) Linguïstische conventies. [Bestudeer Jurafsky & Martin, Russell & Norvig, ppt-slides van het hoorcollege, uitwerkingen van het werkcollege.]
articlede
nounman
verbziet
S
NP VP
proper-nounMarie
Linguïstische conventies:
NP: analogie tussen "de man" en "Marie"VP: analogie tussen "ziet Marie" en "loopt"
NP
articlede
nounman
verbziet
S
NP VP
proper-nounMarie
Fout.
NP
adverbniet
articlede
nounman
verbziet
S
NP VP
proper-nounMarie
Fout.
Constituenten met hetzelfde label moeten intersubstitueerbaar zijn.
NP
adverbniet
articlede
nounman
verbziet
S
NP VP
proper-nounMarie
Beter.
NP
adverbniet
articlede
nounman
verbziet
S
NPVP
proper-nounMarie
Nog beter.
NP
adverbniet
VP
Martin & Jurafsky 9.4 The Noun Phrase
Lexicale NP's:Eigennamen: NP ProperNounVoornaamwoorden: NP Pronoun
Complexe NP's: bestaat typisch uit een Lidwoord (Determiner) gevolgd door een zelfstandig naamwoord (Noun). Daartussen en daarachter kunnen nog allerlei optionele constituenten staan.
NP DetP (Card) (Ord) (AP) Noun
DetP the | all | all the | many of the | Card 1 | 2 | 3Ord first | second | lastAP Adj | Adv Adj
Voorbeeld: "The 3 first very early flights"
M&J 9.4 The Noun Phrase
Lexicale NP's:Eigennamen: NP ProperNounVoornaamwoorden: NP Pronoun
Complexe NP's: bestaat typisch uit een Lidwoord (Determiner) gevolgd door een zelfstandig naamwoord (Noun). Daartussen en daarachter kunnen nog allerlei optionele constituenten staan.
NP DetP (Card) (Ord) (AP) NominalNominal Noun | Noun Nominal
Voorbeeld: "The 3 first morning flights"
M&J 9.4 The Noun Phrase
Lexicale NP's:Eigennamen: NP ProperNounVoornaamwoorden: NP Pronoun
Complexe NP's: bestaat typisch uit een Lidwoord (Determiner) gevolgd door een zelfstandig naamwoord (Noun). Daartussen en daarachter kunnen nog allerlei optionele constituenten staan.
NP DetP (Card) (Ord) (AP) NominalNominal Noun | Noun Nominal | Nominal PPPP Prep NPPrep on | in | at | to | from
Voorbeeld: "The 3 first morning flights to Dallas"
M&J 9.2 Context-Free Rules and Trees
VP-regels: zie voorbeeldgrammatica L0:
Lexicon: Structurele regels:
M&J 9.3 Sentence-Level Constructions
declarative sentencesS NP VPB.v.: "I prefer a morning flight"
"They list all flights from Burbank to Denver"
imperative sentences (bevelen, opdrachten, suggesties)S VPB.v.: "Show me the lowest fare"
"List all flights from Burbank to Denver"
yes-no questionsS Aux NP VP ?Voorbeelden:
"Do these flights go to Denver?""Can you give me the same information for KLM?"
wh-questionsS WhNP VP ?Voorbeelden:
"What airlines fly from Burbank to Denver?""Which flights serve breakfast?"
S WhNP Aux NP VP ?Voorbeeld:
"What flights to Denver do you have tomorrow?"
M&J 9.3 Sentence-Level Constructions
yes-no questionsS Aux NP VP ?Voorbeelden:
"Do these flights go to Denver?""Can you give me the same information for KLM?"
wh-questionsS WhNP VP ?Voorbeelden:
"What airlines fly from Burbank to Denver?""Which flights serve breakfast?"
S WhNP Aux NP VP ? [Nog niet helemaal goed: incomplete VP!]Voorbeeld:
"What flights to Denver do you have tomorrow?"
M&J 9.3 Sentence-Level Constructions
Uitbreiding op CFG: Features.
S NP VP
NP proper-nounNP article noun
VP verb
verb loopt | lopennoun hond | hondenarticle alle | elke | vier
Jan loopt
de honden lopen
S NP VP
NP proper-nounNP article noun
VP verb
verb loopt | lopennoun hond | hondenarticle alle | elke | vier
Jan loopt
de honden lopen
Jan lopen
de honden loopt
S NP VP
NP proper-nounNP article noun
VP verb
verb loopt | lopennoun hond | hondenarticle alle | elke | vier
Jan loopt
de honden lopen
Jan lopen
de honden loopt
NP's: elke hondenalle hondvier hond
S NPsing VPsing
S NPplur VPplur
NPsing proper-noun
NPsing articlesing nounsing
NPplur articleplur nounplur
VPsing verbsing VPplur verbplur
verbsing loopt verbplur lopennounsing hond nounplur hondenarticlesing elkearticleplur alle | vier
Jan loopt
de honden lopen
Jan lopen
de honden loopt
NP's: elke hondenalle hondvier hond
elke hond looptalle honden lopen
S NPsing VPsing
S NPplur VPplur
NPsing proper-noun
NPsing articlesing nounsing
NPplur articleplur nounplur
VPsing verbsing VPplur verbplur
Jan loopt
de honden lopen
Jan lopen
de honden loopt
NP's: elke hondenalle hondvier hond
elke hond looptalle honden lopen
Nadeel: Duplicatie van regels.
S NPsing VPsing
S NPplur VPplur
NPsing proper-noun
NPsing articlesing nounsing
NPplur articleplur nounplur
VPsing verbsing VPplur verbplur
Nadeel: Duplicatie van regels.
Nog meer zulke syntactische attributen:
1e, 2e, 3e persoon: "ik loop" vs. "Jan loopt"
onzijdig vs. mannelijk/vrouwelijk:"elk kind" vs. "elke hond"
telbaar vs. niet-telbaar:"veel wijn" vs. "veel hond"
S NPsing VPsing
S NPplur VPplur
NPsing proper-noun
NPsing articlesing nounsing
NPplur articleplur nounplur
VPsing verbsing VPplur verbplur
Nadeel: Duplicatie van regels.
Nog meer zulke syntactische attributen:
1e, 2e, 3e persoon: "ik loop" vs. "Jan loopt"
onzijdig vs. mannelijk/vrouwelijk:"elk kind" vs. "elke hond"
telbaar vs. niet-telbaar:"veel wijn" vs. "veel hond"
Naarmate we meer zulke onderscheidenintroduceren, neemt het aantal regels exponentieel toe.
S NPsing VPsing
S NPplur VPplur
NPsing proper-noun
NPsing articlesing nounsing
NPplur articleplur nounplur
VPsing verbsing VPplur verbplur
Daarom: feature-grammatica's (unification grammars, augmented CFG's,Definite Clause Grammars (DCG's))
S NP (x) VP (x)
NP (sing) proper-noun
NP (x) article (x) noun (x)
VP (x) verb (x)
Cf. Prolog-unificatie: Feature-agreement ("congruentie") &feature-percolation (inheritance)
S NP [nr:x, person:y] VP [nr: x, person: y]
NP [nr: sing] proper-noun
NP [nr: x] article [nr: x, count:y] noun [nr: x, count:y]
VP [nr: x, person: y] V1 [nr: x, person: y]
article [nr: sing, count: +] a | one | somearticle [nr: plural, count: +] 3 | manyarticle [nr: x, count: +] somearticle [nr: sing, count: x] somearticle [nr: sing, count: -] mucharticle [nr: plural, count: -] 3 liters of
N [nr: sing, count: +] boyN [nr: plural, count: +] boysN [nr: x, count: -] wine
The Verb Phrase and Subcategorization
Subcategorization frame: list of complements that the verb selects for.
Voorbeelden:
vp --> verb.disappear
* want
vp --> verb, np. prefer a morning flight
* disappear a morning flight
vp --> verb, np, pp. put a book on the table
* disappear a book on the table
vp --> verb, vp. want to fly to Orlando
* find to fly to Orlando
Implementing subcategorization: just like the agreement feature
– encode subcategorization form in non-terminal name (larger grammar)
– encode subcategorization in extra argument (smaller grammar)
Slechts één "regel" voor VP:
VP V[subcat: (X1, ..., Xn)] X1 ... Xn
N.B.: Regelschema!
S NP VP VP V1 V2 NP V3 NP PP
NP DET N PP PREP N
DET every | aN man | table PREP on | under V1 walks | talks V2 loves | seesV3 puts
B.v.:
S NP VP VP V1 V2 NP V3 NP PP
NP DET N PP PREP N
DET every | aN man | table PREP on | under V1 walks | talks V2 loves | seesV3 puts
S NP VP VP V[subcat: (X1, ..., Xn)] X1 ... Xn
NP DET N PP PREP N
DET every | aN man | table PREP on | under V [subcat: ()] walks | talks V [subcat: (NP)] loves | seesV [subcat: (NP PP)] puts
wordt:
Wh-Questions Revisited
Transformationele Grammatica
Wh-Questions
"Which boys does Mary see?"
yes-no questionsS Aux NP VP ?Voorbeelden:
"Do these flights go to Denver?""Can you give me the same information for KLM?"
wh-questionsS WhNP VP ?Voorbeelden:
"What airlines fly from Burbank to Denver?""Which flights serve breakfast?"
S WhNP Aux NP VP ? [Nog niet goed: VP moet incompleet zijn!]Voorbeeld:
”What flights do these flights go to Denver?""What flights to Denver do you have some flights tomorrow?"
M&J 9.3 Sentence-Level Constructions
Which boys does Mary see?
Which boys does Mary see?
Which boys does Mary see [ ]?
Does Mary see John?
Which boys does Mary see?
Which boys does Mary see [ ]?
Which boys does Peter think Mary sees [ ]?
Does Peter think Mary sees John?Does Peter think Mary sees which boys?
Which boys does Mary see [ ]?
Which boys does Peter think Mary sees [ ]?
Noam Chomsky: Transformationele Grammatica.
• CFG genereert “diepte-structuur”:“Does Mary see which boys?”
• Transformatie-regel sleept “which boys” naar voren.
YNQ does NP VP; YNQ[–t] does NP VP[–t]; YNQ[+t] does NP VP[+t];
WHQ WHNP YNQ[+t];
VP[+t] V2 NP[+t];
NP[+t] e;
Noam Chomsky: Transformationele Grammatica.
Kun je nabouwen d.m.v. een contextvrije grammaticamet features (Definite Clause Grammar).
Recommended