diff --git a/crates/proof/src/lib.rs b/crates/proof/src/lib.rs index 9d345ab6..ea42c333 100644 --- a/crates/proof/src/lib.rs +++ b/crates/proof/src/lib.rs @@ -315,7 +315,7 @@ fn known_core(w: &str) -> bool { return true; } // Inflections. - let stems: [(&str, &[&str]); 12] = [ + let stems: [(&str, &[&str]); 13] = [ ("'s", &[""]), ("s", &[""]), ("es", &["", "e"]), @@ -325,6 +325,8 @@ fn known_core(w: &str) -> bool { ("ing", &["", "e"]), ("ly", &["", "le"]), ("ily", &["y"]), + // specifically → specific (#1694): only -ic adjectives, so "desktopally" stays wrong. + ("ically", &["ic"]), ("er", &["", "e"]), ("est", &["", "e"]), ("ness", &[""]), @@ -924,6 +926,27 @@ mod tests { assert!(suggest("Wrold", 3).contains(&"World".to_string())); } + /// #1694: `-ically` adverbs come from their `-ic` adjective (specific → specifically). + #[test] + fn ically_adverbs_are_known() { + for w in ["specifically", "scientifically", "automatically", "dramatically", "Specifically"] { + assert!(is_correct(w), "{w}"); + } + for w in ["specificaly", "specifcally", "zzzically"] { + assert!(!is_correct(w), "{w}"); + } + } + + /// #1694 review: only `-ic` adjectives take `-ally`; other known words (dictionary or + /// supplement) don't. + #[test] + fn non_ic_words_do_not_take_ally() { + for (base, wrong) in [("desktop", "desktopally"), ("house", "houseally"), ("final", "finalally"), ("green", "greenally")] { + assert!(is_correct(base), "{base}"); + assert!(!is_correct(wrong), "{wrong}"); + } + } + /// #520: common modern words (and their inflections) are known; misspellings still flagged. #[test] fn common_modern_words() {