Match Each Term To The Correct Category