def lemmatize_adv(
        self, word: str, features: List[str], rule: str, index: List[str]
    ) -> List[str]:
        """
        Lemmatize an adverb.

        word (str): The word to lemmatize.
        features (List[str]): The morphological features as a list of Feat=Val
            pairs.
        index (List[str]): The POS-specific lookup list.

        RETURNS (List[str]): The list of lemmas.
        """

        # Apply lemmatization rules
        for old, new in self.lookups.get_table("lemma_rules").get("adverbs", []):
            if word == old:
                return [new]

        # If none of the rules applies, return the original word
        return [word]

        Lemmatize an adverb.

        word (str): The word to lemmatize.
        features (List[str]): The morphological features as a list of Feat=Val
            pairs.
        index (List[str]): The POS-specific lookup list.

        RETURNS (List[str]): The list of lemmas.
        
spacy/lang/es/lemmatizer.py