def plot_most_used_words(df):
    """Generates a bar plot with the counts of the most used lemmas.

    Parameters
    ----------
    df : pandas.DataFrame
        The DataFrame to be plotted.

    """

    # Small fix for programa and programar.
    df.loc[df["lemma_lower"] == "programa", "lemma_lower"] = "programar"

    # Only take into account alphabet tokens that are longer than 1 character and are not stop words.
    words = df[
        (df["is_alphabet"] == True) &
        (df["is_stopword"] == False) &
        (df["lemma_lower"].str.len() > 1)
    ]["lemma_lower"].value_counts()[:20]

    sns.barplot(x=words.values, y=words.index, palette="Blues_d", linewidth=0)
    plt.xlabel("Occurrences Count")
    plt.title("Most Frequent Words")
    plt.savefig("words_counts.png", facecolor="#5C0E10")
Generates a bar plot with the counts of the most used lemmas.

    Parameters
    ----------
    df : pandas.DataFrame
        The DataFrame to be plotted.

    
scripts/step3.py