Как видно из скриншота моего Spyder и приведенного ниже кода, я не получаю ни вывода, ни ошибок.Чего мне не хватает?:
import nltk
from nltk.stem import PorterStemmer
paragraph = "The Times of India issued its first edition on 3 November
1838 as The Bombay Times and Journal of Commerce.[13][14]
The paper published Wednesdays and Saturdays under the
direction of Raobahadur Narayan Dinanath Velkar, a
Maharashtrian Reformist, and contained news from Britain and the world, as well as the Indian Subcontinent. J.E. Brennan was its first editor.[15][16] In 1850, it began to publish
daily editions."
sentences = nltk.sent_tokenize(paragraph)
stemmer = PorterStemmer()
for i in range(len(sentences)):
words = nltk.word_tokenize(sentences[i])
newwords = [stemmer.stem(word) for word in words]
sentences[i] = ' '.join(newwords)