段落があるとしましょう。これを sent_tokenize で文に分けます。
variable = ['By the 1870s the scientific community and much of the general public had accepted evolution as a fact.',
'However, many favoured competing explanations and it was not until the emergence of the modern evolutionary synthesis from the 1930s to the 1950s that a broad consensus developed in which natural selection was the basic mechanism of evolution.',
'Darwin published his theory of evolution with compelling evidence in his 1859 book On the Origin of Species, overcoming scientific rejection of earlier concepts of transmutation of species.']
次に、各文を単語に分割し、変数に追加します。同じ単語の数が最も多い2つの文のグループを見つけるにはどうすればよいですか. これを行う方法がわかりません。10 文ある場合、(各文の間に) 90 回のチェックが行われます。ありがとうございます。