import re
idx = 0
words = {}
for ratio, sentence in ratio_and_sentence.items():
sentence = re.sub(r'[^\W]+'), "", sentence) # Удаляем знаки препинания
for w in sentence.split():
w = stemmer.stem(w)
if w not in words:
words[w] = idx
idx += 1
for i, e in enumerate(p):
# если индекс чётный - печатаем
if i % 2 == 0:
print(e)
https://www.meetingcpp.com/blog/items/cpp-and-zomb...