Class Notes of NLP - 5

Download as pdf or txt
Download as pdf or txt
You are on page 1of 79

The main goal of NLP is to build computational models of natural language

for its analysis and generation.


In particular this work is interdisciplinary field called computational linguistics
driven from researches in AI .There are two primary motivations for this type of research.
First the technological motivation is to build intelligent computer systems.
!econd the linguistic and cognitive science motivation is to gain a better
understanding of how humans communicate by using natural language.
The tools of work in NLP are grammar formalisms, algorithms and data structures,
formalism for representing world knowledge, reasoning mechanism, etc.
These have been taken from computer science AI linguistics logics and philosophy.
Theoretical linguists are primarily interested in producing a structural description of
natural language. They do not consider the details of the way that actual sentences might
be generated from structural descriptions. The ma"or constraint of linguists is to
characteri#e the general organi#ing principles that underline all human language.
Goal: The goal of theoretical linguists is a formal specification of linguistic structure
both in the form of constructive rules that define the range of possible structures and in
the form of constraints on the possible allowable structures.
Applications of NLP:
$. Natural Language Interface to databases.
%. Natural Language Interface to computers. &'(ample)* to assist a new user to
+NI, -! developed at .erkeley/.
0. 1uestion answering systems. &'(ample)* 'LI2A*L+NA3 by woods in $445/.
6. 7achine Translation !ystem.
8. Te(t analysis systems.
9. !peech understanding systems and generating systems.
5. :omputer aided Instruction system &'(ample)* :AL and etc./
Knowledge and Language:
A language comprehension program must have considerable knowledge about the
structure of the language itself including
-;hat the words are
* <ow to combine words into sentences
=eveloped by =r +mesh :handra >aiswal
* ;hat the words mean
* <ow these word meanings contribute to the sentence meaning and so on
<ence there are different forms of knowledge which have been enlisted as
follows)
Phonetic and phonological knowledge This concerns to how words are
reali#ed as sounds.
!orphological Knowledge ?<ow words are constructed out of more basic
meaning units called morphemes. For e"ample ? word friendly from root form
friend and the suffi(*ly.
#$ntactic Knowledge
#emantic Knowledge This concern to what words mean and how these
meanings are combined in sentences to form sentence meanings.
Pragmatic Knowledge concerns how sentences are used in different conte(ts
and affects the interpretation of the sentence.
%orld Knowledge This includes the general knowledge about the structure of
the world that language users must have in order to maintain conversation.
&iscourse Knowledge !tudy of linguistic units larger than a single utterance.
Parts of #peech:
;ords are divided into different kinds or classes called Parts of !peech
according to their use in the sentence that is according to the work they do in a
sentence. The parts of speech are eight in numbers)
$. Noun: A noun is a word used as the name of a person place or thing.
'(ample * Akbar was a great king.
* New =elhi is the capital city of India.
* The sun shine bright.
* <is courage won him honor.
The word thing includes
* All ob"ects that we can see hear taste touch or smell.
* !omething that we can think of but cannot perceive by the
senses.
%. Ad'ecti(e: An ad"ective is a word used to add something to the meaning of a
noun@ as
* <e is a brave boy.
* There are twenty boys in this class.
0. Pronoun: A pronoun is a word used instead of noun.
* >ohn is absent because he is ill.
=eveloped by =r +mesh :handra >aiswal
* The books are where you left them.
6. )er*: A verb is a word used to say something about some person place or
thing.
* The girl wrote a letter to her cousin.
* :alcutta is a big town.
* Iron and copper are useful metals.
8. Ad(er*: An adverb is a word used to add something to the meaning of a verb an
ad"ective or another adverb.
* <e worked the sum Auickly.
* This flower is very beautiful.
* !he pronounced the word Auite correctly.
9. Preposition: A preposition is a word used with a noun or a pronoun to show how
the person or thing denoted by the noun or pronoun stands in
relation to something else.
* There was a cow in the garden.
* The girl is fond of music.
* A fair little girl sat under a tree.
5. +on'unction: A con"unction is a word used to "oin words or sentences.
* 3am and <ari are cousins.
* Two and two make four.
* I ran fast but missed the train.
B. ,nter'ection: An inter"ection is a word which e(presses some sudden feelings.
* <urrayC ;e have won the game.
* AlasC !he is dead.
;e cannot say to which part of speech a word belongs unless we see the use of the word
in a sentence.
* They arrive soon after. &Adverb/
* They arrive after us. &Preposition/
* They arrive after we had left. &:on"unction/
Kinds of Noun:
+ommon Noun - .oy girl city town.
Proper Noun - <ari !ita Dorakhpur.
+ollecti(e Noun - :rowd mob team herd army fleet family and etc.
A*stract Noun - An abstract noun is usually the name of Auality action or state
considered apart from the ob"ect to which it belongs such as
-ualit$ - Doodness kindness honesty wisdom bravery and etc.
=eveloped by =r +mesh :handra >aiswal
Action - Laughter theft movement "udgment and etc.
#tate - :hildhood boyhood youth slavery sleep sickness death
poverty and etc

A*stract Nouns are formed
* From ad"ectives
* Eindness from kind.
* <onesty from honest.
* From verbs
* -bedience from obey.
* Drowth from grow.
* From common nouns
* :hildhood from child.
* !lavery from slave.
&i(ision of Noun based on gender
!asculine* male
.eminine ? female
+ommon - either male or female &Parent child pupil thief and etc./
Neuter - neither male nor female that is things without life are said to be of
neuter gender.
+lassification of Noun based on number such as
* !ingular
* Plural
%hen we make a sentence
*;e name some person, place or thing@ and
* !ay something about that person or thing
In other words we must have a sub"ect to speak about and we must say or predicate
something about that sub"ect.
<ence every sentence has two parts*
* !ub"ect of the sentence &The part which names the person place
or thing/
* Predicate of the sentence &The part which tells something
about the sub"ect/
=eveloped by =r +mesh :handra >aiswal
/"ample: The sun rises in the east.

!ub"ect Predicate
The sub"ect of the sentence usually comes first but sometimes it is put after
the predicate such as
* =own went the 3oyal Deorge.
* !weet are the uses of adversity.
In imperative sentences the sub"ect is left out such as
* !it down) &Fou is understood/
* Thank him. &Fou is understood/
The Phrase) A group of words which makes some sense but not complete sense is called
phrase.
'(ample) * The sun rises in the east.
* There came a giant to my door.
* It was a russet of great beauty.
* <e has chain of gold.
<e has a chain which is made of gold.
7ain :lause !ub"ect :lause Predicate
;e cannot start while it is raining.
7ain :lause !ub"ect :lause Predicate
#u*'ect: It may be a single word a single noun or pronoun or a group of words that
belong with noun or cluster around it. A sub"ect has a noun &a <ead word/ and
certain modifiers. The modifiers are as follows)
$. 0estrictor) words like* especially only merely "ust almost particularly even.
%. Pre-determiners: words like* half double both one third twice all of and etc.
=eveloped by =r +mesh :handra >aiswal
0. &eterminers: These words include
a/ Article a an the.
b/ &emonstrati(es This that these those.
c/ Possessi(es my his own 3amGs etc.

6. 1rdinals: words like) * first third second last ne(t etc.
8. -uantifiers: words like ? many several few less etc.
9. Ad'ecti(e Phrase: good long fall etc. intensifier and ad"ective such as
* Hery good very fall etc.
5. +lassifiers: - A city college
* A leather purse
* A summer dress
2is last pla$ A (er$ nice shirt
#u*'ect #u*'ect
det. ord. Noun
det. Ad'. Phrase noun
poss.
Art ,nt Ad'.
2is Last Pla$
a (er$ nice shirt
All the famous (ictories 2er old leather shoes

#u*'ect #u*'ect

=eveloped by =r +mesh :handra >aiswal
Pre.det det. Ad'. Noun det. Ad'. +lass Noun
Prepositional Phrase :

Prepositional Phrase

Preposition Noun Phrase
/(ample) The *o$ on the *ridge

#u*'ect

NP Prep. Phrase
&et. Noun Prep. NP
Art det. Noun
The *o$ on the *ridge
Predicate: This is also called verbal group or verbal phrase.
This verbal group may be followed by NP adverb and so on. This may be defined as
)G
Au(iliary 7ain verb
Au(iliary in turn is made up of the tense &compulsory item/ and any one or more of the
following items)
i. !odal: marked by modal au(iliaries such as can may will shall must etc.
=eveloped by =r +mesh :handra >aiswal
ii. Perfecti(e: marked by have 3 en@ where en is a marker of the past participle
morpheme.
iii. Progressi(e: marked by be I ing.
)G

Au". )er*

Tense 7odal Perfective Progressive
4asic sentence patterns)
A basic sentence &or a kernel sentence/ is the simplest form of
sentence which is simple &not comple( or compound/ declarative and affirmative and is
in the active voice.
!uch sentences can be broadly classified into five different patterns)
* Two of these patterns are intransitive.
&+sing such verbs as do not take ob"ect/.
* Three of these patterns are transitive.
,ntransiti(e Predicate Phrase Patterns:
Pattern-,: Herbal group only or verbal group I Ad"unct.
Ad'unct: An ad"unct is a part of the sentence that can be taken out without breaking
the structure of the sentence.
'(amples)
$. 3amesh died yesterday at Ludhiana.
Nuclear Ad"unct
Part
%. I saw him in the theatre.
Nuclear Ad"unct
0. <e is in the theatre now.
Nuclear Ad"unct
/"ample for Pattern-,
$. <e passed away.
=eveloped by =r +mesh :handra >aiswal

!ub. HD
%. The car turned into a narrow lane.

!ub. HD Ad"unct
0. They will write about it to the governer.
!ub. HD Ad"unct Ad"unct
Pattern-,, )Herbal Droup I :omplement &IAd"unct/
The complement may be a noun phrase an adverbal prepositional phrase or
an ad"ective phrase.
i. 3ita was a damned witch.
!ub. HD :omplement&NP/
ii. 3ita was in a fi(.

!ub. HD Prep. Phrase
iii. 3ita is beautiful.

!ub. HD Ad"ective
iv. 3ita is there.
!ub. HD Adverbia
v. <e became nasty in course of time.
!ub. HD :omp. Ad"unct
As per the above e(amples it is evident that all verbal groups cannot take all the four
above categories of complements. =epending upon the categories the verbal group can
take the complements@ these HDs can be divided into si( categories)
=eveloped by =r +mesh :handra >aiswal
5. 4e-t$pe :6 is, am, are, was, were, *e, *een, *eing7
This can take all four categories as complements.

'(amples)
* <e is an interesting person.

HD
* <e was very nice.
Ad". Phrase
* <e has been in a fi(.
Prep. Phrase
* ;e are there.
Adverbial
%. 4ecome t$pe: This can take noun phrase and an ad"ective phrase as complements.
* <e became a terrorist.
NP
* <e became powerful.
Ad". Phrase
One cannot say
*He became in Jalandhar.
or
*He became there.
* <e appears a fool.

=eveloped by =r +mesh :handra >aiswal
NP
0. #mell-t$pe: This can take only ad"ective phrase.
* The pudding tastes delicious.

Ad".Phrase
* The soup smells horrible.
Ad". Phrase
* The king felt helpless.
Ad". Phrase
6. 2a(e-t$pe: This can take only noun phrase as complements.
* <e has a pen.
NP
* !ita resembles her mother.
NP
* A television costs ten thousand rupees.
NP
* This color suits you.
NP
Transiti(e Predicate Phrase:
Pattern ,,,: Herbal Droup I -b"ect &IAd"unct/
* <e is playing cricket these days.

!ub. HD -b". Ad"ustment
=eveloped by =r +mesh :handra >aiswal
* 'verybody knows her style.
!ub. HD -b".
* Fou should do your duty.
!ub. HD -b".
* <e looked up the word in the dictionary.

!ub. HD -b". Ad"unct
Pattern ,): Herbal Droup I =irect Droup I Indirect -b"ect &I Ad"unct/
* I am teaching you grammar.

HD Ind. -b". =ir. -b".
* 7y father gave me a pen yesterday.

!ub. HD Ind. =ir.-b" Ad"unct
-b".
* <e bought her a book.
HD Ind. =ir.-b".
* <e bought a book for her.
Note: ;hen direct ob"ect comes before the indirect ob"ect the latter takes a preposition
before it.
<e teaches us 'nglish.
<e teaches 'nglish to us.
=eveloped by =r +mesh :handra >aiswal
Pattern ): Herbal Droup I -b"ect I :omplement &IAd"unct/
-b"ective !ub"ective
:omplement :omplement
A complement may be
NP
Ad". Phrase
An adverbial
A prepositional phrase
* <e left her a widow.
-b". -b". :omp.
* ;e found her uncontrollable.

HD -b". -b". :omp.
* They left us in the ground yesterday.
-b". -b".:omp. Ad"unct
Am*iguities:
They called her a ta(i. 10 They called her a ta(i.

HD -b". -b".:omp. Ind.-b". dir.ob".

;e have two meanings)*
* !he was nicknames a Jta(iG by them. -3
* They called a ta(i for her.
The magician made him a stream*engine.

HD Ind.-b". dir.-b"

=eveloped by =r +mesh :handra >aiswal
;e have two meanings)*
* The magician made a steam*engine for him.
The magician made him a stream*engine.
-b". -b".:omp.
* The magician changes him into a steam*engine by magic.
=eveloped by =r +mesh :handra >aiswal
,mmediate +onstituent Anal$sis 8or ,+ Anal$sis9
In order to study the structure of a sentence the structure linguists thought of
dividing a sentence into its immediate constituents &or I:s/. The principles was that of
cutting a sentence into two further cutting these two parts into another two and continue
the segmentation till the smallest unit.
'(ample)
A young girl with an umbrella chased the boy.
$ %
$ and % are called constituents.
Further
A young girl with an umbrella chased the boy.
$A $. %A %.

A young with an chase KPastL the boy
girl umbrella

young girl an umbrella
!egmentation using a tree diagram

#entence

!ub. Predicate
NP Pre.Phrase HD NP
=et. Ad". N Pre. NP Tense H. det. Noun
A young girl with det. N Past chase the boy
Art.

An umbrella
This type of analysis of a sentence is called Immediate Constituent Analysis (IC
Analysis).
=eveloped by =r +mesh :handra >aiswal
Perform ,+ anal$sis of the following sentences:
* Kapil has *een pla$ing cricket for se(eral $ears.
* After depositing the fees the *o$s went to the hotel.
* The girls ha(e *een singing nicel$.
Limitations:
There are some sentences whose I: analysis is not possible as they do not
form proper grammatical group.
'(ample) *
* !he is taller than her sister.
This is not covered in I: analysis.
* Time flies.
This has two meanings)
Time is flying.
Time the flies. &Time as verb/
* >ohn is easy to flatter.
* >ohn is eager to flatter.
!eparate analysis is reAuired)
* It is easy. !omeone flatters >ohn.
* >ohn is eager. <e wants to flatter.
=eveloped by =r +mesh :handra >aiswal
#tructures:
5. !ub"ect I Herb
* .irds fly.
* Fire burns.
* The baby is crying.
* The bell has rung.
M
:. !ub"ect I Herb I !ub :omplement.
* This is a pen.
* Dopal looks sad.
* 7y father grew angry.
M


;. !ub"ect I Herb I direct ob"ect.
* I know his address.
* The boy has lost his pen.
* ;e should help the poor.
M
<. !ub"ect I Herb I direct ob"ect I preposition I
Prepositional ob"ect.
* I lent my pen to a friend of mine.
* <e told the news to all of us.
* <e promised the money to me.
M

=. !ub"ect I Herb I indirect ob"ect I direct ob"ect.
* I lent her my pen.
* ;e have paid him the money.
* Fou must tell the police the truth.
M
>. !ub"ect I Herb I NounNPronoun I ad"ective.
* The boy pushed the door open.
* The smith beat it flat.
* !he washed the plates clean.
M
=eveloped by =r +mesh :handra >aiswal
?. !ub"ect I Herb I preposition I Prepositional ob"ect.
* ;e are waiting for !uresh.
* <e agreed to our proposal.
* <e failed in his e(amination.
M

@. !ub"ect I Herb I to*infinitive &as ob"ect of the verb/
* !he wants to go.
* I forgot to post the letter.
* <e decided not to go there.
M
A. !ub"ect I Herb I nounNpronoun I to*infinitive.
* I would like you to stay.
* <e helped me to carry the bo(.
* I cannot allow you to smoke.
M

5B. !ub"ect I Herb I gerund.
* !he began singing.
* <e has finished talking.
* I hate borrowing money.
M
55. !ub"ect I Herb I nounNpronoun I present participle.
* I saw him crossing the bridge.
* ;e smell something burning.
* They found him playing cards.
M
5:. !ub"ect I Herb I nounNpronoun I plain infinitive.
* I saw him go out.
* !he saw him steal watch.
* ;e heard her sing.
M
5;. !ub"ect I Herb I nounNpronoun I past participle.
* I heard my name called.
* I want this letter typed.
* Fou should get that tooth pulled out.
M
=eveloped by =r +mesh :handra >aiswal
5<. !ub"ect I Herb I nounNpronoun I &to be I/ complement.
* I consider the plan &to be I/ unwise.
* ;e thought him &to be/ foolish.
* The court appointed her guardian of the orphan child.
M
5=. !ub"ect I Herb I that clause &ob"ect of the verb/
* I suppose that he is not at home.
* <e admitted that he had written the letter.
* The teacher said that he was very busy.
M

5>. !ub"ect I Herb I Interrogative I to*infinitive.
* I do not know how to do it.
* I wonder where to spend the week*end.
* !he knows how to drive car.
M
5?. !ub"ect I Herb I nounNpronoun I interrogative I
infinitive.
* I shall show you how to operate it.
* <e has taught me how to play chess.
* ;e asked him where to get tickets.
M
5@. !ub"ect I Herb I interrogative I clause.
* I asked where he was going.
* I wonder what he wants.
* Tom could not decide what he should do ne(t.
M

5A. !ub"ect I Herb I nounNpronoun I interrogative I clause.
* !he asked me when you had gone.
* I showed them how they should do it.
M
=eveloped by =r +mesh :handra >aiswal
Context Free Grammars

Let us consider the following :FD)
# NP )P
)P )/04 NP
NP NA!/
NP A0T N1CN
In this ! NP HP are called non terminal symbols and N-+N A3T H'3. are
terminals.
The terminal symbols are word categories and a structure called le(icon
maintains a list of all words that fall in each category. A word may be listed under
multiple categories.
.or e"ample* can would be listed under H'3. and N-+N.
There are two simple parsing techniAues for :FDs such as Topdo!n and "ottomup
parsing.
Top*down parsing begins with ! and rewriting it) * such as NP HP. These symbols
may themselves be written as per the rewrite rules. Finally terminal symbols such as
N-+N may be written from le(icon.
'(ample) >ohn ate an apple.
Parse tree
#
NP HP
NA7' H'3. NP
>ohn ate A3T N-+N
an apple
=eveloped by =r +mesh :handra >aiswal
Possible Top*=own parsing would be as follows)
! NP HP
NA7' HP Orewriting NPP
>ohn HP Orewriting NA7'P
>ohn H'3. NP Orewriting HPP
>ohn ate NP Orewriting H'3.P
>ohn ate A3T N-+N Orewriting NPP
>ohn ate an N-+N Orewriting A3TP
>ohn ate an apple Orewriting N-+NP
A possible bottom*up parsing of the sentence would be as follows)
>ohn ate an apple.
NA7' ate an apple. Orewriting >ohnP
NA7' H'3. an apple. Orewriting ateP
NA7' H'3. A3T apple. Orewriting anP
NA7' H'3. A3T N-+N Orewriting appleP
NP H'3. A3T N-+N Orewriting NA7'P
NP H'3. NP Orewriting Art NounP
NP HP Orewriting Herb NPP
! Orewriting NP HPP
Now consider the following :FD)
! NP HP
NP A3T N-+N
NP NA7'
HP H'3.
HP H'3. NP
HP H'3. NP PP
HP H'3. PP
PP P3'P NP
For simple class of declarative 'nglish sentences)
:onsider the following sentences)
* >ohn saw the cat by the pond.
=eveloped by =r +mesh :handra >aiswal
* The dog barked in the house.
Find possible parsing of these sentences.
The above grammar will also accept the following sentences)
*The dog allows the house.
*>ohn barked the cat by the pond.
This is because the grammar does not encode any information as to what verbs
may take ob"ects and what prepositions are appropriate for each verb.
=eveloped by =r +mesh :handra >aiswal
#imple Transition Network
This is another grammar representation. This formalism is based on the notion of a
transition network consisting of nodes and labeled arcs.
:onsider the following network named NP)
NP)
art noun pop
Ad"
'ach arc is labeled with a word category.

!tarting at a given node you can traverse an arc if the current word in the sentence
is in the category on the arc. If the arc is followed the current word is updated to the ne(t
word.
A phrase is legal NP if there is a path from node NP to a pop arc &an arc labeled
pop/ accounting for every word in the phrase. This network recogni#es the same set of
sentences as the following :FD)
NP A3T NP$
NP$ A=> NP$
NP$ N-+N
:onsider the parsing of the noun phrase a purple cow with preceding network.
!tarting at node NP you can follow the arc labeled art since current word is an
article named a.
From node NP$ you can follow the arc labeled ad" using ad"ective purple#
and finally again from NP$ you can follow the arc labeled noun using noun cow.
since we have reached a pop arc a purple co! is a legal noun phrase.
!imple transition network formalism is not powerful enough to describe all
languages that can be described by :FD. To get the descriptive power of :FDs there is
reAuirement of recursion in network grammar.

=eveloped by =r +mesh :handra >aiswal
NP
NP
$
NP
%
A recursive transition network &3TN/ is like simple transition network e(cept that
it allows arc labels that refer to other networks rather than word categories.

A recursive network for simple 'nglish sentences can be e(pressed as shown
below)

NP verb NP pop
!)

Cppercase la*els refer to network
The arc from ! to !$ can be followed only if the NP network can be successfully
traversed to a pop arc. 3TN allows true recursion i.e. a network might have an arc labeled
with its own name.
Let us see arc labels for 3TNs)
Arc T$pe /"ample 2ow used
:AT noun !ucceeds only if the current
word of the named category
;3= of !ucceeds only if the current
word is identical to the label
P+!< NP !ucceeds only if the named
network can successfully
traversed
>+7P "ump Always succeeds
P-P pop !ucceeds and signals the
end of the network
Now consider finding a path through the ! network for the
following sentence)
The purple cow ate the grass.
First from ! to NP now there is a need to traverse NP network.
Following arc pop return to ! network and traverse the arc to node !$ from node !$
follow the arc labeled verb using the word ate.
=eveloped by =r +mesh :handra >aiswal

!
!
$
!
%
!
0
Finally arc labeled NP can be followed if NP network is traversed again. Now
remaining input consist of words the grass.
Now take the pop arc from NP% and another pop from node !0.
!ince the network is traversed and used all the words in the sentence. <ence the given
sentence is accepted as a legal sentence.
Another e"ample:
5. :onsider a particular language L$ where the only legal sentences consist of strings of
letters in alphabetical order. For e(ample* abd ad bcd b and abcd are legal sentences.

The transition network for this language is as follows)
d
c
b
a * c d
pop

"ump "ump "ump
:. :onsider another language L% that consists only of sentences that have a seAuence of
as followed by an eAual number of bGs ? that is ab aabb aaabbb and so on.
+.G for L::
!ab
!a!b
0TN for L::
a b pop

!
Top &own Parsing !ethods:
Top down starts from the representation of a sentence and decomposing this
representation into its sub constituents and then decomposing the sub constituents until
you derive specific word classes that can be checked against the actual input sentence.
=eveloped by =r +mesh :handra >aiswal
!
!
$
!
%

!$

!%

!8 !6
!0
Top &own Parsing with 0TN:
The state of the parse at any moment can be represented by the following)
+urrent Position - record of what part of sentence has not yet been parsed
+urrent Node - the node at which you are located in the network
0eturn Point - if you are in a network because of a call from another network you
need to record the node in the other network where you will continue
if you pop from the current network.
If 3TN contains only cat push and pop arcs then this algorithm converts to a full
search for the entire set of arcs using a techniAue called backtracking.
:onsider a situation where you are in the middle of a parse try to follow an arc
leaving the current node that can be traversed successfully as one of the cases in the
following algorithm.
.ig-,
Art noun pop
NP) $ $ % % $
Number
%
$ ad"
0
pronoun

