(&self, texts: Vec<String>)
| 31 | |
| 32 | #[napi] |
| 33 | pub fn encode_batch(&self, texts: Vec<String>) -> Vec<Vec<u32>> { |
| 34 | texts |
| 35 | .par_iter() |
| 36 | .map(|text| { |
| 37 | self.encoding |
| 38 | .encode_with_special_tokens(&text) |
| 39 | .iter() |
| 40 | .map(|x| *x as u32) |
| 41 | .collect() |
| 42 | }) |
| 43 | .collect() |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | #[napi] |
nothing calls this directly
no outgoing calls
no test coverage detected