Getting ngram / confusion rule to work

Hi there,

I’ve been trying to follow the instructions on Finding errors using n-gram data - LanguageTool Wiki to get a local instance of Language Tool to identify the errors in the test sentences on that page (e.g. “I can’t remember how to go their.”)

On languagetool.org this error is identified using the CONFUSION_RULE. This doesn’t work when I use it locally configured with the ngram dataset. When looking at the source code, the CONFUSION_RULE doesn’t seem to use or look at the ngram dataset that is configured in the SuggestionsOrdererConfig (as far as I can tell this is the only place in the HTTP server where this configuration parameter is passed). This config appears to only be used in the SuggestionsOrderer (in turn by the MorfologikSpellerRule).

Any thoughts as to what I might be missing?

Many thanks,
Simon

I’ve just figured this out - I wasn’t correctly initialising the ngram data in the instance of JLanguageTool.