public MorfologikSpeller(String filename, Locale conversionLocale, int maxEditDistance) throws IOException {
if (maxEditDistance <= 0) {
throw new RuntimeException("maxEditDistance must be > 0: " + maxEditDistance);
}
final URL url = JLanguageTool.getDataBroker().getFromResourceDirAsUrl(filename);
speller = new Speller(Dictionary.read(url), maxEditDistance);
this.conversionLocale = conversionLocale != null ? conversionLocale : Locale.getDefault();
}