zhe,
Are you looking for the longest common substring (word level)
across 4000 sentences
or
for all possible pairings of sentences
You might be interested in Finding a LCS module on word level. Unfortunately, without knowing which task you are trying to accomplish, I can't give any more advice.