diff --git a/opennlp-linguistics/src/main/java/com/yahoo/language/opennlp/OpenNlpTokenizer.java b/opennlp-linguistics/src/main/java/com/yahoo/language/opennlp/OpenNlpTokenizer.java index 02d1a2cd092c..5af0765e3e03 100644 --- a/opennlp-linguistics/src/main/java/com/yahoo/language/opennlp/OpenNlpTokenizer.java +++ b/opennlp-linguistics/src/main/java/com/yahoo/language/opennlp/OpenNlpTokenizer.java @@ -143,12 +143,17 @@ private Stemmer stemmerFor(Language language, StemMode stemMode) { private SnowballStemmer.ALGORITHM algorithmFor(Language language) { return switch (language) { + case ARABIC -> SnowballStemmer.ALGORITHM.ARABIC; + case CATALAN -> SnowballStemmer.ALGORITHM.CATALAN; case DANISH -> SnowballStemmer.ALGORITHM.DANISH; case DUTCH -> SnowballStemmer.ALGORITHM.DUTCH; + case ENGLISH -> SnowballStemmer.ALGORITHM.ENGLISH; case FINNISH -> SnowballStemmer.ALGORITHM.FINNISH; case FRENCH -> SnowballStemmer.ALGORITHM.FRENCH; case GERMAN -> SnowballStemmer.ALGORITHM.GERMAN; + case GREEK -> SnowballStemmer.ALGORITHM.GREEK; case HUNGARIAN -> SnowballStemmer.ALGORITHM.HUNGARIAN; + case INDONESIAN -> SnowballStemmer.ALGORITHM.INDONESIAN; case IRISH -> SnowballStemmer.ALGORITHM.IRISH; case ITALIAN -> SnowballStemmer.ALGORITHM.ITALIAN; case NORWEGIAN_BOKMAL -> SnowballStemmer.ALGORITHM.NORWEGIAN; @@ -159,7 +164,6 @@ private SnowballStemmer.ALGORITHM algorithmFor(Language language) { case SPANISH -> SnowballStemmer.ALGORITHM.SPANISH; case SWEDISH -> SnowballStemmer.ALGORITHM.SWEDISH; case TURKISH -> SnowballStemmer.ALGORITHM.TURKISH; - case ENGLISH -> SnowballStemmer.ALGORITHM.ENGLISH; default -> null; }; }