stanfordnlp/CoreNLP · warning

Conflicting properties. Multi-word rules file will be…

Error message

Conflicting properties. Multi-word rules file will be considered.

What it means

StatTokSentTrainer trains a statistical sentence splitter. When both a multiWordRulesFile is supplied and inferMultiWordRules is enabled, the two options conflict; the trainer logs a warning and proceeds using the explicitly provided rules file, ignoring inference.

Solutions

  1. Remove the inferMultiWordRules flag when supplying -multiWordRulesFile.
  2. Remove -multiWordRulesFile if you want rules inferred from the training set.
  3. Re-run training and confirm the intended rules source via the subsequent log lines.
  4. Document which mode your training script uses to avoid conflicting flags.

Example fix

// before
java ... StatTokSentTrainer -multiWordRulesFile rules.tsv -inferMultiWordRules ...
// after
java ... StatTokSentTrainer -multiWordRulesFile rules.tsv ...
Defensive patterns

Strategy: validation

Validate before calling

if (multiWordRulesFile != null && inferMultiWordRules) {
  throw new IllegalArgumentException("Use either -multiWordRulesFile or -inferMultiWordRules, not both");
}

Prevention

When it happens

Trigger: Running StatTokSentTrainer.main with -multiWordRulesFile set and the inferMultiWordRules flag enabled at the same time.

Common situations: Leftover command-line flags from a previous training run; scripts that always pass the rules file while also enabling inference; misunderstanding that the file option takes precedence.

Understand the failure class

Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.

Related errors


AI-assisted analysis of stanfordnlp/CoreNLP@1b7edd19c4 (2026-09-10). Data as JSON: /api/errors/486cf157e9b16137. Report an issue: GitHub.

Appendix: source

Thrown at src/edu/stanford/nlp/process/stattok/StatTokSentTrainer.java:429

    String multiWordRulesFile 	= properties.getProperty("multiWordRulesFile", null);
    int windowSize 		= Integer.parseInt(properties.getProperty("windowSize", "4")); //must reflect actual n. of features
    boolean inferMultiWordRules = Integer.parseInt(properties.getProperty("inferMultiWordRules", "0")) != 0;

    if (properties.getProperty("help", null) != null) {
      help();
      return;
    }

    if (trainFile == null){
      logger.err("Error: No training file provided in properties or via command line.");
      return;
    }

    Map<String, String[]> multiWordRules = new HashMap<String, String[]>();
    // Read or generate multi-word rules
    if (multiWordRulesFile != null){
      if (inferMultiWordRules){
        logger.warn("Conflicting properties. Multi-word rules file will be considered.");
      }
      logger.info("Reading Multi-Word rules file ... ");
      multiWordRules = trainTokenizer.readMultiWordRules(multiWordRulesFile);
    } else {
      if (inferMultiWordRules){
        logger.info("Inferring Multi-Word rules from training set ... ");
        multiWordRules = trainTokenizer.inferMultiWordRules(trainFile);
      }
      else{
        logger.warn("No multi-word rules provided. No inferMultiWordRules flag validated. Not inferring rules from training.");
      }
    }

    // Generate training file from ConLL-U
    logger.info("Creating training set from "+trainFile);
    ArrayList<Pair<String, String>> classCharText = trainTokenizer.fileToTrainSet(trainFile,multiWordRules);
    logger.info("Adding Features");
    List<String> trainingInput = trainTokenizer.addFeatures(classCharText, windowSize);

View on GitHub (pinned to 1b7edd19c4)