@@ -18,6 +18,7 @@ fn text_100kb(bencher: Bencher) {
18
18
let text = include_str ! ( "100kb.txt" ) ;
19
19
let stopwords = StopWords :: predefined ( "en" ) . unwrap ( ) ;
20
20
let config = Config { remove_duplicates : false , ..Default :: default ( ) } ;
21
+ segtok:: init ( ) ;
21
22
22
23
bencher. bench_local ( move || {
23
24
black_box ( get_n_best ( usize:: MAX , black_box ( text) , black_box ( & stopwords) , black_box ( & config) ) ) ;
@@ -29,6 +30,7 @@ fn text_3kb(bencher: Bencher) {
29
30
let text = include_str ! ( "3kb.txt" ) ;
30
31
let stopwords = StopWords :: predefined ( "en" ) . unwrap ( ) ;
31
32
let config = Config { remove_duplicates : false , ..Default :: default ( ) } ;
33
+ segtok:: init ( ) ;
32
34
33
35
bencher. bench_local ( move || {
34
36
black_box ( get_n_best ( usize:: MAX , black_box ( text) , black_box ( & stopwords) , black_box ( & config) ) ) ;
@@ -42,6 +44,7 @@ fn text_170b(bencher: Bencher) {
42
44
If you need headphones, we've got you covered!";
43
45
let stopwords = StopWords :: predefined ( "en" ) . unwrap ( ) ;
44
46
let config = Config { remove_duplicates : false , ..Default :: default ( ) } ;
47
+ segtok:: init ( ) ;
45
48
46
49
bencher. bench_local ( move || {
47
50
black_box ( get_n_best ( usize:: MAX , black_box ( text) , black_box ( & stopwords) , black_box ( & config) ) ) ;
0 commit comments