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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6) article → a,<br />

7) article → the,<br />

8) noun → man,<br />

9) noun → deer,<br />

10) verb → killed,<br />

11) verb → likes.<br />

It is to be noted from the above set of production (re-write) rules that<br />

the terminals do not appear in the left-h<strong>and</strong> side of the rules.<br />

The sentence: ‘The man killed a deer’ now can be analyzed by the<br />

following sequence of re-write rules. We here onwards abbreviate noun-phrase<br />

as NP, verb-phrase as VP, noun as N, verb as V <strong>and</strong> article as ART. Now,<br />

starting with re-write rule 1, we have:<br />

S → NP VP (by 1)<br />

→ ART N VP (by 3)<br />

→ the man VP (by 7 & 8 )<br />

→ the man V NP (by 5)<br />

→ the man killed NP (by 10)<br />

→ the man killed ART N (by 3)<br />

→ the man killed a deer (by 6 & 10)<br />

The above example describes a top-down derivation. It starts with the<br />

sentence symbol S <strong>and</strong> continues replacing the left-h<strong>and</strong> side of the selected rewrite<br />

rules by their right-h<strong>and</strong> side, so that ultimately the complete sentence<br />

appears at the end of the derivation. An alternative form called the bottom-up<br />

derivation starts with the string of the sentential representation <strong>and</strong> continues<br />

replacing the right-h<strong>and</strong> side of the re-write rules by their left-h<strong>and</strong> side until<br />

the starting symbol S is reached.<br />

A tree, called the parse tree, can also represent the derivations<br />

presented above. The parse tree for the sentence under consideration is<br />

presented in fig. 18.1.<br />

Fig.18.1 has similarity with the derivation of the sentence, presented in<br />

example 18.1. It is however observed from fig.18.1 that VP <strong>and</strong> NP occur<br />

more than once at different levels of the tree. This happened so as we did not<br />

exp<strong>and</strong> VP or NP at its first occurrence. Had it been so, the resulting tree<br />

would look like fig.18.2.

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

Saved successfully!

Ooh no, something went wrong!