{"record":{"id":"73ffb5291f5a4458","repo":"languagetool-org/languagetool","slug":"please-specify-an-info-file-for-a-synthesizer-as","errorCode":null,"errorMessage":"Please specify an .info file for a synthesizer as the second parameter, named '<xyz>_synth.info', with <xyz> being a language'","messagePattern":"Please specify an \\.info file for a synthesizer as the second parameter, named '<xyz>_synth\\.info', with <xyz> being a language'","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"languagetool-tools/src/main/java/org/languagetool/tools/SynthDictionaryBuilder.java","lineNumber":106,"sourceCode":"          String line = scanner.nextLine();\n          if (!line.startsWith(\"#\")) {\n            result.add(line);\n          }\n        }\n      }\n      System.out.println(\"Loaded \" + result.size() + \" words to be ignored from \" + file);\n    } else {\n      System.out.println(\"File \" + file.getAbsolutePath() + \" does not exist, no items will be ignored\");\n    }\n    return result;\n  }\n\n  @Nullable\n  private Pattern getPosTagIgnoreRegex(File infoFile) {\n    String fileName = infoFile.getName();\n    int underscorePos = fileName.indexOf('_');\n    if (underscorePos == -1) {\n      throw new IllegalArgumentException(\"Please specify an .info file for a synthesizer as the second parameter, named '<xyz>_synth.info', with <xyz> being a language'\");\n    }\n    String baseName = fileName.substring(0, underscorePos);\n    if (baseName.equals(\"polish\")) {\n      return Pattern.compile(POLISH_IGNORE_REGEX);\n    }\n    return null;\n  }\n\n  private File reverseLineContent(File plainTextDictFile, Set<String> itemsToBeIgnored, Pattern ignorePosRegex) throws IOException {\n    File reversedFile = File.createTempFile(SynthDictionaryBuilder.class.getSimpleName() + \"_reversed\", \".txt\");\n    reversedFile.deleteOnExit();\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    \n    String encoding = getOption(\"fsa.dict.encoding\");","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/languagetool-org/languagetool/blob/2e990059ce67d5e2a0f7f7ca5d31160c6709df4b/languagetool-tools/src/main/java/org/languagetool/tools/SynthDictionaryBuilder.java#L88-L124","documentation":"Naming guard in SynthDictionaryBuilder.getPosTagIgnoreRegex: the .info file name contains no underscore, so it does not follow the required '<xyz>_synth.info' convention and the language code cannot be extracted.","triggerScenarios":"Thrown at languagetool-tools/src/main/java/org/languagetool/tools/SynthDictionaryBuilder.java:106 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rename the info file to '<lang>_synth.info', e.g. 'en_synth.info'","Pass the correct synthesizer info file as the second parameter"],"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-14T00:17:10.932Z"}