mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-23 00:35:35 +00:00
Fixing tokenizers with 1.53 (updated some dependencies + clippy) (#764)
This commit is contained in:
@ -291,8 +291,7 @@ impl PyBpeTrainer {
|
||||
alphabet
|
||||
.into_iter()
|
||||
.map(|s| s.chars().next())
|
||||
.filter(|c| c.is_some())
|
||||
.map(|c| c.unwrap())
|
||||
.flatten()
|
||||
.collect(),
|
||||
);
|
||||
}
|
||||
@ -497,8 +496,7 @@ impl PyWordPieceTrainer {
|
||||
alphabet
|
||||
.into_iter()
|
||||
.map(|s| s.chars().next())
|
||||
.filter(|c| c.is_some())
|
||||
.map(|c| c.unwrap())
|
||||
.flatten()
|
||||
.collect(),
|
||||
);
|
||||
}
|
||||
@ -773,8 +771,7 @@ impl PyUnigramTrainer {
|
||||
alphabet
|
||||
.into_iter()
|
||||
.map(|s| s.chars().next())
|
||||
.filter(|c| c.is_some())
|
||||
.map(|c| c.unwrap())
|
||||
.flatten()
|
||||
.collect(),
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user