From 08df24412a4f4c04572696699b0f495caf269c21 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 29 Aug 2023 14:31:58 +0200 Subject: [PATCH] Delete less aggressively --- crates/ai/src/streaming_diff.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ai/src/streaming_diff.rs b/crates/ai/src/streaming_diff.rs index 7ea7f6dacd..7399a7b4fa 100644 --- a/crates/ai/src/streaming_diff.rs +++ b/crates/ai/src/streaming_diff.rs @@ -82,9 +82,9 @@ pub struct StreamingDiff { impl StreamingDiff { const INSERTION_SCORE: f64 = -1.; - const DELETION_SCORE: f64 = -5.; - const EQUALITY_BASE: f64 = 2.; - const MAX_EQUALITY_EXPONENT: i32 = 20; + const DELETION_SCORE: f64 = -20.; + const EQUALITY_BASE: f64 = 1.8; + const MAX_EQUALITY_EXPONENT: i32 = 16; pub fn new(old: String) -> Self { let old = old.chars().collect::>();