{"record":{"id":"2e80be78666fed5e","repo":"languagetool-org/languagetool","slug":"no-speller-rule-found-for-2e80be","errorCode":null,"errorMessage":"No speller rule found for ","messagePattern":"No speller rule found for ","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"languagetool-dev/src/main/java/org/languagetool/dev/UnknownWordFinderForCsv.java","lineNumber":58,"sourceCode":"    List<Path> files = Files.walk(dir.toPath()).filter(Files::isRegularFile).collect(Collectors.toList());\n    for (Path file : files) {\n      handle(file, spellerRule);\n    }\n  }\n\n  @NotNull\n  private SpellingCheckRule getSpellingCheckRule(JLanguageTool lt) {\n    SpellingCheckRule spellerRule = null;\n    for (Rule rule : lt.getAllActiveRules()) {\n      if (rule.isDictionaryBasedSpellingRule()) {\n        if (spellerRule != null) {\n          throw new RuntimeException(\"Found more than one spell rule: \" + rule + \", \" + spellerRule);\n        }\n        spellerRule = (SpellingCheckRule) rule;\n      }\n    }\n    if (spellerRule == null) {\n      throw new RuntimeException(\"No speller rule found for \" + lt.getLanguage());\n    }\n    return spellerRule;\n  }\n\n  private void handle(Path f, SpellingCheckRule rule) throws IOException {\n    int i = 0;\n    if (f.toString().toLowerCase().endsWith(\".csv\")) {\n      List<String> lines = Files.readAllLines(f);\n      for (String line : lines) {\n        String[] parts = line.split(\",\");\n        String word = parts[0].replace(\"\\\"\", \"\");\n        if (rule.isMisspelled(word)) {\n          System.out.println(line);\n          i++;\n        }\n      }\n    } else {\n      System.out.println(\"Ignoring \" + f + \": unknown suffix\");","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/languagetool-org/languagetool/blob/2e990059ce67d5e2a0f7f7ca5d31160c6709df4b/languagetool-dev/src/main/java/org/languagetool/dev/UnknownWordFinderForCsv.java#L40-L76","documentation":"UnknownWordFinderForCsv.getSpellingCheckRule throws a RuntimeException when no dictionary-based spelling rule is active for the given JLanguageTool language, listing the language in the message. Without a speller rule the CSV unknown-word scan cannot proceed.","triggerScenarios":"Running UnknownWordFinderForCsv for a language with no active dictionary-based spelling rule (rule missing or disabled).","commonSituations":"Languages without a spelling rule module; custom configs disabling spelling; passing the wrong Language object.","solutions":["Enable the language's dictionary-based spelling rule","Run the tool only for languages that have a speller rule","Check lt.getAllActiveRules() for an isDictionaryBasedSpellingRule() rule before invoking"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (lt.getAllActiveRules().stream().noneMatch(Rule::isDictionaryBasedSpellingRule)) {\n  throw new IllegalStateException(\"No spelling rule active for \" + lt.getLanguage());\n}","typeGuard":null,"tryCatchPattern":"try { new UnknownWordFinderForCsv(...).run(); } catch (RuntimeException e) { if (e.getMessage().startsWith(\"No speller rule found\")) { System.err.println(\"Enable a spelling rule for this language or skip it\"); } }","preventionTips":["Confirm a spelling rule exists for each language in batch runs","Do not disable all spelling rules before analysis","Filter language lists to those with speller rules"],"tags":["spelling","rules","csv"],"backgroundTag":"empty-result-set","analyzedSha":"2e990059ce67d5e2a0f7f7ca5d31160c6709df4b","analyzedAt":"2026-09-06T09:20:17.015Z","contentChangedAt":"2026-09-06T09:20:17.015Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}