小编use*_*953的帖子

如何找到哪些句子的词汇最多?

让我们说我有一个段落.我通过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 …
Run Code Online (Sandbox Code Playgroud)

python nltk

3
推荐指数
1
解决办法
1310
查看次数

查找句子是否完全是资本?

我有一个变量,我想检查它是否完全是资本.

loc = "SAN JOSE"
Run Code Online (Sandbox Code Playgroud)

我如何检查资本中的整个短语.我知道如何检查个别信件是否为资金.它可以有很多单词.

loc[0].isupper()
>>True
Run Code Online (Sandbox Code Playgroud)

python

0
推荐指数
1
解决办法
115
查看次数

标签 统计

python ×2

nltk ×1