def rm_nltk_stopwords(
    df,
    sentence_cols=["sentence1", "sentence2"],
    stop_cols=["sentence1_tokens_rm_stopwords", "sentence2_tokens_rm_stopwords"],
):
    """
    This function removes stop words from a sentence using nltk.

    Args:
        df (pd.DataFrame): Dataframe with columns sentence_cols to tokenize.
        sentence_cols (list, optional): Column names for the raw entences.
        stop_cols (list, optional): Column names for the tokenized sentences
            without stop words.

    Returns:
        pd.DataFrame: Dataframe with new columns stop_cols, each containing a
        list of tokens for their respective sentences.
    """

    nltk.download("stopwords")
    stop_words = tuple(stopwords.words("english"))
    text_df = df[sentence_cols]
    stop_df = text_df.applymap(lambda sentence: nltk.word_tokenize(sentence)).applymap(
        lambda l: [word for word in l if word not in stop_words]
    )

    stop_df.columns = stop_cols
    return pd.concat([df, stop_df], axis=1)

    This function removes stop words from a sentence using nltk.

    Args:
        df (pd.DataFrame): Dataframe with columns sentence_cols to tokenize.
        sentence_cols (list, optional): Column names for the raw entences.
        stop_cols (list, optional): Column names for the tokenized sentences
            without stop words.

    Returns:
        pd.DataFrame: Dataframe with new columns stop_cols, each containing a
        list of tokens for their respective sentences.
    
utils_nlp/dataset/preprocess.py