Refactor searchterm analyzer to use an WordnetNode class