{"record":{"id":"378e489fb63558ea","repo":"stanfordnlp/CoreNLP","slug":"annotatorname-entry-doesn-t-have-overwriteable","errorCode":null,"errorMessage":"${annotatorName}: Entry doesn't have overwriteable types ${entry}, but entry type is in noDefaultOverwriteLabels","messagePattern":"(.+?): Entry doesn't have overwriteable types (.+?), but entry type is in noDefaultOverwriteLabels","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/edu/stanford/nlp/pipeline/TokensRegexNERAnnotator.java","lineNumber":847,"sourceCode":"          String newTypeDesc = entry.getTypeDescription();\n          if (!oldTypeDesc.equals(newTypeDesc)) {\n            if (verbose) {\n              logger.warn(annotatorName + \": Ignoring duplicate entry: \" +\n                      split[0] + \", old type = \" + oldTypeDesc + \", new type = \" + newTypeDesc);\n            }\n          // } else {\n          //   if (verbose) {\n          //     logger.warn(annotatorName + \": Duplicate entry [ignored]: \" +\n          //             split[0] + \", old type = \" + oldEntry.type + \", new type = \" + type);\n          //   }\n          }\n          continue;\n        }\n      }\n\n      // Print some warning if label belongs to noDefaultOverwriteLabels but there is no overwritable types\n      if (entry.overwritableTypes.isEmpty() && hasNoOverwritableType(noDefaultOverwriteLabels, entry.types)) {\n        logger.warn(annotatorName + \": Entry doesn't have overwriteable types \" +\n                entry + \", but entry type is in noDefaultOverwriteLabels\");\n      }\n\n      entries.add(entry);\n      entryToMappingFileNumber.put(entry, mappingFileIndex);\n      seenRegexes.put(key, entry);\n      if (entry.tokensRegex != null) isTokensRegex++;\n    }\n\n    logger.log(annotatorName + \": Read \" + (entries.size() - origEntriesSize) +\n            \" unique entries out of \" + lineCount + \" from \" + mappingFilename\n       + \", \" + isTokensRegex + \" TokensRegex patterns.\");\n    return entries;\n  }\n\n  private static boolean hasNoOverwritableType(Set<String> noDefaultOverwriteLabels, String[] types) {\n    for (String type:types) {\n      if (noDefaultOverwriteLabels.contains(type)) return true;","sourceCodeStart":829,"sourceCodeEnd":865,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/pipeline/TokensRegexNERAnnotator.java#L829-L865","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["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).","Remove the entry's type from the noDefaultOverwriteLabels option if it should be freely overwritable.","Remove or fix the entry if it is not meant to overwrite anything; it will have no effect.","Verify the mapping file column layout (pattern, exact match, overwrite, type, group) matches the documented TokensRegexNERAnnotator format."],"exampleFix":"// before\nperson\tOVERWRITE\n// (type in noDefaultOverwriteLabels, no overwritable types)\n// after\nperson\t{ TYPE1, TYPE2 }\tPERSON","handlingStrategy":"validation","validationCode":"if (entry.overwritableTypes.isEmpty() && noDefaultOverwriteLabels.contains(entry.type)) {\n  throw new IllegalArgumentException(\"Entry \" + entry + \" cannot overwrite its type \" + entry.type);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always fill the overwrite/overwritableTypes column when the entry type is protected by noDefaultOverwriteLabels","Keep noDefaultOverwriteLabels minimal and documented","Validate rules files in CI before loading them into the annotator"],"tags":["nlp","ner","configuration","warning"],"backgroundTag":"invalid-config-value","analyzedSha":"1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a","analyzedAt":"2026-09-10T02:24:07.274Z","contentChangedAt":"2026-09-10T02:24:07.274Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}