Refactor wordnet searchterm analyzer