Question: Please code in Java. The function countOccfRoots takes a text represented as a string, and a dictionary that maps words to their roots, and returns

Please code in Java.
The function countOccfRoots takes a text represented as a string, and a dictionary that maps words to their roots, and returns a map that tells the number of times each word occurs in the text, treating each word the same as its root. Words are separated by spaces, and words that do not occur in the dictionary are ignored. static Map
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
