moonbitstack/moontoken/bpe does not have a README file
pub(all) struct Options {
cache : Bool
cache_limit : Int
}pub struct WordBpe {
vocab : Map[String, Int]
text_of : Map[Int, String]
chars : Map[Char, Int]
merges : Map[Int, Map[Int, Int]]
results : Array[Int]
unk_id : Int
byte_ids : Array[Int]
byte_fallback : Bool
fuse_unk : Bool
ignore_merges : Bool
decoding : Decoding
normalizer : Normalizer
split : Split
alphabet : Array[Char]
reverse : Map[Int, Int]
}fn WordBpe::new(vocab~ : Array[(String, Int)], merges~ : Array[(String, String)], options? : WordOptions, decoding? : Decoding, normalizer? : Normalizer, split? : Split) -> WordBpe raise Refusedpub(all) struct WordOptions {
unk_id : Int
byte_fallback : Bool
ignore_merges : Bool
}Install
Download zipTokenizers for MoonBit: byte-level BPE and SentencePiece.