refactor the program. change the features to 1. word distance 2.sentence distance