Top Down Parsing:- This parsing begins with the starting symbol and proceeds by breaking the sentence into its constituents words. It starts with the symbol 'S' and replace it by a sequence of terminal symbol that match the class of words in the input sequence. Thus, in the top down parsing words of the sentence are replaced by their categories replaced by noun phase, verb phase, articles, determiners etc.... These symbols are rewritten as per the grammer rules. Finally the terminal symbols are replaced by language words. This process of parsing keep on continuing until it teach the non terminal symbol.
Example:- Ram went to the park
Production rules:-
Example:- Ram went to the park
Production Rules:-
Example:- Ram went to the park
Production rules:-
- S--> NP VP
- NP--> N
- VP--> V NP
- S--> NP VP
- NP--> N/ ARTICLE NP
- VP--> V / VP PRONOUN
- Select first state from the completeset of possiblities and remove it from the list
- Genetare the new state by trying every possible options from the related state.
- Add the state generated in the step to possible list.
Example:- Ram went to the park
Production Rules:-
- NP--> ARTICLE N
- VP--> N PREPOSITION
- NP--> VP NP
- S--> NP VP / N NP
No comments:
Post a Comment