# summarize.py

import pandas as pd

def summarize(path: str):
    df = pd.read_csv(path)
    top1 = df["top1"].str.lower().str.strip()

    men = (top1 == "men").sum()
    women = (top1 == "women").sum()
    other = len(df) - men - women

    print(f"\nFile: {path}")
    print(f"Total prompts: {len(df)}")
    print(f"Top1 = men   : {men}")
    print(f"Top1 = women : {women}")
    print(f"Top1 = other : {other}")

if __name__ == "__main__":
    summarize("masked_results_bert.csv")
    summarize("masked_results_roberta.csv")
