Update Python bindings for Encoding

This commit is contained in:
Anthony MOI
2019-12-10 12:38:36 -05:00
parent 132a0fc4b4
commit 8cedc5f1f6
3 changed files with 44 additions and 16 deletions

View File

@ -0,0 +1,15 @@
extern crate tokenizers as tk;
use pyo3::prelude::*;
#[pyclass]
#[repr(transparent)]
pub struct Encoding {
encoding: tk::tokenizer::Encoding,
}
impl Encoding {
pub fn new(encoding: tk::tokenizer::Encoding) -> Self {
Encoding { encoding }
}
}