Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

Unit II - WORD LEVEL AND

SYNTACTIC ANALYSIS

LU 15 – Constituency
Introduction
• The fundamental idea of syntax is that word group together to form
constituents each of which acts as a single unit.

• They combine with other constituents to form larger constituents and


sentence.

• The bird, the beautiful garden and the rain are all noun phrases that can
occur in the same syntactic context.

• The noun phrase The bird can combine with the verb phrase flies to
form the sentence.

• Different types of phrases have different internal structures.


Phrase Level Constructions
• Constituents are identified by their similar contexts.
• Decide whether a group of words is a phrase and it can be substituted
with some other group of words without changing the meaning.
• If such a substitution is possible then the set of words forms a phrase.
This is called substitution test.
• Consider the following sentences:
– Hena reads a book
– Hena reads a storybook
– Those girls read a book
– She reads a comic book
• Replacement: for ex: Hena, Those girls, she or book, storybook, comic
book.
• Constituents represents the paradigmatic (typical) relationship that is
syntactic positions are said to be members of one paradigm.
Phrase Level Constructions – cntd.,
• Phrase types are named after their head, which is the lexical category
that determines the properties of the phrase.
• If the head is noun the phrase is called noun phrase, verb the phrase is
verb phrase and other lexical categories are adjective and preposition.
Phrase Level Constructions – cntd.,
1. Noun Phrase:
• NP is a phrase whose head is a noun or pronoun.
• It can function as subject, object or complement.
• The modifiers of a NP can be determiners or adjective phrases.
• The main head is the noun and others are optional such as
pronoun, determiner etc.
• It is constructed using phrase structure rules that is A->BC which
states that constituents A can be rewritten as two constituents B
and C.
• These rules specify order of the phrases.
Phrase Level Constructions – cntd.,
Phrase structure rules of Noun Phrase:
NP -> Pronoun
NP -> Det Noun
NP -> Noun
NP -> Adj Noun
NP -> Det Adj Noun

NP -> (Det) (Adj) Noun


• The parentheses are optional. This rule states that a noun phrase
consists of a noun possibly preceded by a determiner and an adjective.
• This rule does not cover all possible NPs.

NP -> (Det) (AP) Noun (PP)


• More than one adjective are adjective phrase (AP) and Prepositions are
PP.
Phrase Level Constructions – cntd.,
Examples of Noun Phrases:
a. They
b. The foggy morning
c. Chilled water
d. A beautiful lake in Kashmir
e. Cold banana shake
Sentence (a) only pronoun
Sentence (b) consists of determiner, adjective (AP) and a noun
Sentence (c) consists of AP and noun
Sentence (d) consists of determiner, AP, noun and PP
Sentence (e) consists of an adjective followed by a sequence of nouns
Noun sequence is termed as nominal.
NP -> (Det) (AP) Nom (PP)
Nom -> Noun | Noun Nom
Phrase Level Constructions – cntd.,
• A noun phrase can act as a subject, object or predicate

Consider the following sentences:


a. The foggy damped weather disturbed the match
b. I would like a nice cold banana shake
c. Kula botanical garden is a beautiful location

Sentence (a) NP acts as a subject


Sentence (b) NP acts as an object
Sentence (c) NP acts as a predicate.
Phrase Level Constructions – cntd.,
2. Verb Phrase:
• VP is headed by verb, it organizes various elements of the sentence that
depend syntactically on the verb.
• Consider the following sentences:
a. Ram slept
b. The boy kicked the ball
c. Ram slept in the garden
d. The boy gave the girl a book
e. The boy gave the girl a book with blue cover.
• Sentence (a) [VP -> Verb]
• Sentence (b) [VP -> Verb NP]
• Sentence (c) [VP -> Verb PP]
• Sentence (d) [VP -> Verb NP NP]
• Sentence (e) [VP -> Verb NP NP PP]
Phrase Level Constructions – cntd.,
• The number of NPs and VPs is limited to two but to add more than two
PPs.
• VP -> Verb (NP) (NP) (PP)*
• Consider the sentence “I know that Taj is one of the seven wonders”
• In this example NP is replaced by S VP -> Verb S

3. Prepositional Phrase:
• It is headed by preposition. They consist of preposition followed by
noun phrase.
• Ex: We played volleyball on the beach
• The rule is PP -> Prep (NP)
Phrase Level Constructions – cntd.,
4. Adjective phrase:
• It is headed by adjective and consists of an adjective which may be
preceded by an adverb and followed by a PP.
• Ex: Ashish is clever
The train is very late
My sister is fond (affectionate) of animals
• The phrase structure rule is: AP -> (Adv) Adj (PP)

5. Adverb phrase:
• It consists of an adverb preceded by a degree adverb.
• Ex: Time passes very quickly
• AdvP -> (Intens) Adv
Sentence Level Constructions
• A sentence can have varying structures.

Four types of structures:


1. Declarative structure
2. Imperative structure
3. Yes-no question structure
4. Wh-question structure

1. Declarative Structure:
• It has a subject followed by a predicate. The subject is noun phrase
and the predicate is a verb phrase.
• Ex: I like horse riding.
• The rule is S-> NP VP
Sentence Level Constructions – cntd.,
2. Imperative Structure:
• It begins with a verb phrase and lack subject. The subject of these
types of sentence is implicit and is understood to be ‘You’.

• These types of sentences are used for commands and suggestions.

• The grammar rule is:


S -> VP

