Verified Commit 0965325b authored by Camil Staps's avatar Camil Staps
Browse files

More importance to matching ngrams than extra text

parent aa041841
......@@ -250,7 +250,7 @@ makeResult orgsearchtype allsyns usedsyns (entry, annots) db
# (SyntaxEntry se) = entry
= (SyntaxResult (
{ general
& distance = -100
& distance = -1000
, documentation = Just se.syntax_description
},
{ SyntaxResultExtras
......@@ -279,7 +279,7 @@ where
distance = sum
[ case 'M'.get MatchingNGrams annots of
Nothing -> 0
Just n -> 0 - toInt (toReal n * 100.0 / toReal (size name))
Just n -> 0 - toInt (100.0 * toReal n ^ 2.0 / toReal (size name))
, case 'M'.get ExactResult annots of
Just 1 -> -1
_ -> 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment