newLanguageTool.activateDefaultPatternRules();
newLanguageTool.activateDefaultFalseFriendRules();
if (languageModelDir != null) {
newLanguageTool.activateLanguageModelRules(languageModelDir);
}
final Configuration config = new Configuration(lang);
if (!params.useQuerySettings && internalServer && config.getUseGUIConfig()) { // use the GUI config values
configureGUI(newLanguageTool, config);
}
if (params.useQuerySettings) {
Tools.selectRules(newLanguageTool, params.disabledRules, params.enabledRules, params.useEnabledOnly);
}