diff options
author | John Hawthorn <john.hawthorn@gmail.com> | 2014-08-30 19:26:22 -0700 |
---|---|---|
committer | John Hawthorn <john.hawthorn@gmail.com> | 2014-08-30 19:48:29 -0700 |
commit | b7305897f1c6d6f499003657b352ccbe6ed1faba (patch) | |
tree | 2b488196c00326620bfd7087e42d6bb4355810c9 /match.c | |
parent | 57e9b44d776259838fe44609bb717cef8caef4e1 (diff) |
scoring: Prefer consecutive matches
Diffstat (limited to 'match.c')
-rw-r--r-- | match.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -77,10 +77,10 @@ double calculate_score(const char *needle, const char *haystack, size_t *positio #define SCORE_GAP_TRAILING -0.005 #define SCORE_GAP_INNER -0.01 #define SCORE_MATCH_CONSECUTIVE 1.0 -#define SCORE_MATCH_SLASH 1.5 -#define SCORE_MATCH_WORD 1.2 -#define SCORE_MATCH_CAPITAL 1.1 -#define SCORE_MATCH_DOT 0.8 +#define SCORE_MATCH_SLASH 0.9 +#define SCORE_MATCH_WORD 0.8 +#define SCORE_MATCH_CAPITAL 0.7 +#define SCORE_MATCH_DOT 0.6 /* Which positions are beginning of words */ char last_ch = '\0'; |