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;
            case NORWEGIAN_NYNORSK -> SnowballStemmer.ALGORITHM.NORWEGIAN;
            case PORTUGUESE -> SnowballStemmer.ALGORITHM.PORTUGUESE;
            case ROMANIAN -> SnowballStemmer.ALGORITHM.ROMANIAN;
            case RUSSIAN -> SnowballStemmer.ALGORITHM.RUSSIAN;
            case SPANISH -> SnowballStemmer.ALGORITHM.SPANISH;
            case SWEDISH -> SnowballStemmer.ALGORITHM.SWEDISH;
            case TURKISH -> SnowballStemmer.ALGORITHM.TURKISH;
            default -> null;
        };
    }
Chinese segmenter if we're segmenting Chinese
opennlp-linguistics/src/main/java/com/yahoo/language/opennlp/OpenNlpTokenizer.java