Topic 4: Grammar & Parsing Flashcards
What is syntax?
Refers to the way words are arranged together
Constituency
group of words behaving as a single unit or constituent
fundamentals of developing grammar
example
noun phrase, a sequence of words surrounding at least one noun
Evidence for constituency
words can all appear in a similar syntactic environments.
give example
noun phrase can occur before verbs
preposed or postposed constructions
example of prepositional phrase “ on September seventeenth” can be placed in ….
Context Free Grammar
formal system for modeling constituent structure in English and other natural languages
also known as phrase-structure grammars
consists of a set of rules or productions
the rule expresses ways symbol of the language grouped and ordered together and lexicon of words and symbols
Some rules for noun phrase
NP -> Det Nominal
NP -> ProperNoun
Nominal -> Noun | Nominal Noun
example derivation
NP -> Det Nom -> the Nom Noun -> the Noun Noun -> the morning noun -> the morning flight
2 Classes of symbols
terminal - corresponds to words in the language
non-terminal - express abstractions over the terminals
item on left of the arrow is a single non-terminal symbol.
right side is an ordered list of one or more terminals or non-terminals
Function of CFG
- ways for generating structures
- ways to assign structure to a given sentence.
Derivation
the sequence of rule expansions is called derivation of the string of words.
Parse Tree
derivation can be represented with parse tree
More rules on Eng CFG
Give examples
S -> NP VP
VP -> VERB NP
VP -> VERB PP
PP -> PREPOSITION NP
Sample Lexicon and Sample Grammar
examples …
Bracketed Notation
used to represent parse tree in a more compact format
give example
Grammatical Sentence
sentences that can be derived by a grammar defined by the grammar in the formal language.
Ungrammatical sentences
sentences that cannot be derived by a given formal grammar
Four parameters in CFG
non-terminal symbols
terminal symbols
rules
start symbol