fix: flag "piece of advise" (#2266)

This commit is contained in:
Andrew Dunbar
2025-12-03 22:15:50 +00:00
committed by GitHub
parent 483c306110
commit 2910319fb5
2 changed files with 10 additions and 1 deletions

View File

@@ -1361,4 +1361,13 @@ mod tests {
NounVerbConfusion::default(),
);
}
#[test]
fn issue_2041() {
assert_suggestion_result(
"Let me give you a piece of advise.",
NounVerbConfusion::default(),
"Let me give you a piece of advice.",
);
}
}

View File

@@ -24,7 +24,7 @@ impl Default for VerbInsteadOfNoun {
Self {
expr: Box::new(
SequenceExpr::default()
.then(UPOSSet::new(&[UPOS::ADJ]))
.then(UPOSSet::new(&[UPOS::ADJ, UPOS::ADP]))
.then_whitespace()
.then(verbs.clone()),
),