• Example:
Look at the door
Give me the book
Stop talking
Show me the latest design
Sentence Level Constructions – cntd.,
3. yes-no Question Structure:
• These sentences begin with an auxiliary verb followed by a subject NP,
followed by a VP.
• The Grammar rule is:
S -> Aux NP VP
Examples:
Do you have a red pen?
Is the game over?
Can you show me your album?

4. Wh-question Structure:
• It is more complex. These sentences begin with a wh-words who, which,
where, what, why and when.
• It may have a wh-phrase as a subject or may include another subject.
• Ex: Which team won the match?
• The Grammar rule is same for declarative sentence except wh:
S -> Wh-NP VP
Sentence Level Constructions – cntd.,
• Another type of wh-question structure is one that involves more than one NP.
• In this type of questions the auxiliary verb comes before the subject NP just
as yes-no question structures.
• Ex: which cameras can you show me in your shop?
• The rule is: S -> Wh-NP Aux NP VP
Summary of grammar rules:
S -> NP VP
S -> VP
S -> Aux NP VP
S -> Wh-NP Aux NP VP
S -> Wh-NP VP
NP -> (Det) (AP) Nom (PP)
VP -> Verb (NP) (NP) (PP)*
VP -> Verb S
AP -> (Adv) Adj (PP)
PP -> Prep (NP)
Sentence Level Constructions – cntd.,
Coordination:
• Coordination is a structure and it refers to conjoining phrases with
conjunctions like ‘and’, ‘or’ and ‘but’.
• For example a coordinate noun phrase can consist of two other noun
phrases separated by a conjunction ‘and’
I ate [NP [NP an apple] and [NP a banana]]
• Similarly verb phrases and prepositional phrases can be conjoined as
follows:
It is [VP [VP dazzling] and [VP raining]]
• Even a sentence can be conjoined
[S [S I am reading the book] and [S I am also watching the
movie]]
• We need to devise rules to handle these constructions:
NP -> NP and VP
VP -> VP and NP
S -> S and S
Sentence Level Constructions – cntd.,
Agreement:
• Most verbs use two different forms in present tense – one for third
person singular objects and other for all kinds of subjects.
• Third person singular ends with –s.
• Whenever there is a verb that has some noun acting as a subject this
agreement has to be confirmed.
• Example for how the subject NP affects the form of the verb:
Does [NP Priya] sing? - subject NP is singular so –es is used
Do [NP they] eat? - subject NP is plural so do is used.
• Sentences in which subject and verb do not agree are ungrammatical.
For ex: [Does] they eat?
[Do] she sings?
Sentence Level Constructions – cntd.,
• Rules that handle yes-no question for the previous sentence is
S -> Aux NP VP
• Based on subject-verb agreement we replace this rule as follows:
S -> 3sgAux 3sgNP VP
S -> Non3sgAux Non3sgNP VP
• We could add rules for the lexicon:
3sg Aux -> does | has | can
Non3sg Aux -> do | have | can
• Similarly, rules for 3sgNP and Non3sgNP need to be added.
3sgNP -> (Det) (AP) SgNom (PP)
Non3sgNP -> (Det) (AP) PlNom (PP)
SgNom -> SgNoun | SgNoun SgNom
PlNom -> PlNoun | PlNoun PlNom
SgNoun -> Priya | lake | banana | sister | …
PlNoun -> Children | ….
Sentence Level Constructions – cntd.,
• We also have to add rules for the first and second person pronouns.
• The number of agreement doubles the size of the grammar.
• Introduce a new version of NP and noun rules for various cases.
• Nominative (I, she, they, he) and accusative (me, her, him, them) cases
of pronoun.
• Hindi and Urdu which have not only noun-verb agreement but also
gender agreements so CFG cannot handle this problem efficiently.
• We solve this over generation and loss of generality problem we can
use feature structures.
• Feature structures are able to capture grammatical properties without
increasing the size of the grammar.
• Models based on this idea are called constraint-based formalisms.
Sentence Level Constructions – cntd.,
Feature Structures:
• Set of feature-value pairs.
• They can be used to efficiently capture the properties of grammatical
categories.
• Features are simply symbols representing properties.
• For example the number property of a noun phrase can be represented
by NUMBER feature.
• The value will be SG (singular) and PL (plural).
• It is represented by a matrix like diagram called attribute value matrix
(AVM).
Sentence Level Constructions – cntd.,
• An AVM consisting of a single NUMBER feature with the value SG is
rep as [NUMBER SG]
• The value of a feature can be left unspecified and rep by an empty pair
of square brackets [ NUMBER []]
• The third person singular noun phrase is

• The third person plural noun phrase is:


Sentence Level Constructions – cntd.,
• Consider the case of combining the NUMBER and PERSON features
into single AGREEMENT feature.

• Two most important operations we need to perform that is merging the


information content of two structures are similar and rejecting the
structures that are incompatible.

• The operation is called unification it is implemented as binary operator


(U) that takes two feature structures as arguments and returns a
merged feature structures if they are compatible otherwise reports a
failure.
[NUMBER PL) U [NUMBER PL] = [NUMBER PL]
Sentence Level Constructions – cntd.,
• The unification succeeds as the two structures have the same value for
the NUMBER feature.
• A feature with an unspecified value in one structure can be matched
with any value in a corresponding feature in another structure.
[NUMBER PL] U [NUMBER []] = [NUMBER PL]
• The value PL of the first structure matches the value [] of the second
structure and becomes the value of the NUMBER feature of the output
structure.
• [NUMBER PL] U [NUMBER SG] Fails
• The CFG rules can have feature structures attached to them to realize
the constraints on the constituents of the sentence.

You might also like