I’m using JLanguageTool in Java Spring. Currently I’m loading the language tool as follows, in the PostConstruct
method:
langTool = new JLanguageTool(new AmericanEnglish());
langTool.disableRules(RULES_TO_EXCLUDE);
I would like everything to be loaded when I initialize this JLanguageTool
object, however I notice that the first time I use langTools.check(text)
the response takes a few seconds longer to come back than in the next attempts. I’m assuming this is because of some sort of lazy loading in JLanguageTool
which means that not everything is loaded until I perform the first check.
Is there some way to override this setting and force object to be completely initialized when I create new JLanguageTool
? This way all uses of langTools.check(text) will be using completely initialized object.