context-free grammars for english

17
Context-Free Grammars for English 1 Context-Free Grammars for English 인인인인 인인인 인 인 인

Upload: cana

Post on 21-Jan-2016

52 views

Category:

Documents


0 download

DESCRIPTION

Context-Free Grammars for English. 인공지능 연구실 허 희 근. Contents. Introduce What is a CFG (Context-Free Grammar) Context-Free Rules and Trees Sentence-Level Constructions The Noun Phrase Coordination Agreement The Verb Phrase and Subcategorization. Introduce(1). - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Context-Free Grammars  for English

Context-Free Grammars for English 1

Context-Free Grammars for English

인공지능 연구실허 희 근

Page 2: Context-Free Grammars  for English

Context-Free Grammars for English 2

Contents

Introduce What is a CFG (Context-Free Grammar) Context-Free Rules and Trees Sentence-Level Constructions The Noun Phrase Coordination Agreement The Verb Phrase and Subcategorization

Page 3: Context-Free Grammars  for English

Context-Free Grammars for English 3

Introduce(1)

Introduce a number of more complex notion of syntax and grammar.– Three main new ideas

• Constituency : 단일 unit 또는 phrase 를 가지는 word group– Ex) noun pharse

• Grammatical relations : SUBJECTS 와 OBJECTS 에 대한 전통문법 형식화

– Ex) She ate a mammoth breakfast.

» she (SUBJECT), a mammoth breakfast (OBJECT)

• Subcategorization and dependencies : words 와 phrase 사이의 relation

Page 4: Context-Free Grammars  for English

Context-Free Grammars for English 4

Introduce(2)

Introduce the use of Context-Free Grammars.– All of these kinds of syntactic knowledge can be modeled by various

kinds of grammars that are based on CFG.

– CFG are backbone of many models of the syntax of natural language (of computer languages).

– Powerful enough to express sophisticated relations among the words in a sentence.

– CFG are integral to most models of natural language understanding, of grammar checking.

Page 5: Context-Free Grammars  for English

Context-Free Grammars for English 5

What is a CFG (Context-Free Grammar) (1)

영문에서 문장은 phrase 가 모여 이루어진 것이므로 문장의 구조를 명확히 하기 위해서는 구의 구성을 아는 것이 기본이라는 것으로 출발

문장의 처음부터 끝까지 rewriting rule 을 적용함으로써 그 문장을 표현하는 parse tree 를 구성해 나가는 것

Page 6: Context-Free Grammars  for English

Context-Free Grammars for English 6

What is a CFG (Context-Free Grammar) (2)

Rewriting rule

– 이러한 법칙을 문장의 처음부터 끝까지 적용하여 tree 를 만듦

(a) S NP·VP·PP (b) VP V·NP

(c) NP DET·N (d) NP N

(e) PP PREP·NP (f) N boy, window, hammer

(g) DET the, a (h) V broke

(i) PREP with

Page 7: Context-Free Grammars  for English

Context-Free Grammars for English 7

What is a CFG (Context-Free Grammar) (3)

CFG parse tree (The boy broke the window with a hammer.)

Page 8: Context-Free Grammars  for English

Context-Free Grammars for English 8

Context-Free Rules and Trees(1)

CFG 는 일반적으로 영문이나 다른 자연어에서 그것을 구성하는 구조를 모델화할 때 가장 많이 쓰이는 수학적 시스템

CFG 는 rules 또는 productions 의 set 을 구성– 이것들은 Language symbols 이 그룹화하고 순서를 정할 수 있는

방법을 표현– Symbols 는 CFG 가 두 개의 클래스로 나눌 때 사용

• Terminal symbols : word 에 해당하는 symbols (“the”, “nightclub”)

• Non-terminals : terminal symbols 의 clusters 또는 generalization 을 표현하는 symbols

Page 9: Context-Free Grammars  for English

Context-Free Grammars for English 9

Context-Free Rules and Trees(2)

CFG 는 보통 두 가지의 방법으로 생각함– 문장을 일반화 시키기 위한 방법– 주어진 문장의 구조의 정하기 위한 방법– Generator : (arrow)

• Rewrite the symbol on the left with the string of symbols on the right.

– CFG 는 랜덤하게 연속된 string 을 일반화시킬 때 사용• This sequence of rule expansions is called a derivation of the string of

words.

• Represent a derivation by a parse tree

Page 10: Context-Free Grammars  for English

Context-Free Grammars for English 10

Context-Free Rules and Trees(3)

Sample lexicon Grammar rule

Page 11: Context-Free Grammars  for English

Context-Free Grammars for English 11

Context-Free Rules and Trees(3)

Parse tree

Page 12: Context-Free Grammars  for English

Context-Free Grammars for English 12

Sentence-Level Constructions

There are a great number of possible overall sentence structures.– But four are particularly common and important.

• Declarative structure

• Imperative structure

• Yes-no-question structure

• Wh-question structure

Page 13: Context-Free Grammars  for English

Context-Free Grammars for English 13

The Noun Phrase(1)

The syntax of English allows for both prenominal (pre-head) modifiers and post-nominal (post-head) modifiers.– Before the Head Noun

• Noun phrases can begin with a determiner– Ex) a stop, the flights, that fare, this flight, those flights…– Noun 이 복수형일 때는 determiner 생략할 수 있음

• Predeterminers : word class appear in the NP before the determiner.– Common predeterminer is all– Ex) all the flights, all flight

• Word class appear in the NP between the determiner and the head noun.– Cardinal numbers, ordinal numbers, quantifiers

• rule of prenominal modifiers– NP (Det) (Card) (Ord) (Quant) (AP) Nominal

Page 14: Context-Free Grammars  for English

Context-Free Grammars for English 14

The Noun Phrase(2)

– After the Noun• A head noun can be followed by postmodifiers.

– Prepositional phrases, relative clauses

• brackets inserted to show the boundaries of each PP.– Ex) a reservation [on flight six oh six] [form Tampa] [to Montreal]

– Nominal Nominal PP (PP) (PP)

Page 15: Context-Free Grammars  for English

Context-Free Grammars for English 15

Coordination

Noun phrases and other units can be conjoined with conjunctions like and, or, and but.– NP NP and NP

– VP VP and VP

– S S and S

Page 16: Context-Free Grammars  for English

Context-Free Grammars for English 16

Agreement

Rule of 3sg subjects and non-3sg subjects– S Aux NP VP

S 3sgAux 3sgNP VP

S Non3sgAux Non3sgNP VP

– 3SgNP (Det) (Card) (Ord) (Quant) (AP) SgNominal

– Non3SgNP (Det) (Card) (Ord) (Quant) (AP) PlNominal

3sgAux : does | has | can | …

Non3sgAux : do | have | can | …

Page 17: Context-Free Grammars  for English

Context-Free Grammars for English 17

The Verb Phrase and Subcategorization

Some subcategorization frames and example verbs