Yes it’s a function. I do not know who did PLAGIARISM. I learning a NLP course in linkedin the teacher did the same thing!! same data same code!!!!
`def clean_text(text):`text = “”.join([word.lower() for word in text if word not in string.punctuation])`tokens = re.split(‘\W+’, text)`text = [ps.stem(word) for word in tokens if word not in stopwords]`return text