stanfordnlp/CoreNLP · error · RuntimeException

Results different from expected baseline

Error message

Results different from expected baseline

What it means

RuntimeException from TestThreadedTagger.compareResults when the accuracy results computed by two differently configured taggers (or threads) differ from the expected baseline, indicating a determinism or configuration regression in the threaded tagging test.

Solutions

  1. Compare the tagger configurations for unintended differences
  2. Check for nondeterminism (threading, ordering) affecting results
  3. Update the baseline only if the change is intended
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/edu/stanford/nlp/tagger/maxent/TestThreadedTagger.java:120 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at src/edu/stanford/nlp/tagger/maxent/TestThreadedTagger.java:120

    @Override
    public void run() {
      try {
        Timing t = new Timing();
        TestClassifier testClassifier = new TestClassifier(tagger);
        long millis = t.stop();
        resultsString = testClassifier.resultsString(tagger);
        System.out.println("Thread " + threadName + " took " + millis +
                           " milliseconds to tag " + testClassifier.getNumWords() +
                           " words.\n" + resultsString);
      } catch(IOException e) {
        throw new RuntimeException(e);
      }
    }
  } // end class TaggerThread

  public static void compareResults(String results, String baseline) {
    if (!results.equals(baseline)) {
      throw new RuntimeException("Results different from expected baseline");
    }
  }

  public static void main(final String[] args)
    throws ClassNotFoundException, IOException, InterruptedException
  {
    Properties props = StringUtils.argsToProperties(args);
    runThreadedTest(props);
  }

  public static void runThreadedTest(Properties props)
    throws ClassNotFoundException, IOException, InterruptedException
  {
    ArrayList<Properties> configs = new ArrayList<>();
    ArrayList<MaxentTagger> taggers = new ArrayList<>();
    int numThreads = DEFAULT_NUM_THREADS;

    // let the user specify how many threads to run in the first test case

View on GitHub (pinned to 1b7edd19c4)