Fixing tokenizers with 1.53 (updated some dependencies + clippy) (#764)

This commit is contained in:
Nicolas Patry
2021-07-21 09:58:38 +02:00
committed by GitHub
parent 755e5f5c1e
commit d83772d62c
5 changed files with 461 additions and 352 deletions

View File

@ -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(),
)
}