calculate two word similarity,return a int value between 0 and 1