def tokenize_words ( self , text ) : return [ self . strip_punctuation ( word ) for word in text . split ( ' ' ) if self . strip_punctuation ( word ) ]
how to filter out the punctuation from a string in python
Tokenize an input string into a list of words ( with punctuation removed ) .
def tokenize_words(self, text):
        """Tokenize an input string into a list of words (with punctuation removed)."""
        return [
            self.strip_punctuation(word) for word in text.split(' ')
            if self.strip_punctuation(word)
        ]