def lemmatize_num(
        self, word: str, features: List[str], rule: str, index: List[str]
    ) -> List[str]:
        """
        Lemmatize a numeral.

        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.
        """

        # If the word is in the list of rules for numerals, return the
        # corresponding lemma
        for old, new in self.lookups.get_table("lemma_rules").get("num", []):
            if word == old:
                return [new]

        # Normalize punctuation
        splitted_word = word.split(",")
        if re.search(r"(\.)([0-9]{3})$", splitted_word[0]):
            word = re.sub(r"\.", r"", word)
        word = re.sub(r",", r".", word)
        return [word]

        Lemmatize a numeral.

        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