{"record":{"id":"52bb321060b10e33","repo":"languagetool-org/languagetool","slug":"unknown-line-format-when-loading-manual-synthesize","errorCode":null,"errorMessage":"Unknown line format when loading manual synthesizer dictionary, expected 3 parts separated by '\" + separator + \"', found \" + parts.length + \": '\" + line + \"'","messagePattern":"Unknown line format when loading manual synthesizer dictionary, expected 3 parts separated by '\" \\+ separator \\+ \"', found \" \\+ parts\\.length \\+ \": '\" \\+ line \\+ \"'","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"languagetool-core/src/main/java/org/languagetool/synthesis/ManualSynthesizer.java","lineNumber":208,"sourceCode":"  }\n\n  private static Map<TaggedWord, List<String>> loadMapping(InputStream inputStream) throws IOException {\n    Map<TaggedWord, List<String>> mapping = new HashMap<>();\n    try (Scanner scanner = new Scanner(inputStream, StandardCharsets.UTF_8)) {\n      String separator = DEFAULT_SEPARATOR;\n      while (scanner.hasNextLine()) {\n        String line = scanner.nextLine();\n        line = line.trim();\n        if (line.startsWith(\"#separatorRegExp=\")) {\n          separator = line.replace(\"#separatorRegExp=\", \"\");\n        }\n        if (StringTools.isEmpty(line) || line.charAt(0) == '#') {\n          continue;\n        }\n        line = StringUtils.substringBefore(line, \"#\").trim();\n        String[] parts = line.split(separator);\n        if (parts.length != 3) {\n          throw new IOException(\"Unknown line format when loading manual synthesizer dictionary, \" +\n            \"expected 3 parts separated by '\" + separator + \"', found \" + parts.length + \": '\" + line + \"'\");\n        }\n        String form = parts[0];\n        String lemma = parts[1];\n        if (form.equals(lemma)) {\n          form = lemma;\n        }\n        lemma = intern(lemma);\n        String posTag = intern(parts[2]);\n        mapping.computeIfAbsent(new TaggedWord(lemma, posTag), __ -> new ArrayList<>()).add(form);\n      }\n    }\n    return mapping;\n  }\n\n}\n","sourceCodeStart":190,"sourceCodeEnd":225,"githubUrl":"https://github.com/languagetool-org/languagetool/blob/2e990059ce67d5e2a0f7f7ca5d31160c6709df4b/languagetool-core/src/main/java/org/languagetool/synthesis/ManualSynthesizer.java#L190-L225","documentation":"Error \"Unknown line format when loading manual synthesizer dictionary, expected 3 parts separated by '\" + separator + \"', found \" + parts.length + \": '\" + line + \"'\" thrown in languagetool-org/languagetool.","triggerScenarios":"Thrown at languagetool-core/src/main/java/org/languagetool/synthesis/ManualSynthesizer.java:208 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the offending line in the manual synthesizer .txt file so it has exactly inflected-form, separator, and form parts","Check whether a #separatorRegExp= header changed the expected separator and reformat lines accordingly","Remove stray separators inside fields or extra trailing separators"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}