!) NP verb pop
%
$ NP
The numbers on the arcs simply indicate the order in which arcs will be tried when more
than one arc leaves a node.
=eveloped by =r +mesh :handra >aiswal
NP
NP
$
NP
%
! !$ !%
+ase5:* If arc names a word category and ne(t word in the sentence is in that category
Then
$. +pdate current position to start at the ne(t word.
%. +pdate current node to the destination of the arc.
+ase::- If arc is a push arc to a network N
Then
$. Add the destination of the arc onto return points.
%. +pdate current node to the starting node in the network N.

+ase;:- If arc is a pop arc and return points list is not empty
Then
3emove the first return point and make it current node.
+ase<:- If arc is a pop arc and the return points list is empty and there are no words left
Then
Parse completes successfully.
+onsider the following le"icon and 0TN 8a grammar9 of fig. , of pre(ious page
art the a
number one
pronoun one
ad"ective wild green
noun dogs men saw green
verb cried saw broke faded man
+onsider the following sentence:
$
-ne
%
saw
0
the
6
man.
8
<ere the parser begins with the NP one saw but fails to find verb it backtracks and finds
a successful parse starting with NP one &pronoun/
A top-down 0TN parse with *acktracking:
=eveloped by =r +mesh :handra >aiswal

#tep +urrent #tate Arc .ollowed 4ackup #tates
$. &! $ NIL/ !N$ NIL
%. &NP $ &!$// NPN$&Q NPN0 NIL
for backup/
0. &NP$ % &!$// NP$N% &NP% % &!$//
6. &NP% 0 &!$// NP%N$ &NP% % &!$//
8. &!$ 0 NIL/ no arc can be &NP% % &!$//
Followed
9. &NP% % &!$// NP%N$ NIL
5. &!$ % NIL/ !$N$ NIL
B. &!% 0 NIL/ !%N% NIL
4. &NP 0 &!%// NPN$ NIL
$R. &NP$ 6 &!%// NP$N% NIL
$$. &NP% 8 &!%// NP%N$ NIL
$%. &!% 8 NIL/ !%N$ NIL
$0. The parse succeeds.
:urrent parse state &:urrent node :urrent position return points/
Parsing is a special case of search.
=F! .F!

+onsider the following sentence:
$
The
%
wild
0
dogs
6
cried.
8
A trace of a top-down parse using 0TN of .ig. ,.
#tep +urrent
Node
+urrent
position
0eturn
Points
Arc
.ollowed
+omments
$. &! $ NIL/ !N$ Initial position
%. &NP $ &!$// NPN$ Followed push arc to
NP network to return to
!$
0. &NP$ % &!$// NP$N$ followed arc$
6. &NP$ 0 &!$// NP$N% followed arc6 to NP$
again
8. &NP% 6 &!$// NP%N% followed arc8 since arc6
was not applicable
=eveloped by =r +mesh :handra >aiswal
9. &!$ 6 NIL/ !$N$ the pop gets in back to !$
5. &!% 8 NIL/ !%N$ followed arc5
B. parse succeeds on pop arc
from !%
+onsider the sentence:
The green faded.
It would fail because it will classify green as ad" and then not be
able to find a noun.
+onsider the following +.G:
$. ! NPHP 8. HPH'3.
%. NPA3T N-+N 9. HPH'3. NP
0. NPNA7' 5. HPH'3. NP PP
6. PPP3'P NP B. HPH'3. PP
Now !entence)
$
The
%
dogs
0
cried.
6
Top*down depth first parse for the :FD
#tep +urrent
#tate
4ackup #tates Position +omment
$. &!/ $ Initial Position
%. & NP HP/ $ 3ewriting ! by rule $
0. &A3T N-+N
HP/
$ 3ewriting NP by rule % and
0
&NA7' HP/ $
6. &N-+N HP/ % 7atching A3T with the
&NA7' HP/ $
8. &HP/ 0 7atching N-+N with do$s
&NA7' HP/ $
9. &H'3./ 0
&H'3. NP/ 0 3ewriting HP by rule 8*B
&H'3. NP PP/ 0
&H'3. PP/ 0
&NA7' HP/ $
=eveloped by =r +mesh :handra >aiswal
5. The parse succeeds as
H'3. is matched to cried
leaving an empty
grammatical symbol list
with an empty sentence
4ottom up parsing:
.ottom up parsing approach for 3TN become very comple( hence it is considered
for only Top*down approach in 3TN.
In a bottom up parser we use the rule to take a seAuence A3T A=> N-+N that you
have found and identify it as NP.
The basic tool for bottom*up parsing is to take a seAuence of symbols and match it
to the right hand side of our rules. 7atches are always considered from the point of one
symbol called key. To find rules that match a string involving the key look for rules that
start with key or for rules that have already been started by earlier keys and reAuire the
present key either to complete the rule or e(tend the rule.
Let us consider the following :FD)
$. ! NP HP
%. NP A3T A=> N-+N
0. NP A3T N-+N
In the above grammar if you start with A3T in the input as key then rule %and 0
are matched. To record this for analy#ing the ne(t key you need to record that rule % and
0 could be continued at the point after the A3T. Fou denote this fact by writing the rule
with a dot &./ indicating what has been seen so far. Thus you record
%. NPA3T. A=> N-+N
0. NPA3T. N-+N
If ne(t key is an A=> then rule 6 may be started and the modified rule % may be
e(tended to give
:. NPA3T A=>. N-+N
;e keep a record of the state of a bottom*up parse in a structure called a chart.
This structure is a record of the position of the words and the new structures derived
from the sentence.
=eveloped by =r +mesh :handra >aiswal
The chart also maintains the record of rules that have matched previously but are not
completed. Fou record these rules as active arcs on the chart.
For the previous discussion the chart is as follows)
FID*$
A3T$ A=>$
NPA3T. N-+N NPA=>. N-+N

NP A3T. A=> N-+N


NPA3T A=>. N-+N
In the above chart there are two completed constituents ? namely A3T$ and A=>$
and four active arcs)
* Two possible NPs beginning with A3T from $and % and an NP
beginning with an A3T and A=> from $ to 0 and NP beginning
with A=> from % to 0.
.or e"ample consider using the algorithm on the sentence
The large can can hold the water with the following le(icon)

The) A3T
large) A=>
can) A+, N-+N H'3.
hold) N-+N H'3.
water) N-+N H'3.
!ince the key list is stack new keys derived by rules matched by the entry of one of
these words will be processed before the ne(t word entry is considered.
:onsider the trace of the parse. The key list is initially empty so the word the is
read and the constituent A3T$ placed on the key list.
'ntering A3T$) &the from $ to %/
Adds an active arc NP A3T. A=> N-+N from $ to %
Adds an active arc NP A3T. N-+N from $ to 0
=eveloped by =r +mesh :handra >aiswal
These arcs are added by the step % of the algorithm and were derived from rules % and 0.
Ne(t word large is read a constituent A=>$ I created.
'ntering) &large from % to 0/

Adds arc NPA=>.N-+N from % to 6 &step%/
Adds arc NPA3T A=>. N-+N from $ to 0&step 0/
This is added here is an e(tension of the first active arc added with A3T$ and results
from step 0 of the algorithm.
This chart we have already referred in previous pages.
Notice that active arcs are never removed from the chart even when the arc from rule
% from $ to % was e(tended producing the arc from $ to 0 both arcs remained on the
chart. This is necessary because the arcs could be used again in different way by another
interpretation.

The ne(t word can three constituents N-+N$ A+,$ and H'3.$ are created from
its three interpretation.
'ntering N-+N$) &can from 0 to 6/
No active arcs are added in step % but two are completed in step 0 by N-+N$
producing two NPs which are added to key list in step 6.
First NP from $ to 6 is constructed from rule %.
!econd NP from % to 6 is constructed from rule 6.
These NPs are now at the top of stack of keys.
'ntering NP$) an NP from $ to 6 adding active arc !NP.HP from $ to 6.
'ntering NP%) an NP from % to 6 adding arc !NP.HP from % to 6.
=eveloped by =r +mesh :handra >aiswal
FID*%



The large can

!NP.HP
NPA3T.N-+N
NPA3T A=>.N-+N
!NP.HP
NPA3T.A=> N-+N


NPA=>.N-+N
Now other senses of can are considered
'ntering A+,$) &can from 0 to 6/
Adding Arc HPA+,. H'3. NP from 0 to 6.
'ntering H'3.$) &can from 0 to 6/
Adding Arc HP H'3.. NP from 0 to 6.
The ne(t word read is can again and N-+N% A+,% H'3.% are created
'ntering N-+N%) &can from 6 to 8 the second can/
Adds no active arcs
'ntering A+,%) &can from 6 to 8/
Adds arc HP A+,. H'3. NP from 6 to 8
'ntering H'3.%) &can from 6 to 8/
Adds arc HPH'3.. NP from 6 to 8
Adds arc HPA+, H'3.. NP from 0 to 8
=eveloped by =r +mesh :handra >aiswal
NP % &rule 6/
NP $ &rule %/
A3T $ A=> $ N-+N $
The ne(t word is hold and N-+N0 and H'3.0 are created)
'ntering N-+N0) &hold from 8 to 9/
Adds no active arcs.

'ntering H'3.0) &hold from 8 to 9/
Adds arc HPH'3.. NP from 8 to 9
Adds arc HPA+, H'3.. NP from 6 to 9
FID*0
NP% &rule 6/
NP$ &rule %/
N-+N$ N-+N%
H'3.$

H'3.% H'3.0
A3T$ A=>$ A+,$ A+,% N-+N0
$ The % large 0 can 6 can 8 hold 9

! NP. HP
HPA+, H'3.. NP
NPA3T A=>. N-+N
HPA+, H'3.. NP
! NP. HP

The chart after adding hold omitting all active arcs covering only one position.
'ntering A3T%) &the from 9 to 5/
Adding arc
NP A3T. A=> N-+N from 9 to 5
Adding arc
NP A3T. N-+N from 9 to 5
'ntering N-+N 6) &water from 5 to B/
No active arc added in step %
An NP NP0 from 9 to B is pushed onto the key list by completing
Arc NP A3T. N-+N from 9 to 5
'ntering NP0) &the water from 9 to B/
A HP HP$ from 6 to B is pushed onto the key list by completing
=eveloped by =r +mesh :handra >aiswal
HPA+, H'3.. NP from 6 to 9
A HP HP% from 8 to B is pushed onto the key list by completing
HPH'3.. NP from 8 to 9
At this stage the chart is shown on previous page as FID*0.
'ntering HP% &hold the water from 8 to B/
No active arcs added
'ntering HP$ &can hold the water from 6 to B/
An ! !$ are added from $ to B by completing arc
!NP.HP from $ to 6
An ! !$ is added from % to B by completing arc
!NP.HP from % to 6
!ince we have derived an ! covering the entire sentence hence we stop here.
The final chart is shown in FID*8.
FID*6
NP% &rule6/
NP$ &rule %/
N-+N$ N-+N% NP0 &rule 0/
H'3.$ H'3.% H'3.0 H'3.6
A3T$ A=>$ A+,$ A+,% N-+N0 A3T% N-+N6
$ the % large 0 can 6 can 8 hold 9 the 5 water B
!NP.HP HPA+, H'3..NP
!NP.HP
The charts after all the NPs are found omitting all but crucial arcs.
FID*8
!$&rule $/
!%&rule$/
NP% &rule 6/ HP$ &rule8/
NP$&rule%/ HP% &rule9/
N-+N$ N-+N
%
NP0 &rule0/
H'3.$ H'3.% H'3.0 H'3.6
A3T$ A=>$ A+,$ A+,% N-+N0 A3T% N-+N6
$ the % large 0 can 6 can 8 hold 9 the 5 water B
The final chart position.
=eveloped by =r +mesh :handra >aiswal
Mixed Mode Methods
Top*down and bottom*up methods both have their advantages and disadvantages.
Top*down methods for instance have the advantage that they will never consider
word category in positions where they could not occur in a legal sentence. This is because
the top*down parser works from a syntactic category and checks the word whether the
word fits that category or not.
:onsider the following grammar)
$. ! NP HP 8. NP A3T A=> N-+N
%. ! NP A+, H'3. 9. NP A=> N-+N
0. ! NP H'3. 5. HP A+, H'3. NP
6. NP A3T N-+N B. HP H'3. NP
:onsider the sentence)
The can fell
<ere ! starts with NP HP &rule$/
Then NPA3T N-+N &rule 6/
Then !NP H'3. &rule 0/
The A+, and H'3. senses of can are never considered.
Now consider the sentence)
The bird sang.
It starts using rule $ finds NP
using rule 6 it finds the the,
using rule 6 it finds the bird,
using rule B it finds verb sang but not NP
<ence it backtracks uses rule % NP is parsed but A+, is not found.
It again backtracks uses rule 0 it finds NP and verb sang this way it succeeds
In the third time this problem can be avoided in the bottom up parsing.
=eveloped by =r +mesh :handra >aiswal
Now consider the following sentence)

