import nltk import string from nltk.corpus import stopwords from nltk.tokenize import word_tokenize word_quote = "Do u have hundred rupees, can i get it? she asked." # Tokenize the words words_in_quote = word_tokenize(word_quote) print("Tokenized words:") print(words_in_quote) # Define stopwords and punctuation stop_words = set(stopwords.words("english")) punctuation = set(string.punctuation) # Filter out stopwords and punctuation filtered_list = [word for word in words_in_quote if word.casefold() not in stop_words and word not in punctuation] # Print the filtered list of words print("\nWords after removing stopwords and punctuation:") print(filtered_list)