Python - Add ByteLevel PostProcessor

This commit is contained in:
Anthony MOI
2020-03-05 17:20:33 -05:00
parent 8dcbc8377e
commit 52180a9179
4 changed files with 28 additions and 0 deletions

View File

@ -42,3 +42,17 @@ impl RobertaProcessing {
}))
}
}
#[pyclass(extends=PostProcessor)]
pub struct ByteLevel {}
#[pymethods]
impl ByteLevel {
#[new]
fn new(obj: &PyRawObject) -> PyResult<()> {
Ok(obj.init(PostProcessor {
processor: Container::Owned(Box::new(tk::processors::byte_level::ByteLevel::new(
false,
))),
}))
}
}