public static function stem($word, $language)
    {
        if (empty($language)) {
            return $word;
        }
        
        foreach (static::$classMap as $stemmer => $languages) {
            if (in_array($language, $languages)) {
                return $stemmer::stem($word);
            }
        }
        
        return $word;
    }
public static function stem($word, $language)
    {
        if (empty($language)) {
            return $word;
        }
        
        foreach (static::$classMap as $stemmer => $languages) {
            if (in_array($language, $languages)) {
                return $stemmer::stem($word);
            }
        }
        
        return $word;
    }
public static function stem ( $ word , $ language ) { if ( empty ( $ language ) ) { return $ word ; } foreach ( static :: $ classMap as $ stemmer => $ languages ) { if ( in_array ( $ language , $ languages ) ) { return $ stemmer :: stem ( $ word ) ; } } return $ word ; }
Stem a word.

If the language could not be found the world will returned.

@param string $word The word to stem e.g. `drinking`
@param string $language The language to stem with e.g. `de`,`en`
@return string The stemmed word, if language not found original input returned.
Stem a word .