假设我有一个段落,我通过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.']
现在我将每个句子分成单词,并将其附加到某个变量中。我该如何找到具有最多相同单词数量的两组句子?我不确定该怎么做。 如果我有10个句子,那么我将进行90次检查(在每个句子之间)。谢谢。