Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Problem Statement:

In this project, you are asked to write a Java application that utilizes your knowledge about a number of data structures we have been discussing throughout the course of this semester.

The main task of this application is to automatically generate a book index for a given arbitrary text file.

As you know, a traditional book index lists on which page each important/key word occurs. In the application that you will develop, you are required to generate an index for ALL words in the given file.

To standardized testing of all students' submissions, all of you are required to use the given text file posted online next to this project statement.

The file name is "alice30.txt" and it contains the famous Alice in Wonderland book that is freely available via Project Gutenberg. The simple given test file that you MUST use does NOT have page numbers and thus you will use chapters instead in your indexing.

While considering which data structure that can best fit this application, please remember that your index will look similar to the following:

"Keyword"?{2, 3, 7, 9}

Where "keyword" is the word that you are trying to index and {2, 3, 7, 9} is the set of chapters that "keyword" occurs in. In other words, "keyword" occurs in chapters 2, 3, 7, and 9. If a keyword occurs multiple times in the same chapter, your index will ONLY list the chapter one time and thus maintain the set property.

The structure of such index can be implemented using a Map whose keys are the Strings representing the words that you are indexing and the value associated with each key is a set of integer values denoting which chapters a particular key word occurs.

Hint: your main data structure can take the following form. The choice of TreeMap and TreeSet will ensure that the data stored in these structures are sorted.

TreeMap>

Your code is expected to have two files with the following functionalities:

A Driver program that will create a Scanner object to open the given input file and make sure that ALL non-alphabetical characters are skipped. To do that you need to use the appropriate regular expressions with the .useDelimiter() method of the scanner class. Then, all data from the input file will be read and converted to lower case. The driver program will then invoke the appropriate methods from the MainIndexingClass to generate the desired index then display the generated index on the monitor.

A MainIndexingClass file that defines the selected data structure then provides appropriate constructor to initialize that TreeMap. This class also will provide all needed functionalities to generate and maintain the required index structure.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93092569

Have any Question?


Related Questions in Computer Engineering

Assignmentsuppose you are an isp that owns a 19 address

Assignment Suppose you are an ISP that owns a /19 address CIDR block starting at 118.235.160.0/19. Answer the following questions to allocate address blocks to 10 customers who want to pay for the smallest CIDR blocks to ...

Simulate by matlab then solve it theory1- using simulations

Simulate by MATLAB then solve it theory. 1- Using simulations, generate a vector of normally distributed RV X with a mean mX equals 73 and standard deviation of 20% of the mean. 2-Using simulated vectors, find the probab ...

How do you find the minimum sample size when population

How do you find the minimum sample size when population standard deviation is anywhere between 14 to 24, and the half-width B desired could be anywhere between 2 to 7?

Espn pays the nfl 11 billion per year for 8 yrs for the

ESPN pays the NFL $1.1 Billion per year for 8 yrs for the right to exclusively televise football. What is the NPV of the investment if the parent Disney CO has an opportunity interest rate that is equal to the cost of ca ...

Who stole the ice cream during an investigation into the

Who Stole the Ice Cream? ?During an investigation into the mysterious disappearance of ice-cream from a Mr. Softee truck, the following statements were made by the prime suspects. ? Alan: I wouldn't steal ice-cream unles ...

Search the internet for 5 open source reporting software

Search the internet for 5 open source reporting software packages of your choice? Explain why you think these software packages are the best for BI/DSS Reporting? Choose one of them and do associated with the reporting s ...

Question suppose that your uncle is a real estate agent and

Question : Suppose that your uncle is a real estate agent and he decided to have a web-site to list his available real estate properties. And use a laptop computer to show clients these properties. What hardware is neede ...

When searching for the entry x within the list r s t u v w

When searching for the entry X within the list R, S, T, U, V, W, Z how many entries will be considered before discovering that the entry is not present? (Note that the list is in alphabetical order.)

Using a telephone survey of 400 randomly selected

Using a telephone survey of 400 randomly selected registered voters, he solicits both their party identification and whether or not they had read the newspaper that day. The results are displayed in the following cross-t ...

Question suppose a computer using direct mapped cache has

Question : Suppose a computer using direct mapped cache has 2 20 words of main memory and a cache of 32 blocks, where each cache block contains 16 words. a. How many blocks of main memory are there? b. What is the format ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As