Python - Expose ByteLevel alphabet

This commit is contained in:
Anthony MOI
2020-01-02 18:06:06 -05:00
parent f0f9aefd07
commit d3c3f5a700

View File

@ -50,6 +50,14 @@ impl ByteLevel {
))),
})
}
#[staticmethod]
fn alphabet() -> Vec<String> {
tk::pre_tokenizers::byte_level::ByteLevel::alphabet()
.into_iter()
.map(|c| c.to_string())
.collect()
}
}
#[pyclass]