$
The
%
green
0
water
6
evaporated.
8
The) A3T
green) A=> N-+N
water) N-+N H'3.
evaporated) H'3.
Pure Top*down works as follows)

+urrent state 4ackup state Position

&!/ NIL $
Note that a state generates new parse states by operating on its leftmost symbol. If it
names a word category the ne(t word in the sentence is checked@ otherwise the grammar
is used to rewrite the first symbol. 3eplacing ! using rules $ % and 0)
+urrent state 4ackup state Position
&NP HP/ $
&NP A+, H'3./ $
&NP H'3./ $

3ewrite NP in the current state using rule 6 8 Q 9)

+urrent state 4ackup state Position
&A3T N-+N HP/ &A3T A=> N-+N HP/ $
&A=> N-+N HP/ $
&NP A+, H'3./ $
&NP H'3./ $

The sentence is checked for an A3T and then a N-+N successfully finding the first
NP to be constructed but you would like to record the NP on the chart. .ut in pure top*
down there is no option for recording the seAuence A3T N-+N produced an NP.
=eveloped by =r +mesh :handra >aiswal
To record the NP the system should be e(tended to keep each symbol on the list
even after it has been rewritten. The system marks the symbol as being rewritten and
records the starting position of the phrase.
.or /"ample
If NP is rewritten at position $ it will put a new structure SNP$T called a
construction flag on the list when NP is rewritten. ;hen it arrives back at SNP$T in the
parse later it will be able to tell that it has "ust completed an NP structure that began at
position $.
=eveloped by =r +mesh :handra >aiswal
Revi sed Algorithm for Processing a Si ngle Posi ti on
5. If the leftmost symbol in the current state names an entry on the chart then generate
the new state&!/ by removing the symbol and updating the sentence position to the
position&!/ after the chart entry&ies/.
+urrent #tate 4ackup #tate Position

&NP HP/ NIL $

NP
NP
$ % 0 6 8
Two NPs are found on the chart and two new states are generated. -ne becomes new
current state and other one works as backup i.e. the resulting situation is

+urrent #tate 4ackup #tate Position

&HP/ %
&HP/ 6
:. If the leftmost symbol is a construction flag such as SNP$T add a constituent onto
the chart for symbol. The range NP is from starting position &$/ to the current
position.
;. -therwise if the symbol is a terminal symbol check the ne(t word in the sentence for
inclusion in the category and add to the chart if successful.
<. -therwise if the symbol is non*terminal symbol add a construction flag to the
position and rewrite the symbol as per grammar rules.
.or e"ample:
=eveloped by =r +mesh :handra >aiswal
Diven the state &NP HP/ at position $ and an empty chart three new states are
produced

A3T N-+N SNP$T HP
A3T A=> N-+N SNP$T HP
and A=> N-+N SNP$T HP all at position $.
.,G-5
NP$
A3T$ N-+N$
$ the % green 0 water 6 evaporated
=. -therwise this state is re"ected and a backup state is moved to become the current
state.

Let us parse the above sentence &The green water evaporated/ with this method or
algorithm.
If you start with symbol ! and position$ ! is rewritten as

+urrent state 4ackup state Position
&NP HPS!$T/ $
&NP A+, H'3. S!$T/ $
&NP H'3. S!$T/ $
3ewriting NP as per step6 produces
+urrent state 4ackup state Position
&A3T N-+N SNP$T HPS!$T/ $
&A3T A=> N-+N SNP$T HP S!$T $
&A=> N-+N SNP$T HP S!$T/ $
&NP A+, H'3. S!$T/ $
&NP H'3. S!$T/ $
The sentence is checked for A3T and N-+N successfully.
The current state after these operations
&SNP$T HP S!$T/ at position 0
=eveloped by =r +mesh :handra >aiswal
The construction flag SNP$T is processed as per step % by adding to the chart an NP
structure NP$ from position $ to 0. Fou will have following parser state the chart as
shown in FID*$ on previous page.
+urrent state 4ackup state Position
&HP S!$T/ 0
&A3T A=> N-+N SNP$T HP S!$T/ $
&A=> N-+N SNP$T HP S!$T/ $
&NP A+, H'3. S!$T/ $
&NP H'3. S!$T/ $
3ewriting HP produces
+urrent state 4ackup state Position
&A+, H'3. NP SHP$T S!$T/ 0
&H'3. NP SHP$T S!$T/ 0
&A3T A=> N-+N SNP$T HP S!$T/ $
&A=> N-+N SNP$T HP S!$T/ $
&NP A+, H'3. S!$T/ $
&NP H'3. S!$T/ $

The current state is registered since water cannot be classified as an A+,. The top
backup state becomes the current state and water is classified as a H'3.. .ut this is also
re"ected because no NP is following the verb.
The ne(t backup state succeeds since A3T can be found at position $ an A=>
&green/ at position % and noun &water/ at position 0 creating a second NP the following
is the situation and chart)
+urrent state 4ackup state Position
&HPS!$T/ 6
&A=> N-+N SNP$T HP S!$T/ $
&NP A+, H'3. S!$T/ $
& NP H'3. S!$/ $
=eveloped by =r +mesh :handra >aiswal
NP%
NP$
N-+N$ H'3.$
A3T$ A=>$ N-+N%
$ the % green 0 water 6 evaporated
3ewriting HP at position 6 in the current state creates the following situation
+urrent state 4ackup state Position
&A+, H'3. NP SHP%T S!$T/ 6
U &H'3. NP SHP%TS!$T 6
&A=> N-+N SNP$T HP S!$T/ $
&NP A+, H'3. S!$T/ $
&NP H'3. S!$T/ $
!ince no A+, at position 6 so the current state is re"ected. .y the first backup for
position 6 we find H'3. at position 6. .ut no NP after H'3. hence this also fails.
Ne(t backup state also fails because the cannot be an A=>. <ence the following two
states are left and the chart
+urrent state 4ackup state Position
&NP A+, H'3. S!$T/ $
U &NP H'3. S!$T/ $
Note that we have "ust finished every possible parse starting with ! being rewritten by
rule $. Now the chart will save considerable effort. There is no need to apply the rules for
NP at position $ ne(t the parser uses the two NPs already generated producing)
+urrent state 4ackup state Position
& A+, H'3. S!$T/ 0
&A+, H'3. S!$T/ 6
U &NP H'3. S!$T/ $
=eveloped by =r +mesh :handra >aiswal
The current state is re"ected as there is no A+, at position 0@ further first backup
state is also re"ected as no A+, at position 6. The correct interpretation is found by
continuing from state &NP H'3. S!$T/ once again we find two NPs on the chart
producing the following states)
+urrent state 4ackup state Position
& H'3. S!$T/ 0
&H'3. S!$T/ 6
The current state produces an ! structure from position $ to 0 but cannot account for
word evaporated. The backup state produces the desired analysis i.e.@ recogni#ing a
sentence of the form as given below in the tree diagram.
NP%
NP$
N-+N$ H'3.$
A3T$ A=>$ N-+N% H'3.%
$ The % green 0 water 6 evaporated
#
NP HP

A3T A=> N-+N H'3.

The green water evaporated
=eveloped by =r +mesh :handra >aiswal

;hatever we discussed so far was not able to characteri#ing certain forms of
dependencies between constituents such as sub"ect verb agreement verb transitivity and
etc. Now we will discuss the e(tension of 3TN i.e. augmented grammatical formalisms
that can deal with these issues.
If we need to analy#e a sentence further one structure we have seen earlier
that is parse tree.
For e(ample one noun phrase may be as syntactic sub"ect &!+./ and other as the
syntactic ob"ect &-.>/ within noun phrases you might identify the determiner structure
ad"ectives the head noun and so on.
For e(ample
>ack found a dime.
! !+. &NP NA7' >A:E/
7AIN*H found
T'N!' PA!T
-.> &NP ='T a
<'A= dime/
The above structure is created by 3TN parser by allowing each network to have a set
of registers@ these registers are local to each network. Therefore each time a new network
is pushed a new set of empty registers is created. ;hen the network is popped register
disappears. The registers can be set to values and values can be retrieved from registers.
In this case the registers will have the names of the slots used for each of preceding
syntactic structures. Thus NP network has registers named ='T A=>s <'A= and
N+7.
3egisters are set by actions that can be specified on the arcs.
;hen an arc is followed the action associated with it is e(ecuted. The most
common action involves setting a register to certain values and etc.
=eveloped by =r +mesh :handra >aiswal
;hen a pop is followed all the registers set in the current network are automatically
collected to form a structure consisting of Network name
List of registers with their values
An 3TN with registers and lists and actions on those registers is an
augmented transition network.
FID*$
NP Herb
A !imple transition network
Now the Auestion arises as to how an action gets a value by which a register is to
be set.
;hen a cat arc such as verb is followed the word in the input is put into a special
variable named VWX.
<ence an action from !$ to !% in the FID*$ would be to set the H'3. register to
the current word or written more concisely.
H'3. W
<ence action on the arc from ! to !$ might be
!+.W

If the sentence starts as The purple cowM . <ere the action would result in the
register !+. being set to the structured returned by the NP network such as
&NP A3T the
A=> &purple/
<'A= cow/
The registers can be used to make the grammar more selective without complicating the
network.
For e(ample) The number of first noun phrase must correspond to the number of verb.
Thus you cannot have a singular NP and plural verb.
The dog are sick The dog is sick.
This number agreement is crucial in disambiguating some sentences.
=eveloped by =r +mesh :handra >aiswal
!
!$
!%
:onsider the following sentences
Flying planes is dangerous
The sub"ect is the activity of flying planes.
Flying planes are dangerous.

The sub"ect is a set of planes that are flying.
<ence we should encode number information by classifying all words as
singular or plural separate grammar can be written. This can be implemented in an 3TN
as given below)
FID*%
NP*PL+3AL H'3.*PL+3AL
P-P
NP*!IND H'3.*!IND
ad"
Art*plural noun*plural pop
Ad"
Art*sing noun*sing pop
!imple 3TNs distinguishing singular and plural forms.
=eveloped by =r +mesh :handra >aiswal
!

!%
!0

!$
NP*PL+3AL
NP
$$P
P
NP%
NP*!IND
NP0
NP
6
A better solution is to allow words &and syntactic structures/ to have features as
well as a basic category. This can be done by using the slot value list notation. This
allows you to store number information as well as other useful information about the
word in a data structure called the le(icon.
Now e(tend the 3TN by adding a test to each arc in the network. A test is simply a
function that is said to succeed if it returns a non*empty value such as a set or atom and
to fail if it returns the empty set or nil. If test fails its arc is not traversed.
'(ample)
:onsider the following grammar. This grammar is capable of accepting
sentences involving intransitive or transitive verbs simple noun phrases consisting of a
proper noun &name/ or simple definite descriptions with ad"ectives. This also enforces
number agreement with le(icon given on ne(t page.
ad"
%
Art noun pop
NP) $ $
%

Name

NP Herb NP pop
!) $
%
>ump

%ord 0epresentation
=ogs &N-+N 3--T =-D
N+7 O0pP/
=og &N-+N 3--T =-D
N+7 O0sP/
The &A3T 3--T T<'
N+7 O0s 0pP/
=eveloped by =r +mesh :handra >aiswal
NP

NP$
NP%
! !$ !%

!0
A &A3T 3--T A
N+7 O0sP/
:ried &H'3. 3--T :3F
N+7 O0s 0pP/
Loves &H'3. 3--T L-H'
N+7 O0sP/
Love &H'3. 3--T L-H'
N+7 O0pP/
;ild &A=> 3--T ;IL=/
>ohn &NA7' 3--T >-<N/
L/D,+1N
Arc Test Actions
NPN$ none ='TW
N+7N+7W
NPN$ N+7 YN+7 <'A=EW
N+7 N+7 YN+7W
NP$N% none A=>!Append OA=>! WP
NP$N% none NA7'W
N+7N+7W
!N$ none !+.>W
!$N$ N+7
!+.>
Y N+7 7AIN*HW
N+7N+7
!+.>
YN+7
!%N$ -.>W
3egisters containing structures that themselves are the values of another register can be
accessed using subscript notations. Thus
=eveloped by =r +mesh :handra >aiswal
N+7
!+.>
This represents N+7 register of the structure in the !+.> register
and N+7W is the N+7 reg. of the structure in W * that is the structure created by
following the arc.
The values of registers are often viewed as sets and the intersection &Y/ and union
&U/ of sets is allowed to perform operations on different registers.
Append function is allowed )
'(ample) Append &A=>! W/
This returns the list in the registers A=>!
with values of W appended on the end.
A register without subscripts refers to a register of the current network.
Tests allowed include checking for a particular value in register &For e(ample
N+7
!+.>
Z0!/ and for nonnull intersection of two registers containing sets of
features &N+7 Y N+7/.

Now consider the following sentence
The dogs love >ohn
.
The ATN in previous grammar first we check agreement between the and dogs.
The can be either singular or plural but dogs must be plural so the noun phrase
constructed will have N+7 feature plural &as a result of the action on arc NPN$/
This NP is assigned to the !+.> register and then checked for agreement with
verb.
The following is the trace for the sentence)
$
The
%
dogs
0
love
6
>ohn.
8
#tep Node Position Arc .ollowed 0egister
$. ! $ !N$ Attempted &arc trace is
given below./
8. 0 !N$ succeeds !+.>&NP ='T the
<'A= dogs
N+7 O0pP/
!$ 0 !$N$ tests whether
O0pPY O0pP not empty
7AIN*Hlove
N+7 O0pP
9. !% 6 !%N$ &for recursive call see
ne(t table/
-.>&NP NA7' >ohn
N+7 O0sP/
4. !0 8 !0N$ succeeds since no 3eturns
=eveloped by =r +mesh :handra >aiswal
words left &! !+.> &NP ='T the
<'A= dogs
N+7 O0pP/
H'3. love
N+7O0pP
-.> &NP NA7' >ohn
N+7 &0s///
For recursive trace see the following Table

Trace of First NP call) Arc 9

#tep Node Position Arc .ollowed 0egister
% NP $ NPN$ ='T the
N+7 O0s0pP
0 NP$ % NPN$
:heck if
O0s 0pPY O0pP
Not empty
<eaddogs
N+7 O0pP
6 NP% 0 NP%N$ returns
&NP ='T the
<'A= dogs
N+7 O0pP/
Trace of !econd NP call)
#tep Node Position Arc .ollowed 0egister
5 NP 6 NPN% NA7'>ohn
N+7 O0sP
B NP% 8 NP%N$ returns
&NP NA7' >ohn
=eveloped by =r +mesh :handra >aiswal
N+7 O0sP/

Subj ect-Verb Agreement
;e have discussed about simple analysis of number agreement
between sub"ect and verb.
The other dimension along which sub"ect and verb must agree is the person.
Person is e(plicitly indicated in 'nglish in the pronoun system consisting of
First person I we
!econd person you
Third person he she it they
All non pronominal sub"ects are considered to be the third person. Let us
combine these features.
:onsider the following e(ample)
I love ;e love
Fou love Fou love
<eN!he loves They love
=eveloped by =r +mesh :handra >aiswal

Thus for love we can represent O$s %s $p %p 0pP
and for loves O0sP
Take another verb
saw O$s %s 0s $p %p 0pP
is O0sP
are O%s $p %p 0pP
am O$sP
and so on.
;ith these we can easily define a test called
Agr&feature$ feature%/
This takes two feature sets and computes their intersection. If this intersection is null
the test fails otherwise test succeeds and returns the value of intersection)
Thus Agr &O0s 0pP O$s %s $p %p 0pP/
!ucceeds with O0pP
Agr &O%s %pP O$s %s $p %p 0pP/
!ucceeds with O%s %pP
while Agr &O0sP O%s $p %p 0pP/
This fails.
=eveloped by =r +mesh :handra >aiswal
Auxil iar-Verb agreement

:onsider the following sentences
I can see the house.
I will have seen the house.
I was watching the movie.
I should have been watching the movie.
I will be seen at the house.
The (er* forms
.orms .eature Name /"ample
Infinitive inf go be say decideM
Present pres go goes am is say says...
Present Participle ing going being saying decidingM
Past Participle en gone been said decidedM
Past Participle past went was said decidedM

The rules are encoded as a procedure.
=eveloped by =r +mesh :handra >aiswal
Au( Agree &Herb au(*list/ this takes the ne(t verb &au(iliary or main/ in a
seAuence and checks whether it satisfies the restrictions of the last au(iliary seen &the last
element of au(*list/.
The procedure is as given below)

Au( Agree &v au(*list/
If au(*list Z nil
Then if F-37
H
Z pres or past
Then succeed and return T
'lse fail
Let L Z LA!T &au(*list/
If 3--T
L
Z .' Q F-37
H
Z ing
Then succeed and return PA!!IH'@
If 3--T
L
Z <AH' Q F-37
H
Z en
Then succeed and return P'3F':T@
If TFP'
L
is a modal Q F-37
H
Z inf
Then succeed and return 7-=AL@
Fail@
The procedure would operate on the au(*verb seAuence can be seen as follows)
Au( Agree &can nil/ returns T
Au( Agree &be &can// returns 7-=AL
Au( Agree &seen &can be// returns PA!!IH'
!imilarly the phrases
will have been going
should had gone
have had
will be accepted
.ut the phrases
will have being
should had gone
=eveloped by =r +mesh :handra >aiswal
have have
will not be allowed.

Verb Com!lement
The complement structure of a verb includes the NPs and clauses that
immediately follow the verbs.
Information about the complement structure is often called the sub
categori#ation of verb.
Intransitive verbs allow no NPs
Transitive verbs allow one NP &ob"ect/
.itransitive verbs allow two NPs &Indirect ob"ect direct ob"ect/
Transitive verbs that allow second NP to follow the verb. These verbs will be classified
as benefactive because they can be followed by an NP that indicates for whom the action
is done.
These components will be encoded in a !+. :AT slot in the definition of each
verb.
N-N'no components allowed &Intransitive/
-.>single ob"ect &NP/ allowed to follow verb &Transitive/
I-.>I-.> two NPs allowed to follow verb &.itransitive/
!ome verbs such as seen and be can take an ad"ective phrase as a complement as
>ack seemed angry.
=eveloped by =r +mesh :handra >aiswal
!ometimes an ob"ect and ad"ective -.>IA=> as
>ack makes me angry
Now consider the following sentence)
>ack put the money on the counter -.> I PP
Now consider the complements that are clauses. The following are the possibilities)
F-3*T-*INF I prayed for the doctor to come in time.
-.> I T-*INF I persuaded him to do it.
T-*INF I tried to do it.
-.> I INF I saw him do it.
INF I helped do it.
The tensed complements all involve a clause with normal tense information of
regular sentence. These clauses are often introduced by the complementi#er that.
:ombining this feature with NP complement you find the following two combinations)
T<AT * as in I know that >ack left.
I know >ack left.
-.> I T<AT ? as >ack told 7ary that he had lost his bicycle.
Another common complement form involves the use of wh words such as ? what why
when and how as complementi#er.
/"ample [ I know what >ack said.
I know how many times I tried to fly.
;<*:-7P ? ;e doubt what >ack said.
-.> I ;<*:-7P ? They asked >ack whether it was raining.

To present tests concisely in the following grammars consider these
functions where f is an arbitrary sub categori#ation feature set
Intrans &f/ Z f Y ON-N' A=> F-3*T-*INF T-*INF INF T<AT
;<*:-7PP
=eveloped by =r +mesh :handra >aiswal
Trans &f/ Z f Y O -.> I-.> I -.> -.> I T-*INF -.> I INF -.> I A=>
-.> I PP -.> I T<AT -.> I ;<* :-7PP
A si m!le A"# Grammar for Asserti on
Now we will discuss an ATN about simple assertions in 'nglish that uses
le(icon as given on ne(t page. This grammar e(cludes the Auestion and command forms
as well as passive relative clauses and so on.
The sentence structure consists of an initial NP followed by the au(iliaries and the
main verb then followed by a ma(imum of two NPs and many PPs depending on the
verb.
An ATN is shown below)

FID*$
PP
$
NP H'3.! NP NP
$ $
pop
% %
%
"ump "ump
=eveloped by =r +mesh :handra >aiswal
!

!%

!0

!6

!8
Arc Test Actions
!N$ !+.>W
7--==':L
!%N$ Agr & N+7
!+.>
N+7
FI3!T*
H
/
A+,!A+,!W
7AIN*H<'A=W
!0N$ Trans &!+.:AT
7AIN*H
/ -.>W
!+.:ATTrans &!+.:AT
7AIN*H
/
!0N% Intrans &!+.:AT
7AIN*H
/ !+.:ATIntrans &!+.:AT
7AIN*
H
/
!6N$ !+.:AT
7AIN* H
Z I-.> I
-.>
I-.>-.>
-.>W
!8N$ *** 7-=!Append &7-=! W/


The au"iliar$ F !ain (er* network
FID*%
7odal have be verb
$ $ $ pop
% % %
>ump "ump "ump
0

do

Arc Test Action
H'3.!N$ Au(Agree &W nil/ A+,! Append &nilW/
FI3!T*H W
H'3.!N0 Au(Agree &W nil/ A+,! Append &nil W/
=eveloped by =r +mesh :handra >aiswal
H'3.
!
A+,$
A+,
%
A+,
0
A+,
6

FI3!T*H W
A+,$N$ Au(Agree &W A+,!/ A+,! Append &A+,! W/
If FI3!T*H Z nil then FI3!T*H W
A+,%N$ Au(Agree &W A+,!/ A+,! Append &A+,! W/
If FI3!T*H Z nil then FI3!T*H W
A+,0N$ Au(Agree &W A+,!/ <'A= W
If FI3!T*H Z nil then FI3!T ?H W
The NP Network

FID*0
Ad" PP
$ $
Art noun
pop
$
% %
%
0
6
Pro
noun
name
Arc Test Actions
NPN$ ***** ='T W
=eveloped by =r +mesh :handra >aiswal
NP% NP0
NP
NPN% ***** P3= W
NPN0 Agr &N+7W O0PP/ <'A= W N+7 W

NPN6 ***** NA7' W
NP%N$ ***** A=>! Append &A=>! W/
NP%N% Agr &N+7 N+7 W/ <'A= W
N+7 N+7 Y N+7 W
NP0N$ ***** 7-=! Append &7-=! W/
'(amples
Lions are dangerous.
The very pale green sky.
>ohn came to our party.
=eveloped by =r +mesh :handra >aiswal
)er* complement and presetting registers
Let us consider the further e(tension of ATNs for feature manipulation. This
e(tension involves the ability to present registers in a network as that network is being
called like parameter passing in programming language. This facility is called the
!'N='3 action in the original ATN systems is useful to pass information to network
that aids in analy#ing the new constituent.
:onsider the class of verbs including want and pray that accepts complements using
the infinitive form of verbs which usually introduced by the word to
T-*INF 7ary wants to have a party
-.>*T-*INF 7ary wants >ohn to have a party
F-3*T-*INF I prayed for >ohn to leave the party
In the above e(ample au(iliaries are missing. <ence the previous ! network can
be e(tended for this.
Now consider the following sentences)
* 7ary wants to dress herself in the closet
* 7ary wants >ohn to dress himself in the closet
* 7ary wants to dress himself in the closet
=eveloped by =r +mesh :handra >aiswal
* 7ary wants >ohn to dress herself in closet
The last two sentences are unacceptable because the gender of the refle(ive
pronoun does not agree with that of the understood sub"ect in the complement. To
enforce such a restriction the grammar needs to access the gender of the !+.>':T in
the complement.
FID*$
NP
$ pop
%
NP "ump
NP $
% "ump 0

H'3.!
0 P+!< &!% !+.>-.>/
pop
P+!< &!% !+.> !+.>/
Arcs Test Action
!0N0 If !+.:AT
7AIN*H
Z T-*INF :-7P W
!6N0 If !+.:AT
7AIN*H
Z -.> I T-*INF :-7P W

The final ! network for T-*INF :omplements
=eveloped by =r +mesh :handra >aiswal
! !% !0
!6
!9
!8
Thus it would be useful to be able to preset the !+.> register in the ! network
when it is called. An e(tended push arc is of the following form allows presetting)

P+!< &N S register in NT SZ Sregister in current networkT/
For e(ample
P+!< &!% !+.> SZ !+.>/
The above will push to node !% in the ! network and preset the !+.>
register in the new ! network to the value of the !+.> register in the current ! network.
This is reAuired for 7ary wants to have a party.
For second case 7ary wants >ohn to have a party

Fou need a call of the form.
P+!< &!% !+.> SZ -.>/
The last problem to consider is how to deal with the word to. <ere the word to to be an
au(iliary model verb. The network is shown on previous page as FID*$.
The sentence V7ary wants >ohn to have a partyX is parsed as follows)
!+.> &NP$ NA7' 7ary/
7AIN*H wants
-.> &NP% NA7' >ohn/
Following are !6N0 do push for the complement the trace is as follows)
Node Arc followed 0egisters
!% !%N$ A+,! Z &to/
7AIN*H have
!0 !0N$ -.> &NP &='T a
<'A= party/
!6 !6N% ****************
!8 !8N$ returns &! !+.> NP%
A+,! &to/
7AIN*H have
-.> &NP ='T a <'A= party/

=eveloped by =r +mesh :handra >aiswal
Augmenting chart Parsers
8Augmented +.G9
'ach :FD rule has tests and action associated with it that manipulate registers on
the chart. The test associated with a rule may e(amine the chart entries for the
constituents matching the right hand side of the rule and action builds a slot*value
structure to add onto the chart. =uring the parse whenever a rule is completed its test is
tried if it succeeds a new constituent is constructed using the actions associated with the
rule and then added to the chart.
For e(ample)

NP A3T N-+N
;ith the test
N+7
A3T
Y N+7
N-+N

And the actions
='T A3T
N+7 N+7
A3T
Y

N+7
N-+N
<'A= N-+N
The parser for the augmented grammar would apply the test if this test succeeds then the
actions are performed to build a slot*value structure for the new NP to be added to the
chart. If the test fails the parser re"ects the rule as though it never completed.
Assuming the test succeeds the new NP constituent would have the
chart entry build for the A3T as the value of its ='T register the entry for the N-+N as
=eveloped by =r +mesh :handra >aiswal
the value of its <'A= register and the of the N+7 register of A3T and N-+N as the
value of its N+7 register.
;hen making an entry into the chart the parser needs to know not only the
starting and ending point of the new constituent but also its sub constituents.

An augmented +.G
0ule Test Action
$. NP A3T! A=>! N-+N N-+NA3T Y N+7N-+N='T A3T!
7-=! A=>!
<'A= N-+N
N-+NA3T Y N+7 N-+N
%. NP A3T N-+N ******* do ****** ='T A3T
<'A= N-+N
N-+NA3T Y N+7 N-+N
0. A=>! A=> A=>! ******* do ****** <'A= A=>
-T<'3! A=>!
6. A=>! A=> <'A= A=>
8. NP NA7' ****** do ****** NA7' NA7'
N+7 N+7NA7'
9. ! HP NP N-+NA3T Y N+7 N-+N N-+NA3T Y N+7N-+N
!+.> NP
P3'= HP
5. HP H'3. ******* do ******* 7AIN*H H'3.
=eveloped by =r +mesh :handra >aiswal
N+7 N+7H'3.
B. HP H'3. NP ******* do********* 7AIN*H H'3.
-.> NP
N+7 N+7H'3.
'(ample
:onsider the sentence
The dog cried.

!tart with a parse state of an ! at position $. 3ewriting ! symbol with rule 9
produces the state
&NP HP S!$ r9T/ at position $.
Now rewriting NP with rules $ % and 8 we get
+urrent #tate 4ackup #tate Position
&A3T A=>! N-+N SNP$ r$T
HP S!$ r9T/
$
&A3T N-+N SNP$ r%THPS!$ r9T/ $
&NA7'SNP$ r8THPS!$ r9T/ $
In processing A3T ne(t the system first checks the chart but it is empty. Therefore
it checks the input sentence at position $ and succeeds. After adding the entry onto the
chart it has the following possibilities.
:hart Table*$



=eveloped by =r +mesh :handra >aiswal

$ the % dog 0 cried
A3T$ 3--T T<'
N+7 O0s 0pP
Ne(t rule0 is used for A=>! but dog is not an ad"ective hence this rule fails and top
backup state becomes the current state this is given as follows)
+urrent #tate 4ackup #tate Position
& A=>! N-+N SNP$ r$T HP
S!$ r9T/
%
&A3T N-+N SNP$ r%THPS!$ r9T/ $
&NA7'SNP$ r8THPS!$ r9T/ $
Ne(t
&A3T N-+N SNP$ r%T HPS!$ r9T/ $
A3T$ is already on the chart so the current state is updated to

&N-+NSNP$ r%T HPS!$ r9T/ %
It does not find on chart therefore it looks for the input sentence and succeeds.
:hart Table*%


After parsing the first NP

Ne(t is the constructor flag SNP$ r%T. The system checks the tests on rule %Mthat
is it checks whether the N+7 of A3T$ agrees with the N+7 of N-+N$. If this
succeeds then it adds a constituent NP$ to the chart as shown in the above :hart
Table*%.

+urrent #tate 4ackup #tate Position
& H'3. SHP$ r5T S!$ r9T/ 0
&H'3. NP SHP$ rBT S!$ r9T/ 0
&NA7' SNP$ r8T HP S!$ r9T/ $
=eveloped by =r +mesh :handra >aiswal
&HP S!$ r9T/ 0
&NA7' SNP$ r8T HP S!$ r9T/ $
$ the % dog 0 cried
NP$ ='T A3T$
<'A= N-+N%
N+7 O0sP
A3T $ 3--T the N-+N$ 3--T dog
N+7 O0s0pP N+7 O0sP
:heck the input sentence for a H'3. succeeds and a constituent H'3.$ for cried
is added to the chart.

T T<3
After parsing the HP
! !+.> &NP ='T A3T$
<'A= N-+N$
N+7 O0sP
P3'= &HP 7AIN*H H'3.$
N+7 O0s 0pP
N+7 O0sP
=eveloped by =r +mesh :handra >aiswal
&S!$ r9T/ 6
&NA7' SNP$ r8T HP S!$ r9T/ $

$ The % dog 0 cried 6
NP$ ='T A3T$ HP$ 7AIN*H H'3.$
<'A= N-+N$ N+7 O0s 0pP
N+7 O0sP
A3T 3--T the N-+N 3--T dog H'3.$ 3--T cry
N+7 O0s 0pP N+7 O0sP N+7 O 0s 0pP
Grammar for natural language$ %andli ng movement
+onsider the following sentences
>ohn went to store.
=id "ohn go to the store\
<e will run in the marathon ne(t year.
;ill he run in the marathon ne(t year\
Fes*No Auestions are identical in structure to their assertional counterpart e(cept
that sub"ect NP and the first au(iliary has been swapped.
If there is no au(iliary in the assertional sentence an au(iliary of root do in the
appropriate tense is used.
KThis rearranging of the sub"ect and au(iliary is called sub"ect ? au(iliary
inversion as per linguistic theory. This is local movement or bounded movement.L
The other kind of movement is known as unbounded movement this occurs in
wh*Auestion. <ere the constituents are moved arbitrarily far from its original position.
For e(ample)
The fat man will angrily put the book in the corner.
=eveloped by =r +mesh :handra >aiswal
If you want to know who did the action\
This may be written as
;hich man will angrily put the book in the corner\
or ;ho will angrily put the book in the corner\
If you are interested to know how it is done
Fou might ask as
<ow will the fat man put the book in the corner\
<ence there are two kinds of movements
* Local or bounded
* +nbounded
Let us first consider local or bounded movement. ;e will consider this in two cases)U
* Fes ? No Auestion
* Passives
;e have to see how we can e(tent ATN for yes*no Auestions. The following ATN is for
the yes* no Auestion)
NP verb NP
$
%
Au( NP
Arc Test Action
!N$ ****** FI3!T*NP W
7--= =':L
!N% ****** A+,! Append &A+,! W/
7--= F'!*N-*1
=eveloped by =r +mesh :handra >aiswal
!
!$
!% !0 !6
!$N$ ****** FI3!T*NP W
!%N$ If Agr &N+7FI3!T*NP N+7FI3!T*H H'3./ 7AIN*H W
-.> W
A ! network for very single yes ? no Auestion
The sentences
I love you.
and =o I love you\
This would have the analysis as given .
I love you =o I love you\
&! 7--= =':L &! 7--= F'!*N-*1
FI3!T*NP &NP P3- I/ FI3!T*NP &NP P3- I/
7AIN*H love A+,! &do/
-.> &NP P3- you// 7AIN*H love
-.> &NP P3- you//

Important Points)
$. !tructures constructed for assertion and yes ? no Auestions are identical
e(cept for the 7--= register and the A+,! register which may contain an
e(tra =-.
%. All the tests performed for sub*verb agreement tense and transitivity are
identical in both the sentences.
=eveloped by =r +mesh :handra >aiswal
Passi ves
7ost verbs e(cept the intransitive verbs may take the passive forms.
This form involves using the normal ob"ect position NP in the sentence
where the sub"ect normally goes and either omitting the NP usually in the sub"ect
position or putting it in a PP position with the preposition by.
The passive form is indicated by adding an au(iliary verb with root be followed
by a past participle. The tense information in passives is encoded entirely in the au(iliary
verbs.
For e(ample) Active voice sentences
* I will hide my hat in the drawer.
* I hide my hat in the drawer.
* I had hid my hat in the drawer.
* I was hiding my hat in the drawer
Passive voice sentences
* 7y hat will be hidden &by me/ in the drawer.
* 7y hat was hidden &by me/ in the drawer.
* 7y hat had been hidden &by me/ in the drawer.
* 7y hat was being hidden &by me/ in the drawer.
=eveloped by =r +mesh :handra >aiswal
Fou can deal with passives by setting a new register H-I:' to the value
A:TIH' or PA!!IH' accordingly and by assigning the first noun phrase in the sentence
to a register FI3!T*NP and then assigning it to the register !+.> or -.> as
appropriate after the verb group is analy#ed.
To handle passives the H'3.! and ! network is given on ne(t page as FID*$.
This &!*network/ works as follows)
KThe initial NP is stored into a register FI3!T*NP and later assigned to !+.>
register or -.> register as appropriate. This is accomplished in the annotation on arc
!%N% after checking au(iliary*verb agreement and sub"ect*verb agreement
au( PP
$ $
$ NP verb $ NP $ NP pop
%
% % %

% 0 >ump 0 "ump
Au( NP
>ump
P+!<&!% FI3!T*NPZTFI3!T*-.>/

Arc Test Actions
!N$ ****** FI3!T*NPW
7--==':L
!N% ****** A+,!Append &A+,! W/
FI3!T*HW
!$N$ ****** FI3!T*NPW
7--=F'!*N-*1
=eveloped by =r +mesh :handra >aiswal
! !% !0 !6 !8
!$
!%N$ Au(Agree &W A+,!/ IF FI3!T*H Z nil
Then FI3!T*HW
A+,!Append &A+,! W/
!%N% Au(Agree &W A+,!/
If FI3!T*H not nil then
Agr &N+7
FI3!T*NP
N+7
FI3!T*H
/
else
Agr &N+7
FI3!T*NP
N+7W/
7AIN*HW
If 3--T
LA!T &A+,!/
Z .'
QF-37 Z en
then H-I:'PA!!IH'
!+.>FI3!T*NP
'lse H-I:'A:TIH'
-.>FI3!T*NP
!0N$ Trans &!+.:AT
7AIN*H
/
QH-I:' Z A:TIH'
FI3!T*-.>W
!0N% H-I:' Z PA!!IH'
!0N0 Intrans &!+.:AT
7AIN*H
/
!6N$ !+.:AT
7AIN*H
Z I-.>I-.> -.>W
I-.>FI3!T*-.>
-.>FI3!T*-.>
!6N0 !+.:AT
7AIN*H
Z -.>IINF :-7PW
-.>FI3!T*-.>
!8N$ ********* 7-=! Append &7-=! W/
In the test the action check for the passive form and assign the H-I:' !+.> and -.>
register as appropriate. This grammar does not set !+.> when a PP is found with the
preposition by because it cannot be certain that the sub"ect is being indicated without
semantic information about the type of the NP. If the NP describes an animate being
perhaps it should be sub"ect. -therwise it is probably "ust a simple modifier as in the
following e(ample
The hat was hidden by three oGclock.
$ modal $ have $ be $ be $ verb pop
% % % % %
>ump "ump "ump "ump "ump
Arc Test Actions
H'3.N$ A+,$N$
A+,%N$ A+,0N$
Au(.Agree&W A+,!/ A+,!Append &A+,! W/
If FI3!T*H Znil
=eveloped by =r +mesh :handra >aiswal
H'3.
!



A+,
$
A+,
%
A+,
0
A+,
6
A+,
8
Then FI3!T*HW
A+,6N$ Au(.Agree&W A+,!/ <'A=W
If FI3!T*H Z nil
Then FI3!T*HW
If 3--T LA!T &A+,!/ Z .' Q F-37 Z en
Then H-I:' Z PA!!IH'
'lse H-I:' Z A:TIH'

The )/04# network including PA##,)/#
%ol d mechani sm i n A"#s
This is the ability to store constituents for later use in ATN
system reAuires modifications to the discussed ATNs.
*First you need a data structure called hold*list to maintain the constituents that are
stored. This list can hold more than one constituent at a single time. .ut here will be
storing one in the hold list.
*!econdly constituents are added in the hold*list by a new action allowable on arcs
the hold action which takes a constituent and places it on hold list. The hold action can
store a constituent currently in a register &for e(ample * <-L= !+.> holds the
constituent in !+.> register/ or it can store the current constituent being built &For
e(ample ? <old without an argument holds the constituent under construction by the
current network/.
This hold constituent is used to fill the gap. -therwise sentences such as ? ;hat did you
put the bottle in the cupboard\ This would be accepted by simply not using the held.
wh*term during the rest of the sentence.
This is enforced by not allowing a pop arc to succeed from a network until any
constituent held by an action on an arc in that network has been used.
=eveloped by =r +mesh :handra >aiswal
Finally we need a mechanism to detect and fill gaps. The ATN mechanism uses a new
arc called HI3 &short of virtual/ which takes a constituent name as an argument. This arc
can be followed if such a constituent is present on the hold list.
au( PP
NP NP
$ Herb $ "ump $ NP $ pop
%
0 % %
HI3 NP "ump
0 % 6
Au( NP
NP HI3 NP "ump

au(
All annotations arc as in grammar for passi(es plus actions as gi(en
in following Ta*le
Arc Test Actions
!N0 TFP' Z ;< <-L= W
7--=;<*1
;<*1+'3FW
;<*!N$ *** A+,!Append &A+,! W/
FI3!T*H W
;<*!N% *** FI3!T*NPW
!0N0 Trans &!+.:AT 7AIN*H/
Q H-I:' Z A:TIH'
FI3!T*-.>W
=eveloped by =r +mesh :handra >aiswal
!
!$

!%
;<*
!
!0 !6 !8
!0N6 Intrans &!+.:AT 7AIN*H/ ***
An #-network for wh-and $es-no Guestions
If the arc is followed successfully the constituent is removed from the hold list and
returned as the value of the arc in the identical form similar to a P+!< returns a
constituent.
:onsider the grammar which is the e(tension of the passive network.
The arc from ! basically divides the sentence into the three categories)
=':L F'!*N-*1 and ;<*1@ depending on whether the sentence starts with a non*
;<*NP an au(iliary or a ;<*NP respectively.
Note) Three gaps are allowed in this grammar as follows)
*!ub"ect position
*-b"ect position@
*-ne for each ob"ect positions.

This grammar would correctly analy#e the following)
*;ho is carrying the baby\
*;ho is the baby carrying\
*;ho is the baby\
ad"
art $ noun
$ % pop
% wh*det
0

6 pro

wh*pro

=eveloped by =r +mesh :handra >aiswal
NP NP%

NP0
Arc Test Actions
NPN$ *** ='TW@
N+7N+7W
NPN% *** ='TW@
TFP';<
NPN0 *** P3-W
NPN6 *** P3-W@
TFP';<
NP%N$ *** A=>!Append &A=>! W/
NP%N% Agr &N+7 N+7W/ <'A=W
N+7Agr &N+7 N+7W/

An NP network with %2-words.
&! ;<*1+'3F &NP$ P3- who
TFP' ;</
7--= ;<*1 &Notation NP$indicates a pointer
!+.>NP$ to a constituent constructed earlier/
A+,! &is/
H'3. carrying
-.> &NP ='T the
<'A= baby//
Anal$ses of who is carr$ing the *a*$H

&! ;<*1+'3F &NP$ P3- who
TFP' ;</
7--= ;<*1
A+,! &is/
!+.> &NP ='T the
<'A= baby/
H'3. carrying
-.>NP$//
Anal$sis of who is the *a*$ carr$ingH
=eveloped by =r +mesh :handra >aiswal
&! ;<*1+'3F &NP$ P3- who
TFP' ;</
7--= ;<*1
!+.>NP$
H'3. is
-.> &NP ='T the
<'A= baby//
Anal$sis of who is the *a*$H

Anal$sis of simple wh--uestions
A more general grammar would be needed to handle gaps of prepositional* phrases verb
* phrases and adverbial* phrases as well allowing wh*terms as given in the following
e(amples)
*In which town were you born\ PP
*<ow fast did you run\ Adverbial*phrase
*;hat did you do\ Herb*phrase.
=eveloped by =r +mesh :handra >aiswal

You might also like