if (!language.getShortName().equals(Locale.GERMAN.getLanguage())) {
throw new RuntimeException("Language is not a variant of German: " + language);
}
try {
final String morfoFile = "/de/hunspell/de_" + language.getCountryVariants()[0] + ".dict";
return new MorfologikSpeller(morfoFile, Locale.getDefault(), MAX_EDIT_DISTANCE);
} catch (IOException e) {
throw new RuntimeException("Could not set up morfologik spell checker", e);
}
}