Question: Java All work should be done in the same Github repository Design and code a program that reads a text file, and counts the number

Java

All work should be done in the same Github repository

Design and code a program that reads a text file, and counts the number of times each word that it contains appears.

Define a word by the following rules:

A word is any group of contiguous letters from the file. In other words, spaces, punctuation, and other non-letter characters separate words, and are not words themselves. This rule also means that numbers written as strings of digits (e.g., 100) are not counted as words, and contractions are counted as two words separated by an apostrophe. For simplicity, you can assume your files contain only words, spaces, digits and newlines.

Capitalization alone does not make words different. For example, Design and design should be considered the same word.

It is usual in programs that index or analyze text to ignore trivial words such as a, the, etc. For this exercise, consider any word with 3 or fewer letters in it to be trivial (so the list used an example above would actually not have the entries for a, the, of, or it).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!