Package org.languagetool.gui

Examples of org.languagetool.gui.Configuration


  LanguageToolHttpHandler(boolean verbose, Set<String> allowedIps, boolean internal, RequestLimiter requestLimiter) throws IOException {
    this.verbose = verbose;
    this.allowedIps = allowedIps;
    this.internalServer = internal;
    this.requestLimiter = requestLimiter;
    config = new Configuration(null);
  }
View Full Code Here


   */
  private JLanguageTool getLanguageToolInstance(Language lang, Language motherTongue) throws Exception {
    final JLanguageTool newLanguageTool = new JLanguageTool(lang, motherTongue);
    newLanguageTool.activateDefaultPatternRules();
    newLanguageTool.activateDefaultFalseFriendRules();
    config = new Configuration(lang);
    if (!useQuerySettings && internalServer && config.getUseGUIConfig()) { // use the GUI config values
      configureGUI(newLanguageTool);
    }
    if (useQuerySettings) {
      Tools.selectRules(newLanguageTool, disabledRules, enabledRules, useEnabledOnly);
View Full Code Here

  }

  private void prepareConfig(final Language lang) {
    try {
      final File homeDir = getHomeDir();
      config = new Configuration(homeDir, CONFIG_FILE, lang);
      disabledRules = config.getDisabledRuleIds();
      if (disabledRules == null) {
        disabledRules = new HashSet<>();
      }
      disabledRulesUI = new HashSet<>(disabledRules);
View Full Code Here

    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);
    }
View Full Code Here

  }

  private void prepareConfig(final Language lang) {
    try {
      final File homeDir = getHomeDir();
      config = new Configuration(homeDir, CONFIG_FILE, lang);
      disabledRules = config.getDisabledRuleIds();
      if (disabledRules == null) {
        disabledRules = new HashSet<>();
      }
      disabledRulesUI = new HashSet<>(disabledRules);
View Full Code Here

TOP

Related Classes of org.languagetool.gui.Configuration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.