Text similarity calculation based on LCS