{"record":{"id":"30166939747d10ad","repo":"stanfordnlp/CoreNLP","slug":"format-is-not-implemented-format","errorCode":null,"errorMessage":"Format is not implemented: \" + FORMAT","messagePattern":"Format is not implemented: \" \\+ FORMAT","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/naturalli/OpenIE.java","lineNumber":634,"sourceCode":"   *\n   * @param extraction The triple to write.\n   * @param docid The document ID (for the ReVerb format)\n   * @param sentence The sentence the triple was extracted from (for the ReVerb format)\n   *\n   * @return A String representation of the triple.\n   */\n  public static String tripleToString(RelationTriple extraction, String docid, CoreMap sentence) {\n    switch (FORMAT) {\n      case REVERB:\n        return extraction.toReverbString(docid, sentence);\n      case OLLIE:\n        return extraction.confidenceGloss() + \": (\" + extraction.subjectGloss() + \"; \" + extraction.relationGloss() + \"; \" + extraction.objectGloss() + ')';\n      case DEFAULT:\n        return extraction.toString();\n      case QA_SRL:\n        return extraction.toQaSrlString(sentence);\n      default:\n        throw new IllegalStateException(\"Format is not implemented: \" + FORMAT);\n    }\n\n  }\n\n  /**\n   * Process a single file or line of standard in.\n   *\n   * @param pipeline The annotation pipeline to run the lines of the input through.\n   * @param docid The docid of the document we are extracting.\n   * @param document the document to annotate.\n   */\n  @SuppressWarnings(\"SynchronizeOnNonFinalField\")\n  private static void processDocument(AnnotationPipeline pipeline, String docid, String document) {\n    // Error checks\n    if (document.trim().isEmpty()) {\n      return;\n    }\n","sourceCodeStart":616,"sourceCodeEnd":652,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/naturalli/OpenIE.java#L616-L652","documentation":"tripleToString() formats extracted RelationTriples according to the configured output format (OpenIE.FORMAT). The switch handles REVERB, QA_SRL, and DEFAULT; any other configured format is not implemented, so an IllegalStateException is thrown. This happens during output, after successful extraction.","triggerScenarios":"Setting the -openie.format property to a value other than default/reverb/qasrl (e.g. a typo or a format supported only in newer CoreNLP versions) and running OpenIE's main/CLI through processDocument.","commonSituations":"Typos in the openie.format CLI option; copying example configs from a different CoreNLP version where additional formats exist; case-sensitive format names.","solutions":["Set openie.format to one of the supported values: default, reverb, or qasrl.","Check spelling/case of the configured format string against OpenIE.Format enum values.","Upgrade CoreNLP if you need a format introduced after your current version.","Validate/normalize the format option at program start rather than failing mid-output."],"exampleFix":"// before\nprops.setProperty(\"openie.format\", \"json\");\n// after\nprops.setProperty(\"openie.format\", \"default\"); // or reverb / qasrl","handlingStrategy":"validation","validationCode":"String fmt = props.getProperty(\"openie.format\", \"default\").toLowerCase(Locale.ROOT);\nif (!fmt.equals(\"default\") && !fmt.equals(\"reverb\") && !fmt.equals(\"qasrl\")) {\n  throw new IllegalArgumentException(\"Unsupported openie.format: \" + fmt);\n}","typeGuard":null,"tryCatchPattern":"try {\n  String s = tripleToString(extraction, sentence);\n} catch (IllegalStateException e) {\n  log.error(\"Invalid openie.format configured: \" + e.getMessage());\n}","preventionTips":["Validate openie.format against allowed values at startup","Use the exact enum names (default/reverb/qasrl) in configs","Match format options to the CoreNLP version in use"],"tags":["unsupported-format","openie","output","configuration"],"backgroundTag":"unsupported-config-value","analyzedSha":"1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a","analyzedAt":"2026-09-10T02:24:07.274Z","contentChangedAt":"2026-09-10T02:24:07.274Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}