@@ -45,7 +45,7 @@ impl CountVectorizerValidParams {
4545 // word, (integer mapping for word, document frequency for word)
4646 let mut vocabulary: HashMap < String , ( usize , usize ) > = HashMap :: new ( ) ;
4747 for string in x. iter ( ) . map ( |s| transform_string ( s. to_string ( ) , self ) ) {
48- self . read_document_into_vocabulary ( string, & self . split_regex ( ) , & mut vocabulary) ;
48+ self . read_document_into_vocabulary ( string, self . split_regex ( ) , & mut vocabulary) ;
4949 }
5050
5151 let mut vocabulary = self . filter_vocabulary ( vocabulary, x. len ( ) ) ;
@@ -92,7 +92,7 @@ impl CountVectorizerValidParams {
9292 }
9393 // safe unwrap now that error has been handled
9494 let document = transform_string ( document. unwrap ( ) , self ) ;
95- self . read_document_into_vocabulary ( document, & self . split_regex ( ) , & mut vocabulary) ;
95+ self . read_document_into_vocabulary ( document, self . split_regex ( ) , & mut vocabulary) ;
9696 }
9797
9898 let mut vocabulary = self . filter_vocabulary ( vocabulary, documents_count) ;
@@ -340,7 +340,7 @@ impl CountVectorizer {
340340 sprs_vectorized. reserve_outer_dim_exact ( x. len ( ) ) ;
341341 let regex = self . properties . split_regex ( ) ;
342342 for string in x. into_iter ( ) . map ( |s| s. to_string ( ) ) {
343- let row = self . analyze_document ( string, & regex, document_frequencies. view_mut ( ) ) ;
343+ let row = self . analyze_document ( string, regex, document_frequencies. view_mut ( ) ) ;
344344 sprs_vectorized = sprs_vectorized. append_outer_csvec ( row. view ( ) ) ;
345345 }
346346 ( sprs_vectorized, document_frequencies)
@@ -364,7 +364,7 @@ impl CountVectorizer {
364364 file. read_to_end ( & mut document_bytes) . unwrap ( ) ;
365365 let document = encoding:: decode ( & document_bytes, trap, encoding) . 0 . unwrap ( ) ;
366366 sprs_vectorized = sprs_vectorized. append_outer_csvec (
367- self . analyze_document ( document, & regex, document_frequencies. view_mut ( ) )
367+ self . analyze_document ( document, regex, document_frequencies. view_mut ( ) )
368368 . view ( ) ,
369369 ) ;
370370 }
0 commit comments