stanfordnlp/CoreNLP · info

Warning: ChineseNumberSequenceClassifier does not have…

Error message

Warning: ChineseNumberSequenceClassifier does not have SUTime implementation.

What it means

classifyWithGlobalInformation is the hook where document-level (SUTime) information would be applied. Since no Chinese SUTime implementation exists, the class warns if useSUTime was requested and then classifies normally without temporal information.

Solutions

  1. Rebuild the classifier/pipeline with useSUTime=false to eliminate the per-call warning.
  2. Run temporal extraction separately with a Chinese-capable tool if needed.
  3. Filter/downgrade this known warning in logging configuration if SUTime must remain enabled.

Example fix

// before
props.setProperty("ner.useSUTime", "true");
// after
props.setProperty("ner.useSUTime", "false");
Defensive patterns

Strategy: validation

Validate before calling

if (classifier instanceof ChineseNumberSequenceClassifier
    && Boolean.parseBoolean(props.getProperty("ner.useSUTime"))) {
  props.setProperty("ner.useSUTime", "false"); // avoid per-call warnings
}

Prevention

When it happens

Trigger: Calling classifyWithGlobalInformation on a ChineseNumberSequenceClassifier constructed with useSUTime=true — i.e. every document classification in a pipeline that enabled SUTime for Chinese.

Common situations: Chinese NER pipeline configured with ner.useSUTime=true (copied from English defaults); the warning repeats per document, polluting logs.

Related errors


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

Appendix: source

Thrown at src/edu/stanford/nlp/ie/regexp/ChineseNumberSequenceClassifier.java:203

    int sz = pl.size();
    while (j < sz && pl.get(j).getString(CoreAnnotations.PartOfSpeechAnnotation.class).equals("CD")) {
      j++;
    }
    if (j >= sz) {
      return false;
    }
    String tag = pl.get(j).getString(CoreAnnotations.PartOfSpeechAnnotation.class);
    String word = pl.get(j).word();
    if (DEBUG) {
      log.info("rightScan testing: " + word + '/' + tag + "; answer is: " + Boolean.toString((tag.equals("NN") || tag.equals("NNS")) && CURRENCY_WORD_PATTERN.matcher(word).matches()));
    }
    return (tag.equals("M") || tag.equals("NN") || tag.equals("NNS")) && CURRENCY_WORD_PATTERN.matcher(word).matches();
  }

  @Override
  public List<CoreLabel> classifyWithGlobalInformation(List<CoreLabel> tokenSequence, CoreMap document, CoreMap sentence) {
    if(useSUTime) {
      log.warn("Warning: ChineseNumberSequenceClassifier does not have SUTime implementation.");
    }
    return classify(tokenSequence);
  }

  @Override
  public void train(Collection<List<CoreLabel>> docs, DocumentReaderAndWriter<CoreLabel> readerAndWriter) {
    // Train is not needed for this rule-based classifier
  }

  @Override
  public void serializeClassifier(String serializePath) {
  }

  @Override
  public void serializeClassifier(ObjectOutputStream oos) {
  }

  @Override

View on GitHub (pinned to 1b7edd19c4)