A partition cover approach to tokenization