languagetool-org/languagetool · error · UnsupportedOperationException
Words can't start with " + SUFFIX_MARKER
Error message
Words can't start with " + SUFFIX_MARKER
What it means
Data-integrity guard while grouping the loaded mapping by hash: a lemma in the synthesizer data begins with the reserved SUFFIX_MARKER character, which the encoding uses internally to distinguish suffixed forms and therefore can never appear at the start of a word. The faulty input is the offending lemma string in the synthesizer data file.
Source
Thrown at languagetool-core/src/main/java/org/languagetool/synthesis/ManualSynthesizer.java:114
}
});
possibleTags = Collections.unmodifiableSet(collectTags(mapping));
}
private static Int2ObjectOpenHashMap<List<Triple<String, String, String>>> groupByHash(Map<TaggedWord, List<String>> mapping) {
Int2ObjectOpenHashMap<List<Triple<String, String, String>>> byHash = new Int2ObjectOpenHashMap<>(mapping.size());
for (Map.Entry<TaggedWord, List<String>> entry : mapping.entrySet()) {
TaggedWord tw = entry.getKey();
String lemma = tw.getLemma();
int hash = hashCode(lemma, tw.getPosTag());
List<Triple<String, String, String>> list = byHash.get(hash);
if (list == null) {
byHash.put(hash, list = new ArrayList<>());
}
for (String word : entry.getValue()) {
if (word.startsWith(SUFFIX_MARKER)) {
throw new UnsupportedOperationException("Words can't start with " + SUFFIX_MARKER);
}
String value = intern(encodeForm(lemma, word));
list.add(new ImmutableTriple<>(lemma, tw.getPosTag(), value));
}
}
return byHash;
}
private static String encodeForm(String lemma, String word) {
if (word.length() > lemma.length() && word.startsWith(lemma)) {
return SUFFIX_MARKER + word.substring(lemma.length());
}
if (word.length() >= lemma.length() && word.startsWith(lemma.substring(0, lemma.length() - 1))) {
return SUFFIX_MARKER + SUFFIX_MARKER + word.substring(lemma.length() - 1);
}
return word;
}
View on GitHub (pinned to 2e990059ce)
Solutions
- Remove or escape the leading SUFFIX_MARKER character in the offending lemma entry of the data file
- Fix the data-generation step that produced a lemma starting with the reserved marker
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at languagetool-core/src/main/java/org/languagetool/synthesis/ManualSynthesizer.java:114 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of languagetool-org/languagetool@2e990059ce (2026-09-06).
Data as JSON: /api/errors/ff3a675d9e6bbf78.
Report an issue: GitHub.