{"record":{"id":"6959ef3ab0ad800d","repo":"stanfordnlp/CoreNLP","slug":"not-yet-implemented","errorCode":null,"errorMessage":"Not yet implemented!","messagePattern":"Not yet implemented!","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/international/arabic/process/ArabicSegmenter.java","lineNumber":455,"sourceCode":"      tedEvalParseTree.close();\n      tedEvalParseSeg.close();\n    }\n  }\n\n  private static String tedEvalSanitize(String str) {\n    return str.replaceAll(\"\\\\(\", \"#lp#\").replaceAll(\"\\\\)\", \"#rp#\");\n  }\n\n  /**\n   * Evaluate P/R/F1 when the input is raw text.\n   */\n  private static void evaluateRawText(PrintWriter pwOut) {\n    // TODO(spenceg): Evaluate raw input w.r.t. a reference that might have different numbers\n    // of characters per sentence. Need to implement a monotonic sequence alignment algorithm\n    // to align the two character strings.\n    //    String gold = flags.answerFile;\n    //    String rawFile = flags.testFile;\n    throw new RuntimeException(\"Not yet implemented!\");\n  }\n\n  public void serializeSegmenter(String filename) {\n    classifier.serializeClassifier(filename);\n  }\n\n  public void loadSegmenter(String filename, Properties p) {\n    try {\n      classifier = CRFClassifier.getClassifier(filename, p);\n    } catch (ClassCastException | IOException | ClassNotFoundException e) {\n      throw new RuntimeIOException(\"Failed to load segmenter \" + filename, e);\n    }\n  }\n\n  @Override\n  public void loadSegmenter(String filename) {\n    loadSegmenter(filename, new Properties());\n  }","sourceCodeStart":437,"sourceCodeEnd":473,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/international/arabic/process/ArabicSegmenter.java#L437-L473","documentation":"evaluateRawText() is a placeholder: evaluating raw (unsegmented) input against a gold reference requires a monotonic character-alignment algorithm that was never implemented, so the method unconditionally throws RuntimeException(\"Not yet implemented!\"). It is invoked from main when testFile is set without answerFile-style aligned gold data.","triggerScenarios":"Running the ArabicSegmenter main with evaluation flags pointing at a raw test file where evaluation against a differently-segmented gold reference would be needed (gold answers with different characters-per-sentence).","commonSituations":"Running command-line evaluation of the segmenter on raw untokenized Arabic text; the TODO in the source shows this path was never completed.","solutions":["Evaluate against a gold file whose sentences align one-to-one with the input (use the standard evaluate path, not raw-text evaluation)","Pre-segment or align the raw test file so it matches the gold reference segmentation, then use the supported evaluation mode","Implement the missing monotonic alignment algorithm and rebuild if raw-text evaluation is truly needed"],"exampleFix":"// before\njava ArabicSegmenter -testFile raw.txt -answerFile gold.txt  // hits evaluateRawText\n// after\njava ArabicSegmenter -testFile gold-aligned.txt -answerFile gold.txt  // aligned evaluation path","handlingStrategy":"validation","validationCode":"// only use the supported aligned-evaluation mode\nboolean rawEval = (testFile != null && goldNotAligned);\nif (rawEval) throw new IllegalStateException(\"Raw-text evaluation unsupported in ArabicSegmenter\");","typeGuard":null,"tryCatchPattern":"try { ArabicSegmenter.main(args); } catch (RuntimeException e) { if (e.getMessage().startsWith(\"Not yet implemented\")) { /* use aligned evaluation instead */ } }","preventionTips":["Evaluate only with gold files aligned one-to-one with the test input","Avoid the raw-test-file evaluation path in this CoreNLP version"],"tags":["java","nlp","not-implemented","evaluation"],"backgroundTag":"method-not-implemented","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"}