character pair based  text similarity