I’ll jump in here and say that I’m having the same problem. I cannot for the life of me get this rule to trigger.
I’m running a local HTTP server. Here is a curl command I’m using, with a few notes on parameters:
I explicitly set 'enabledRules=TOO_LONG_SENTENCE since I believe that it may be default disabled
I disabled all the rules that this sentence triggers (disabledRules=EN_COMPOUNDS,MISSING_HYPHEN,SPELL_OUT_2,SPELL_OUT_3,SPELL_OUT_4,SPELL_OUT_5,COMMA_COMPOUND_SENTENCE,MORFOLOGIK_RULE_EN_US) for a clean test case
Some of the disabled rules are custom ones (SPELL_OUT_2, etc.), but I have tried without them in my custom grammar.xml place and it makes no difference
4. The sentence was sourced from here: Long sentences
5. I have also tried in picky mode in case that somehow overrides enabledRules. Still no dice.
curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' -d 'enabledRules=TOO_LONG_SENTENCE&disabledRules=EN_COMPOUNDS,MISSING_HYPHEN,SPELL_OUT_2,SPELL_OUT_3,SPELL_OUT_4,SPELL_OUT_5,COMMA_COMPOUND_SENTENCE,MORFOLOGIK_RULE_EN_US&language=en-US&text=A path from a point approximately 330 metres east of the most south westerly corner of 17 Batherton Close, Widnes and approximately 208 metres east-south-east of the most southerly corner of Unit 3 Foundry Industrial Estate, Victoria Street, Widnes, proceeding in a generally east-north-easterly direction for approximately 28 metres to a point approximately 202 metres east-south-east of the most south-easterly corner of Unit 4 Foundry Industrial Estate, Victoria Street, and approximately 347 metres east of the most south-easterly corner of 17 Batherton Close, then proceeding in a generally northerly direction for approximately 21 metres to a point approximately 210 metres east of the most south-easterly corner of Unit 5 Foundry Industrial Estate, Victoria Street, and approximately 202 metres east-south-east of the most north-easterly corner of Unit 4 Foundry Industrial Estate, Victoria Street, then proceeding in a generally east-north-east direction for approximately 64 metres to a point approximately 282 metres east-south-east of the most easterly corner of Unit 2 Foundry Industrial Estate, Victoria Street, Widnes and approximately 259 metres east of the most southerly corner of Unit 4 Foundry Industrial Estate, Victoria Street, then proceeding in a generally east-north-east direction for approximately 350 metres to a point approximately 3 metres west-north-west of the most north westerly corner of the boundary fence of the scrap metal yard on the south side of Cornubia Road, Widnes, and approximately 47 metres west-south-west of the stub end of Cornubia Road be diverted to a 3 metre wide path from a point approximately 183 metres east-south-east of the most easterly corner of Unit 5 Foundry Industrial Estate, Victoria Street and approximately 272 metres east of the most north-easterly corner of 26 Ann Street West, Widnes' 'localhost:8010/v2/check' | python -m json.tool
I don’t speak Java so my ability to dive into the code is somewhat limited, so I can only assume that I have missed something obvious here…
The curl works for me if I add level=picky to the parameters. I have tried with https://api.languagetool.org/v2/check instead of localhost. Does that help?