Taking into consideration extreme cases.

Hello, I’m new to LanguageTool, and I’ve just created my first rule. The rule is about detecting wrong use of homonym words in Greek (words that share the same pronunciation but the spelling and the meaning of them is different). @jaumeortola reviewed my pull request and informed me that the rule seems good. However, as he correctly noticed, there are some extreme situations where the result can be false positive. Should I take into consideration these rare sentences and erase the corresponding suggested replacements or not ?

Thank you in advance!!

This is really difficult to tell without knowing Greek. In general, we try hard to avoid false positives, but if these false positives are really very rare, we might live with them.

1 Like

Hi @antonopoulosn!

I think Jaume’s comment is very pertinent. His counter-example does not seem too far-fetched (“the big one’s missing”).

In those cases, it would be best to not do this via a simple replacement rule. Go rather for an XML rule. In the case of λύπη/λείπει, you could say, for example: whenever “μεγάλη λείπει” is preceded by “με” or followed by a genitive like “του νουνού μου” or a possessive pronoun like “μας”, it’s a safe bet that it should be corrected.

1 Like

To be sure that there are not too many false positives in any rule, it is better not to rely on intuition. You can take a corpus (Wikipedia, Tatoeba…), run LanguageTool with the new rule, and check the positives.

1 Like

Hello @udomai,
I strongly agree that Jaume’s counter-example was on point and understood!! I was referring to other sentences that came across my mind after reading his comment. Anyway, I will review carefully every single suggested replacement and erase the controversial ones. Thank you for your reply!

Hello @jaumeortola,
That sounds very convenient, and I wasn’t aware of it. May I ask if there is a specific way to do that (a site etc.) ?

See Developing Robust Rules | dev.languagetool.org for different ways of testing rules.

Thank you very much! I will check this.