mirror of
https://github.com/mii443/tokenizers.git
synced 2025-12-06 12:48:18 +00:00
Python - Add first tests: Tokenizer
This commit is contained in:
@@ -46,6 +46,26 @@ impl AddedToken {
|
||||
obj.init({ AddedToken { token } });
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[getter]
|
||||
fn get_content(&self) -> &str {
|
||||
&self.token.content
|
||||
}
|
||||
|
||||
#[getter]
|
||||
fn get_rstrip(&self) -> bool {
|
||||
self.token.rstrip
|
||||
}
|
||||
|
||||
#[getter]
|
||||
fn get_lstrip(&self) -> bool {
|
||||
self.token.lstrip
|
||||
}
|
||||
|
||||
#[getter]
|
||||
fn get_single_word(&self) -> bool {
|
||||
self.token.single_word
|
||||
}
|
||||
}
|
||||
#[pyproto]
|
||||
impl PyObjectProtocol for AddedToken {
|
||||
|
||||
Reference in New Issue
Block a user