Refactoring wordnet_based_similarity.rb

Refactoring wordnet_based_similarity.rb caused changes to quite a few other files as well.