Skip to content

Commit 27b42a4

Browse files
committed
Trim confidence file lines when loading
1 parent 1ae1883 commit 27b42a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

heliport-model/src/languagemodel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ impl Model {
218218
let mut loaded_langs = LangBitmap::new();
219219

220220
for (i, line) in confidence_file.trim_end().split('\n').enumerate() {
221-
let parts: Vec<&str> = line.split('\t').collect();
221+
let parts: Vec<&str> = line.trim_end().split('\t').collect();
222222
// Check that the number of fields are correct and the language exists
223223
if parts.len() != 2 {
224224
bail!(

0 commit comments

Comments
 (0)