import string def preprocess_bn(txt): """ This functions is used for preprocessing Bangla text. Two major preprocessing is done- 1. Punctuations removal. 2. Whitespace removal. Processed text is returned as a return value. """ for punc in string.punctuation: txt=txt.replace(punc, '') txt=txt.replace('ред', '') txt=' '.join(txt.split()) return txt