languagetool-org / languagetool

Style and Grammar Checker for 25+ Languages
https://languagetool.org
GNU Lesser General Public License v2.1
12.02k stars 1.38k forks source link

[en] Incorrect suggestion in redundancy rule (ADJECTIVE_IN_ATTRIBUTE[1]) #5715

Open marcoagpinto opened 2 years ago

marcoagpinto commented 2 years ago

Hello!

"Much-loved games – now in colour – that inspired a generation included Jet Set Willy, Horace Goes Skiing, Chuckie Egg, Saboteur, Knight Lore and Lords of Midnight."

It suggests replacing "now in colour" with "now".

Thanks!

tiff commented 2 years ago

This rule is a mess... See https://internal1.languagetool.org/regression-tests/via-http/2021-09-20/en-US_full/result_grammar_ADJECTIVE_IN_ATTRIBUTE[1].html

udomai commented 2 years ago

We need to restrict it to look more like BITTER_IN_TASTE.

Lazy solution: restrict \1 to a specific set of adjectives, accept FPs for wordplay:

They are small in size, but large in color.

Optimal solution: create several subrules with specific adjective-noun pairs (large|big|small|tiny in size; red|blue|yellow in colou?r etc. etc.)

This rule has a high deactivation rate, but even in its messy state, it gets 51% apply rate.

tiff commented 2 years ago

Interesting. I made some minor improvements also: https://github.com/languagetool-org/languagetool/commit/25435092f068d2697b1c5e4f2635f70540166793#diff-54b065c892e9aa885ae95cc110a0fc4cc77abba8c81e0eb1c417a27261f966afR106117