Question: Write a java program to count the occurrences of all letter pairs in a sample of text (like the first paragraph of the Constitution). Disregard
Write a java program to count the occurrences of all letter pairs in a sample of text (like the first paragraph of the Constitution). Disregard differences between lower and upper case letters. (Blanks are not considered as letters). Output the 100 most frequent letter pairs, in order by percent of total. Also show which percent of total pairs is accounted for by this list of 100. Your program should correctly process situations where the input file is empty or where less than 100 pairs occur.
Sample output
th 2.37% in 2.20% fj 2.00% ... (6 per line) ... (100 letter pairs) Output represents 73.44% of 23641 letter pairs.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
