06.03.2013 Views

Artificial Intelligence and Soft Computing: Behavioral ... - Arteimi.info

Artificial Intelligence and Soft Computing: Behavioral ... - Arteimi.info

Artificial Intelligence and Soft Computing: Behavioral ... - Arteimi.info

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

One important issue in the process of parsing is the selection of the rewrite<br />

rules at any step of exp<strong>and</strong>ing the parse tree. One simple way to explore<br />

this is to exp<strong>and</strong> a non-terminal by the first possible means <strong>and</strong> check whether<br />

the expansion supports the part of the sentence. If yes, the selection of the rewrite<br />

rule is done correctly. If no, then a backtracking has to be made upto the<br />

node in the tree, just exp<strong>and</strong>ed, delete the older expansions from that node <strong>and</strong><br />

select a second alternative re-write rule for expansion. The process is to be<br />

continued recursively until all the productions terminate to terminal nodes.<br />

Such type of parsing is called recursive descent parsing. An alternative<br />

approach is to check the input string prior to selection of the re-write rule,<br />

called look-ahead parsing. It is also prevalent in the literature [6]. For the<br />

purpose of computing, the parse tree can be realized by a structure with<br />

pointers <strong>and</strong> list. The representation of the parse tree of fig.18.2 by pointers to<br />

structures <strong>and</strong> list is presented below.<br />

N<br />

the<br />

killed<br />

S<br />

VP<br />

ART<br />

NP<br />

man a deer<br />

Fi Pointer to structure representation of the parse tree of fig. 18.2.<br />

Since the re-write rules have at most two symbols at the right h<strong>and</strong><br />

side, we kept two pointer fields <strong>and</strong> one name field of each structure. The null<br />

pointers have been denoted by crossed lines within the field.<br />

now.<br />

ART<br />

NP<br />

V<br />

The list representation of the parse tree, shown in fig.18.2 is presented<br />

N

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!