In this assignment, you are requested to write a simple word index program. The program will record the position of words in text files in a directory and then offer to retrieve the positions of a given word.

computer science

Description

1 Overview 

In this assignment, you are requested to write a simple word index program. The program will record the position of words in text files in a directory and then offer to retrieve the positions of a given word. The program should be named WordIndex. Your program will read a set of commands from a given file. The program should execute these commands sequentially. Such commands would first request to read all the words of the available text files and insert them into a map data structure. Then, search for a given word, add the words of a new file, remove a file from the list of words, or print a summary the word index. The command file name is given as argument on the command line. The directory containing the text files is called TextFiles. In this assignment you will implement and compare (experimentally) a linked list based and a hash table based map for storing these word positions.


Related Questions in computer science category