def get_entities(doc):
    """Get the entities and save them to .csv

    Parameters
    ----------
    doc : spacy.doc
        A doc object.

    """

    data_list = [["text", "text_lower", "label"]]

    for ent in doc.ents:
        data_list.append([ent.text, ent.lower_, ent.label_])

    with open("./entities.csv", "w", encoding="utf-8", newline="") as entities_file:
        csv.writer(entities_file).writerows(data_list)
Get the entities and save them to .csv

    Parameters
    ----------
    doc : spacy.doc
        A doc object.

    
scripts/step2.py