text mining and text analytics listing word filtering and lowercasing functions def wordfilter(excluded,wordrow)wordfilter(filtered [word for word in wordrow if word not in excludedfunction will return filtered remove term from stopwords nltk corpus stopwords words('english'an array of terms def lowercasearray(wordrow)lowercased [word lower(for word in wordrowreturn lowercased stop word variable lowercasearray(function transforms any term to its lowercased version contains english stop words per default present in nltk the english stop words will be the first to leave our data the following code will provide us these stop wordsstopwords nltk corpus stopwords words('english'print stopwords figure shows the list of english stop words in nltk figure english stop words list in nltk with all the necessary components in placelet' have look at our first data processing function in the following listing