With “Wonder Woman” and “Girls Trip” riding a wave of critical and commercial success at the box office this summer, it can be tempting to think that diversity in Hollywood is on an upswing.

But these high-profile examples are not a sign of greater representation in films over all. A new study from the University of Southern California’s Viterbi School of Engineering found that films were likely to contain fewer women and minority characters than white men, and when they did appear, these characters were portrayed in ways that reinforced stereotypes. And female characters, in particular, were generally less central to the plot.

The study, conducted by the school’s Signal Analysis and Interpretation Lab, used artificial intelligence and machine learning to do a linguistic analysis of nearly 1,000 popular film scripts, mostly from the last several decades. Of the 7,000 characters studied, nearly 4,900 were men and just over 2,000 were women. And perhaps unsurprisingly, the male characters spoke far more than the female ones did, with 37,000 dialogues involving men and just 15,000 involving women.