Menghapus kata -kata berhenti dari teks

pattern = re.compile(r'\b(' + r'|'.join(stopwords.words('english')) + r')\b\s*')
text = pattern.sub('', "eswar and co and the smartext kid")
py_hacker