Working using NLTK and I am prototyping a project I have in mind. I come from PHP so Python is a little unknown for me.
I have a list of stopwords and an n-word string, n being between 1 and 4.
I want to clean that string by trimming both ends of any stopwords. If I need to retest the string after I remove a stopword because there might be another one right after it.
How would you do that performance-wise in Python?