def _get_number_of_words(elem: Optional[str]):
                """Returns the number of words in given element,
                or pd.NA given null input"""
                if pd.isna(elem):
                    return pd.NA
                return sum(
                    1 for word in re.split(DELIMITERS, elem) if word.strip(punctuation)
                )
Returns the number of words in given element,
                or pd.NA given null input
featuretools/primitives/standard/transform/natural_language/num_words.py