Chapter - 2 . Data Structure for Language Processing. Classification of Data structures. Language processor makes frequent use of search operation over its data structures. The data structure used in language processing can be classified on the basis of the following criteria:
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Data Structure for Language Processing
Algorithm (Generic search procedure):
Ps : Number of probes in a successful search
Pu : Number of probes in an unsuccessful search
Operations on search structure:
Sequential search organization:
Sequential search organization (operations):
Ps = f/2 for a successful search
Pu= f for an unsuccessful search
The symbol is added to the first free entry in the table. The value of ‘ f ’is updated accordingly.
Binary search organization:
Algorithm (Binary search):
Exit with success if s = se.
else start := e + 1;
Hash table organization:
A stack is a linear Data Structure which specifies the following properties:
Following fig. illustrates the stake allocation and deallocation process.
Extended stack mode (b)-allocation (c)-deallocation
1. TOS := RB - 1 ;
2. RB := TOS*;
Identifying the free memory areas:
Reuse of memory: