

def remove_punctuation(self, text):
    ' Get rid of punctuation except apostrophes '
    return re.sub("[^\\P{P}\\']+", '', self)

dataset/ETHPy150Open nltk/nltk/nltk/classify/textcat.py TextCat.remove_punctuation/VarMisuse@23/49 `text`->`self`