Skip to content

feat: "news" used as plural #691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions harper-core/src/linting/matcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,36 @@ impl Matcher {
"World","War","Ii" => "World War II"
});

// plural 'news'
triggers.extend(pt! {
"news","are" => "news is",
"news","were" => "news was",
"many","news" => "a lot of news",
"Many","news" => "A lot of news",
"many","news","are" => "a lot of news is",
"Many","news","are" => "A lot of news is",
"many","news","were" => "a lot of news was",
"Many","news","were" => "A lot of news was",
"a","news" => "some news",
"A","news" => "Some news",
"a","news" => "a piece of news",
"A","news" => "A piece of news",
"each","news" => "each piece of news",
"every","news" => "every piece of news",
"several","news" => "several pieces of news",
"these","news" => "this news",
"these","news","are" => "this news is",
"These","news","are" => "This news is",
"these","news","were" => "this news was",
"These","news","were" => "This news weas",
"those","news" => "that news",
"those","news","are" => "that news is",
"Those","news","are" => "That news is",
"those","news","were" => "that news was",
"Those","news","were" => "That news was",
"two","news" => "two pieces of news"
});

triggers.push(Rule {
pattern: vec![pt!("L"), pt!(Period), pt!("L"), pt!(Period), pt!("M")],
replace_with: vecword!("large language model"),
Expand Down