pub fn encode(text: &str, vocab: &[String]) -> Result<Vec<u64>>
Encode a text against a vocabulary. Only single-character vocabularies are supported: sub-word tokens need longest-match encoding, which comes with presk data bpe.
presk data bpe