{"record":{"id":"07aa5b5cfed228d7","repo":"languagetool-org/languagetool","slug":"could-not-tag-word-word","errorCode":null,"errorMessage":"Could not tag word '\" + word + \"'","messagePattern":"Could not tag word '\" \\+ word \\+ \"'","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"languagetool-core/src/main/java/org/languagetool/tagging/MorfologikTagger.java","lineNumber":96,"sourceCode":"  @Override\n  public List<TaggedWord> tag(String word) {\n    List<TaggedWord> result = new ArrayList<>();\n    try {\n      IStemmer dictLookup = new DictionaryLookup(getDictionary());\n      List<WordData> lookup = dictLookup.lookup(word);\n      for (WordData wordData : lookup) {\n        String tag = wordData.getTag() == null ? null : wordData.getTag().toString();\n        // Remove frequency data from tags (if exists)\n        // The frequency data is in the last byte (without a separator)\n        if (dictionary.metadata.isFrequencyIncluded() && tag != null && tag.length() > 1) {\n          tag = tag.substring(0, tag.length() - 1);\n        }\n        String stem = wordData.getStem() == null ? null : wordData.getStem().toString();\n        TaggedWord taggedWord = new TaggedWord(stem, (internTags && tag != null) ? tag.intern() : tag);\n        result.add(taggedWord);\n      }\n    } catch (IOException e) {\n      throw new RuntimeException(\"Could not tag word '\" + word + \"'\", e);\n    }\n    return result;\n  }\n\n}\n","sourceCodeStart":78,"sourceCodeEnd":102,"githubUrl":"https://github.com/languagetool-org/languagetool/blob/2e990059ce67d5e2a0f7f7ca5d31160c6709df4b/languagetool-core/src/main/java/org/languagetool/tagging/MorfologikTagger.java#L78-L102","documentation":"Wraps RuntimeExceptions from the dictionary lookup while tagging a single word in MorfologikTagger.tag(). It indicates a low-level failure (dictionary access or decode error) during stemming of that specific word, not merely an unknown word — unknown words normally just yield an empty result.","triggerScenarios":"Thrown at languagetool-core/src/main/java/org/languagetool/tagging/MorfologikTagger.java:96 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped cause for dictionary load/decode problems","Verify the language's .dict and .info metadata files are consistent and correctly packaged","Check the input word for corrupt characters or surrogates"],"exampleFix":null,"handlingStrategy":"try-catch","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"}