使用PHP组合> 70%类似MySQL TEXT字段数据

I have a TEXT filed in the MySQL table. it has sentence

Example

Hello AAAA, where is your dog BBBB
Hello PPPP, where is your dog QQQQ
Hello XXXX, where is your dog YYYY
I am fine. thanks
I am fine. thanks
where are you going?
Thank you very much

here first 3 sentence has 5 same word out of 7. so it is (5/7)*100=72% similar

4th and 5th 100% similar

my question is. using php i want to group in a table like this

sample_sentence_group                              count
Hello AAAA, where is your dog BBBB                 3
I am fine. thanks                                  2
where are you going?                               1
Thank you very much                                1

how can i do it? the table has more than 100K record

Thanks