{"record":{"id":"4e2bb5633c644504","repo":"languagetool-org/languagetool","slug":"a-separator-character-fsa-dict-separator-must-be","errorCode":null,"errorMessage":"A separator character (fsa.dict.separator) must be defined in the dictionary info file.","messagePattern":"A separator character \\(fsa\\.dict\\.separator\\) must be defined in the dictionary info file\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"languagetool-tools/src/main/java/org/languagetool/tools/DictionaryBuilder.java","lineNumber":151,"sourceCode":"      String line;\n      while ((line = br.readLine()) != null) {\n        Matcher m = pFreqEntry.matcher(line);\n        if (m.matches()) {\n          freqList.put(m.group(3), Integer.parseInt(m.group(1)));\n        }\n      }\n    } catch (IOException e) {\n      throw new RuntimeException(\"Cannot read file: \" + freqListFile.getAbsolutePath());\n    }\n  }\n  \n  protected File addFreqData(File dictFile, boolean useSeparator) throws IOException {\n    if (!isOptionTrue(\"fsa.dict.frequency-included\")) {\n      throw new IOException(\"In order to use frequency data add the line 'fsa.dict.frequency-included=true' to the dictionary info file.\");\n    }\n    String separator = getOption(\"fsa.dict.separator\");\n    if (separator == null || separator.trim().isEmpty()) {\n      throw new IOException(\"A separator character (fsa.dict.separator) must be defined in the dictionary info file.\");\n    }\n    File tempFile = File.createTempFile(DictionaryBuilder.class.getSimpleName(), \"WithFrequencies.txt\");\n    tempFile.deleteOnExit();\n    String encoding = getOption(\"fsa.dict.encoding\");\n    int freqValuesApplied = 0;\n\n    try (BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(tempFile.getAbsoluteFile()), encoding));\n         BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(dictFile.getAbsoluteFile()), encoding))) {\n      String line;\n      int maxFreq = Collections.max(freqList.values());\n      double maxFreqLog = Math.log(maxFreq);\n      while ((line = br.readLine()) != null) {\n        Matcher m = pTaggerEntry.matcher(line);\n        if (m.matches()) {\n          int freq = 0;\n          String key = m.group(1);\n          if (freqList.containsKey(key)) {\n            freq = freqList.get(key);","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/languagetool-org/languagetool/blob/2e990059ce67d5e2a0f7f7ca5d31160c6709df4b/languagetool-tools/src/main/java/org/languagetool/tools/DictionaryBuilder.java#L133-L169","documentation":"Configuration guard in DictionaryBuilder.addFreqData: the dictionary .info file has no fsa.dict.separator property, so frequency/lemma fields cannot be separated from the encoded entry.","triggerScenarios":"Thrown at languagetool-tools/src/main/java/org/languagetool/tools/DictionaryBuilder.java:151 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add fsa.dict.separator=<char> to the dictionary .info file","Use a separator character that does not occur in encoded entries"],"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"}