I have tokenized the text and want to print error for the sentences without a pos but it prints error for every single sentence. How should I change it?
sents = nltk.sent_tokenize(text)
for sent in sents:
tokens = nltk.word_tokenize(sent)
tagged = nltk.pos_tag(tokens)
for pos in tagged:
if 'VB' not in sents :
print('error')