{"record":{"id":"7518e6ec75e12559","repo":"stanfordnlp/CoreNLP","slug":"unknown-timeannotator-timeannotator","errorCode":null,"errorMessage":"Unknown timeAnnotator: ${timeAnnotator}","messagePattern":"Unknown timeAnnotator: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/time/SUTimeMain.java","lineNumber":903,"sourceCode":"    }\n    pipeline.addAnnotator(new POSTaggerAnnotator(false));\n//    pipeline.addAnnotator(new NumberAnnotator(false));\n//    pipeline.addAnnotator(new QuantifiableEntityNormalizingAnnotator(false, false));\n    String timeAnnotator = props.getProperty(\"timeAnnotator\", \"sutime\");\n    switch (timeAnnotator) {\n      case \"gutime\":\n        useGUTime = true;\n        pipeline.addAnnotator(new GUTimeAnnotator(\"gutime\", props));\n        break;\n      case \"heideltime\":\n        requiredDocDateFormat = \"yyyy-MM-dd\";\n        pipeline.addAnnotator(new HeidelTimeAnnotator(\"heideltime\", props));\n        break;\n      case \"sutime\":\n        pipeline.addAnnotator(new TimeAnnotator(\"sutime\", props));\n        break;\n      default:\n        throw new IllegalArgumentException(\"Unknown timeAnnotator: \" + timeAnnotator);\n    }\n    return pipeline;\n  }\n\n  enum InputType { TEXTFILE, TEXT, TIMEBANK_CSV, TEMPEVAL2, TEMPEVAL3 }\n\n  private static void configLogger(String out) throws IOException {\n    File outDir = new File(out);\n    if (!outDir.exists()) {\n      outDir.mkdirs();\n    }\n    StringBuilder sb = new StringBuilder();\n    sb.append(\"handlers=java.util.logging.ConsoleHandler, java.util.logging.FileHandler\\n\");\n    sb.append(\".level=SEVERE\\n\");\n    sb.append(\"edu.stanford.nlp.level=INFO\\n\");\n    sb.append(\"java.util.logging.ConsoleHandler.level=SEVERE\\n\");\n    sb.append(\"java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter\\n\");\n    sb.append(\"java.util.logging.FileHandler.level=INFO\\n\");","sourceCodeStart":885,"sourceCodeEnd":921,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/time/SUTimeMain.java#L885-L921","documentation":"SUTimeMain builds an annotation pipeline from a named time annotator (heideltime, sutime, etc.). Passing any other name hits the default branch and throws IllegalArgumentException. It is purely a configuration/naming mistake: the chosen timeAnnotator string is not one of the implemented options.","triggerScenarios":"Running SUTimeMain with the timeAnnotator option set to a misspelled or unsupported value (e.g. 'SUTime', 'heidel', 'gutime') instead of exactly 'sutime' or 'heideltime'.","commonSituations":"Typo in command-line/properties config, copying examples from other tools (GUTime, HeidelTime standalone), or older/newer versions where the available annotator set differs.","solutions":["Set timeAnnotator to exactly 'sutime' (or 'heideltime') as supported by your CoreNLP version","Check spelling/case against the switch statement in SUTimeMain.createPipeline","Confirm the annotator's dependency is present (HeidelTime needs its JAR) — though a missing dependency is a separate failure","Use a CoreNLP version that includes the annotator you intended"],"exampleFix":"// before\nProperties props = new Properties();\nprops.setProperty(\"timeAnnotator\", \"SUTime\");\n// after\nprops.setProperty(\"timeAnnotator\", \"sutime\");\n","handlingStrategy":"validation","validationCode":"Set<String> valid = Set.of(\"sutime\", \"heideltime\");\nif (!valid.contains(timeAnnotator)) { throw new IllegalArgumentException(\"timeAnnotator must be one of \" + valid); }","typeGuard":null,"tryCatchPattern":"try { pipeline = createPipeline(props); } catch (IllegalArgumentException e) { /* log accepted values and fix config */ }","preventionTips":["Use exact lowercase annotator names ('sutime', 'heideltime')","Copy config from the version's own docs/examples, not other tools","List accepted values in your deployment config validation"],"tags":["java","cli","config","enum"],"backgroundTag":"invalid-enum-value","analyzedSha":"1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a","analyzedAt":"2026-09-10T02:24:07.274Z","contentChangedAt":"2026-09-10T02:24:07.274Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}