stanfordnlp/CoreNLP · warning

${annotatorName}: Entry doesn't have overwriteable types ${e

Error message

${annotatorName}: Entry doesn't have overwriteable types ${entry}, but entry type is in noDefaultOverwriteLabels

What it means

TokensRegexNERAnnotator loads regex NER entries from mapping files. During loading it checks whether an entry declares overwritable types; if an entry has none and its type is listed in noDefaultOverwriteLabels (types the annotator refuses to overwrite by default), the entry cannot ever override existing NER tags, so a warning is logged. This usually indicates a misconfigured or pointless rules entry.

Solutions

  1. Add overwritable types to the entry so it can overwrite (e.g. set the overwrite column to the types it should replace, or use OVERWRITE for all).
  2. Remove the entry's type from the noDefaultOverwriteLabels option if it should be freely overwritable.
  3. Remove or fix the entry if it is not meant to overwrite anything; it will have no effect.
  4. Verify the mapping file column layout (pattern, exact match, overwrite, type, group) matches the documented TokensRegexNERAnnotator format.

Example fix

// before
person	OVERWRITE
// (type in noDefaultOverwriteLabels, no overwritable types)
// after
person	{ TYPE1, TYPE2 }	PERSON
Defensive patterns

Strategy: validation

Validate before calling

if (entry.overwritableTypes.isEmpty() && noDefaultOverwriteLabels.contains(entry.type)) {
  throw new IllegalArgumentException("Entry " + entry + " cannot overwrite its type " + entry.type);
}

Prevention

When it happens

Trigger: A mapping-file entry has an empty overwritableTypes column while its entry type appears in the noDefaultOverwriteLabels option, e.g. passing rules with no overwrite field when noDefaultOverwriteLabels contains that type.

Common situations: Users craft custom TokensRegex rules files but leave the overwritableTypes column blank; default rules tuned for tokensregex rules with the noDefaultOverwriteLabels option set in pipeline properties; copying rule syntax from a different NER annotator (CRFClassifier) that has no overwrite column.

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/378e489fb63558ea. Report an issue: GitHub.

Appendix: source

Thrown at src/edu/stanford/nlp/pipeline/TokensRegexNERAnnotator.java:847

          String newTypeDesc = entry.getTypeDescription();
          if (!oldTypeDesc.equals(newTypeDesc)) {
            if (verbose) {
              logger.warn(annotatorName + ": Ignoring duplicate entry: " +
                      split[0] + ", old type = " + oldTypeDesc + ", new type = " + newTypeDesc);
            }
          // } else {
          //   if (verbose) {
          //     logger.warn(annotatorName + ": Duplicate entry [ignored]: " +
          //             split[0] + ", old type = " + oldEntry.type + ", new type = " + type);
          //   }
          }
          continue;
        }
      }

      // Print some warning if label belongs to noDefaultOverwriteLabels but there is no overwritable types
      if (entry.overwritableTypes.isEmpty() && hasNoOverwritableType(noDefaultOverwriteLabels, entry.types)) {
        logger.warn(annotatorName + ": Entry doesn't have overwriteable types " +
                entry + ", but entry type is in noDefaultOverwriteLabels");
      }

      entries.add(entry);
      entryToMappingFileNumber.put(entry, mappingFileIndex);
      seenRegexes.put(key, entry);
      if (entry.tokensRegex != null) isTokensRegex++;
    }

    logger.log(annotatorName + ": Read " + (entries.size() - origEntriesSize) +
            " unique entries out of " + lineCount + " from " + mappingFilename
       + ", " + isTokensRegex + " TokensRegex patterns.");
    return entries;
  }

  private static boolean hasNoOverwritableType(Set<String> noDefaultOverwriteLabels, String[] types) {
    for (String type:types) {
      if (noDefaultOverwriteLabels.contains(type)) return true;

View on GitHub (pinned to 1b7edd19c4)