flx 0.2.2

Full-text searching and scoring of strings
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright 2015 Jerome Rasky <jerome@rasky.co>
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT
// or http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
pub const WHITESPACE_FACTOR: f32 = 5.0;
pub const WHITESPACE_REDUCE: f32 = 0.5;
pub const CLASS_FACTOR: f32 = 3.0;
pub const FIRST_FACTOR: f32 = 3.0;
pub const CLASS_REDUCE: f32 = 0.5;

pub const DIST_WEIGHT: f32 = -10.0;
pub const HEAT_WEIGHT: f32 = 5.0;
pub const FACTOR_REDUCE: f32 = 0.02;

pub const MAX_LEN: usize = 80;