mirror of
https://github.com/mii443/tokenizers.git
synced 2025-09-01 14:59:20 +00:00
fmt
This commit is contained in:
@ -675,10 +675,9 @@ mod tests {
|
|||||||
assert_eq!(vocab.get_vocab()["another_two"], 4); // Token idx not changed
|
assert_eq!(vocab.get_vocab()["another_two"], 4); // Token idx not changed
|
||||||
|
|
||||||
// Just checking that we can set the content of the string in rust
|
// Just checking that we can set the content of the string in rust
|
||||||
let mut token:AddedToken = AddedToken::from("Hey", false);
|
let mut token: AddedToken = AddedToken::from("Hey", false);
|
||||||
token.content = "hey".to_string();
|
token.content = "hey".to_string();
|
||||||
assert_eq!(token.content, "hey"); // Token was already there
|
assert_eq!(token.content, "hey"); // Token was already there
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -660,8 +660,8 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Get the added vocabulary only
|
/// Get the added vocabulary only
|
||||||
|
|
||||||
/// Get the added tokens decoder
|
/// Get the added tokens decoder
|
||||||
pub fn get_added_tokens_decoder(&self) -> &HashMap<u32, AddedToken> {
|
pub fn get_added_tokens_decoder(&self) -> &HashMap<u32, AddedToken> {
|
||||||
self.added_vocabulary.get_vocab_r()
|
self.added_vocabulary.get_vocab_r()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user