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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started