stanfordnlp/CoreNLP · warning

There is no word shaper called

Error message

There is no word shaper called '${val}'; no word shape features will be used.

What it means

SeqClassifierFlags.setProperties parses key/value property pairs for sequence classifiers (CRF, CMM). For the `wordShape` key it calls WordShapeClassifier.lookupShaper(val); if the name is unrecognized it resolves to NOWORDSHAPE and logs this warning, meaning word shape features are silently disabled for the run.

Solutions

  1. Use a valid shaper name: e.g. wordShape=chris4 or wordShape=jenkinsSmith (see WordShapeClassifier.lookupShaper).
  2. Check spelling/case of the wordShape value in your properties file.
  3. Verify programmatically with WordShapeClassifier.lookupShaper(name) != WordShapeClassifier.NOWORDSHAPE before training.
  4. Re-train/evaluate after fixing — the previous run silently lacked word shape features.

Example fix

// before
props.setProperty("wordShape", "chriss4");
// after
props.setProperty("wordShape", "chris4");
Defensive patterns

Strategy: validation

Validate before calling

Object shape = WordShapeClassifier.lookupShaper(props.getProperty("wordShape", ""));
if (shape.equals(WordShapeClassifier.NOWORDSHAPE)) throw new IllegalArgumentException("Unknown wordShape: " + props.getProperty("wordShape"));

Prevention

When it happens

Trigger: Passing property wordShape=<name> whose value is not a known shaper name (e.g. 'shaped', 'chris4' misspelled, wrong case handled, but 'wordShape=foobar' fails) to a CRFClassifier or other seq classifier.

Common situations: Typos in training/test properties files; copying flags between classifier types that use different shaper names; remembering names like 'chris' when valid ones are e.g. chris2, chris3, chris4, jenkinsSmith.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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

Appendix: source

Thrown at src/edu/stanford/nlp/sequences/SeqClassifierFlags.java:1363

        useIsDateRange = Boolean.parseBoolean(val);
      } else if (key.equalsIgnoreCase("dehyphenateNGrams")) {
        dehyphenateNGrams = Boolean.parseBoolean(val);
      } else if (key.equalsIgnoreCase("lowerNewgeneThreshold")) {
        lowerNewgeneThreshold = Boolean.parseBoolean(val);
      } else if (key.equalsIgnoreCase("usePrev")) {
        usePrev = Boolean.parseBoolean(val);
      } else if (key.equalsIgnoreCase("useNext")) {
        useNext = Boolean.parseBoolean(val);
      } else if (key.equalsIgnoreCase("useTags")) {
        useTags = Boolean.parseBoolean(val);
      } else if (key.equalsIgnoreCase("useWordPairs")) {
        useWordPairs = Boolean.parseBoolean(val);
      } else if (key.equalsIgnoreCase("useGazettes")) {
        useGazettes = Boolean.parseBoolean(val);
      } else if (key.equalsIgnoreCase("wordShape")) {
        wordShape = WordShapeClassifier.lookupShaper(val);
        if (wordShape == WordShapeClassifier.NOWORDSHAPE) {
          log.warn("There is no word shaper called '" + val + "'; no word shape features will be used.");
        }
      } else if (key.equalsIgnoreCase("useShapeStrings")) {
        useShapeStrings = Boolean.parseBoolean(val);
      } else if (key.equalsIgnoreCase("useGoodForNamesCpC")) {
        useGoodForNamesCpC = Boolean.parseBoolean(val);
      } else if (key.equalsIgnoreCase("useDictionaryConjunctions")) {
        useDictionaryConjunctions = Boolean.parseBoolean(val);
      } else if (key.equalsIgnoreCase("useDictionaryConjunctions3")) {
        useDictionaryConjunctions3 = Boolean.parseBoolean(val);
      } else if (key.equalsIgnoreCase("expandMidDot")) {
        expandMidDot = Boolean.parseBoolean(val);
      } else if (key.equalsIgnoreCase("useSequences")) {
        useSequences = Boolean.parseBoolean(val);
      } else if (key.equalsIgnoreCase("usePrevSequences")) {
        usePrevSequences = Boolean.parseBoolean(val);
      } else if (key.equalsIgnoreCase("useNextSequences")) {
        useNextSequences = Boolean.parseBoolean(val);
      } else if (key.equalsIgnoreCase("useLongSequences")) {

View on GitHub (pinned to 1b7edd19c4)