Add min and max length and punctuation option to CPU implementation