mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-23 16:49:27 +00:00
Python - Fix ByteLevel instantiation from state (#621)
This commit is contained in:
@ -232,8 +232,11 @@ pub struct PyByteLevel {}
|
||||
#[pymethods]
|
||||
impl PyByteLevel {
|
||||
#[new]
|
||||
#[args(trim_offsets = "None")]
|
||||
fn new(trim_offsets: Option<bool>) -> PyResult<(Self, PyPostProcessor)> {
|
||||
#[args(trim_offsets = "None", _kwargs = "**")]
|
||||
fn new(
|
||||
trim_offsets: Option<bool>,
|
||||
_kwargs: Option<&PyDict>,
|
||||
) -> PyResult<(Self, PyPostProcessor)> {
|
||||
let mut byte_level = ByteLevel::default();
|
||||
|
||||
if let Some(to) = trim_offsets {
|
||||
|
Reference in New Issue
Block a user