Why is the TOO_LONG_SENTENCE not being triggered?

From my reading of the code the maxWords are set to 40 for english:

But this 179 word sentence doesn’t seem to result in any matches

curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' -d 'text=A%20path%20from%20a%20point%20approximately%20330%20metres%20east%20of%20the%20most%20south%20corner%20of%2017%20Batherton%20Close%2C%20Widnes%20and%20approximately%20208%20metres%20east-south-east%20of%20the%20most%20southerly%20corner%20of%20Unit%203%20Foundry%20Industrial%20Estate%2C%20Victoria%20Street%2C%20Widnes%2C%20proceeding%20in%20a%20generally%20east-north-easterly%20direction%20for%20approximately%2028%20metres%20to%20a%20point%20approximately%20202%20metres%20east-south-east%20of%20the%20most%20south-easterly%20corner%20of%20Unit%204%20Foundry%20Industrial%20Estate%2C%20Victoria%20Street%2C%20and%20approximately%20347%20metres%20east%20of%20the%20most%20south-easterly%20corner%20of%2017%20Batherton%20Close%2C%20then%20proceeding%20in%20a%20generally%20northerly%20direction%20for%20approximately%2021%20metres%20to%20a%20point%20approximately%20210%20metres%20east%20of%20the%20most%20south%20corner%20of%20Unit%205%20Foundry%20Industrial%20Estate%2C%20Victoria%20Street%2C%20and%20approximately%20202%20metres%20east-south-east%20of%20the%20most%20north-easterly%20corner%20of%20Unit%204%20Foundry%20Industrial%20Estate%2C%20Victoria%20Street%2C%20then%20proceeding%20in%20a%20generally%20east-north-east%20direction%20for%20approximately%2064%20metres%20to%20a%20point%20approximately%20282%20metres%20east-south-east%20of%20the%20most%20easterly%20corner%20of%20Unit%202%20Foundry%20Industrial%20Estate%2C%20Victoria%20Street%2C%20Widnes%20and%20approximately%20259%20metres%20east%20of%20the%20most%20southerly%20corner%20of%20Unit%204%20Foundry%20Industrial%20Estate.&language=en&enabledOnly=false' 'https://api.languagetoolplus.com/v2/check'

Semi-related how can one setup the userConfig?

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:

  1. I explicitly set 'enabledRules=TOO_LONG_SENTENCE since I believe that it may be default disabled
  2. 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
  3. 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?

Well guess who wrote type=picky in his testing curl commands.

Sorry for wasting your time with this one :expressionless:

Another aspect here is that it seems TOO_LONG_SENTENCE is not triggered on locale “en-US”. it is however triggered on “en” and “en-GB”.