Where can I find the sourceFile - grammar.xml?

I’m using LanguageTool HTTP API

Where can I find the file ‘grammar.xml’?
“rule”: {
“id”: “COMP_THAN”,
“subId”: “3”,
“sourceFile”: “grammar.xml”,
“description”: “Comparison with ‘than’, e.g. ‘bigger then (than)’”,
“issueType”: “grammar”,
“category”: {
“id”: “GRAMMAR”,
“name”: “Grammar”
},

It’s at ./org/languagetool/rules/en/grammar.xml when you have downloaded LT as a ZIP file.

Thank you for your reply - I downloaded it.

Using the API (https://api.languagetoolplus.com/v2/check), when I run this text:
" Additionally, if you start off by doing some passive stretches first then transition into active ones later on, those same poses will become easier as your body starts warming up from the activity before. Thus when done afterwards, these low intensity positions create better range of motion over time—increasing strength and balance too!"

LanguageTools is suggesting I replace as with than. But, to me, it seems like a weird suggestion. I was curious as to why it said that, and how I might avoid such suggestions in the future.

{
“message”: “Comparison requires “than”, not ‘then’ nor ‘as’.”,
“shortMessage”: “Grammatical problem: use ‘than’”,
“replacements”: [
{
“value”: “than”,
“shortDescription”: “used in comparisons”
}
],
“offset”: 149,
“length”: 2,
“context”: {
“text”: “…on, those same poses will become easier as your body starts warming up from the ac…”,
“offset”: 43,
“length”: 2
},
“sentence”: “Additionally, if you start off by doing some passive stretches first then transition into active ones later on, those same poses will become easier as your body starts warming up from the activity before.”,
“type”: {
“typeName”: “Other”
},
“rule”: {
“id”: “COMP_THAN”,
“subId”: “3”,
“sourceFile”: “grammar.xml”,
“description”: “Comparison with ‘than’, e.g. ‘bigger then (than)’”,
“issueType”: “grammar”,
“category”: {
“id”: “GRAMMAR”,
“name”: “Grammar”
},

You could simply report it as a false positive. Here, or even better, on Github.

1 Like