From af94cd2ee61fc39433264b0e84b21eeb60ffe0e4 Mon Sep 17 00:00:00 2001 From: "Thomas M. DuBuisson" Date: Sat, 22 Feb 2025 15:31:53 -0800 Subject: [PATCH] Do not trim words as it breaks the popular googlenews model --- src/compat/word2vec.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/compat/word2vec.rs b/src/compat/word2vec.rs index 0022b14..efe982c 100644 --- a/src/compat/word2vec.rs +++ b/src/compat/word2vec.rs @@ -95,7 +95,6 @@ where for idx in 0..n_words { let word = read_string(reader, b' ', lossy)?; - let word = word.trim(); words.push(word.to_owned()); let mut embedding = matrix.index_axis_mut(Axis(0), idx);