frostem 1.20260821.5

Pre-built Snowball stemmers for Rust (tracks snowball main)
Documentation
// @generated by scripts/sync_from_snowball.py — DO NOT EDIT

use crate::algorithm::Algorithm;
use crate::algorithms;
use crate::SnowballEnv;

pub(crate) type StemFn = fn(&mut SnowballEnv<'_>) -> bool;

pub(crate) fn stem_fn(algorithm: Algorithm) -> StemFn {
    match algorithm {
        #[cfg(feature = "arabic")]
        Algorithm::Arabic => algorithms::arabic_stemmer::stem,
        #[cfg(feature = "armenian")]
        Algorithm::Armenian => algorithms::armenian_stemmer::stem,
        #[cfg(feature = "basque")]
        Algorithm::Basque => algorithms::basque_stemmer::stem,
        #[cfg(feature = "catalan")]
        Algorithm::Catalan => algorithms::catalan_stemmer::stem,
        #[cfg(feature = "czech")]
        Algorithm::Czech => algorithms::czech_stemmer::stem,
        #[cfg(feature = "danish")]
        Algorithm::Danish => algorithms::danish_stemmer::stem,
        #[cfg(feature = "dutch")]
        Algorithm::Dutch => algorithms::dutch_stemmer::stem,
        #[cfg(feature = "dutch_porter")]
        Algorithm::DutchPorter => algorithms::dutch_porter_stemmer::stem,
        #[cfg(feature = "earlymodernenglish")]
        Algorithm::Earlymodernenglish => algorithms::earlymodernenglish_stemmer::stem,
        #[cfg(feature = "english")]
        Algorithm::English => algorithms::english_stemmer::stem,
        #[cfg(feature = "esperanto")]
        Algorithm::Esperanto => algorithms::esperanto_stemmer::stem,
        #[cfg(feature = "estonian")]
        Algorithm::Estonian => algorithms::estonian_stemmer::stem,
        #[cfg(feature = "finnish")]
        Algorithm::Finnish => algorithms::finnish_stemmer::stem,
        #[cfg(feature = "french")]
        Algorithm::French => algorithms::french_stemmer::stem,
        #[cfg(feature = "german")]
        Algorithm::German => algorithms::german_stemmer::stem,
        #[cfg(feature = "greek")]
        Algorithm::Greek => algorithms::greek_stemmer::stem,
        #[cfg(feature = "hindi")]
        Algorithm::Hindi => algorithms::hindi_stemmer::stem,
        #[cfg(feature = "hungarian")]
        Algorithm::Hungarian => algorithms::hungarian_stemmer::stem,
        #[cfg(feature = "indonesian")]
        Algorithm::Indonesian => algorithms::indonesian_stemmer::stem,
        #[cfg(feature = "irish")]
        Algorithm::Irish => algorithms::irish_stemmer::stem,
        #[cfg(feature = "italian")]
        Algorithm::Italian => algorithms::italian_stemmer::stem,
        #[cfg(feature = "lithuanian")]
        Algorithm::Lithuanian => algorithms::lithuanian_stemmer::stem,
        #[cfg(feature = "lovins")]
        Algorithm::Lovins => algorithms::lovins_stemmer::stem,
        #[cfg(feature = "nepali")]
        Algorithm::Nepali => algorithms::nepali_stemmer::stem,
        #[cfg(feature = "norwegian")]
        Algorithm::Norwegian => algorithms::norwegian_stemmer::stem,
        #[cfg(feature = "persian")]
        Algorithm::Persian => algorithms::persian_stemmer::stem,
        #[cfg(feature = "polish")]
        Algorithm::Polish => algorithms::polish_stemmer::stem,
        #[cfg(feature = "porter")]
        Algorithm::Porter => algorithms::porter_stemmer::stem,
        #[cfg(feature = "portuguese")]
        Algorithm::Portuguese => algorithms::portuguese_stemmer::stem,
        #[cfg(feature = "romanian")]
        Algorithm::Romanian => algorithms::romanian_stemmer::stem,
        #[cfg(feature = "russian")]
        Algorithm::Russian => algorithms::russian_stemmer::stem,
        #[cfg(feature = "serbian")]
        Algorithm::Serbian => algorithms::serbian_stemmer::stem,
        #[cfg(feature = "sesotho")]
        Algorithm::Sesotho => algorithms::sesotho_stemmer::stem,
        #[cfg(feature = "spanish")]
        Algorithm::Spanish => algorithms::spanish_stemmer::stem,
        #[cfg(feature = "swedish")]
        Algorithm::Swedish => algorithms::swedish_stemmer::stem,
        #[cfg(feature = "tamil")]
        Algorithm::Tamil => algorithms::tamil_stemmer::stem,
        #[cfg(feature = "turkish")]
        Algorithm::Turkish => algorithms::turkish_stemmer::stem,
        #[cfg(feature = "yiddish")]
        Algorithm::Yiddish => algorithms::yiddish_stemmer::stem,
    }
}