For each word, check every root to see if the word starts with it. Keep the shortest matching root.
With roots and words, each of average length , checking all combinations is .
For large dictionaries and sentences, this is slow. Can you find the shortest root faster?