more general code for punctuation predictor