Matching stems seems better, assuming you don't have to build it yourself. Regardless, the same matching algorithm should be used here as is used in the highlighting code below.