Python - Add WordPiece decoder

This commit is contained in:
Anthony MOI
2019-12-09 12:49:17 -05:00
parent 0fb4b268f1
commit 5eba30835d

View File

@ -36,6 +36,18 @@ impl ByteLevel {
}
}
#[pyclass]
pub struct WordPiece {}
#[pymethods]
impl WordPiece {
#[staticmethod]
fn new() -> PyResult<Decoder> {
Ok(Decoder {
decoder: Container::Owned(Box::new(tk::decoders::wordpiece::WordPiece)),
})
}
}
struct PyDecoder {
class: PyObject,
}