I use LanguageTool’s Java API to run some custom rules written in an XML (Rule Editor), which is in the same format as that of ‘grammar.xml’.
Now I find it impossible to write certain grammar rules like ‘Although Vs While’ which is based on the intent/meaning of the phrases using the rule editor (https://community.languagetool.org/ruleEditor2/index). Can anyone suggest me on this? I need to write rules to catch grammar errors like ‘Although vs while’, ‘Because vs As’, ‘Greater vs Larger’, ‘Find vs Find out’.
Sentence: Elephant is greater than an ant.
Error to be caught: greater
Suggestion to the user: The word, ‘larger’ is to be used in place of ‘greater’.