Spanish marks gender and English mostly doesn't. “I'm getting a little freaked” is nerviosa or nervioso depending on who says it, and the exported text doesn't tell you. A line only carries @1, which means “show a portrait”, not a name.
The game does know. Its database has a character table, each character owns their portraits, and every message picks a character by number. Once I had the numbers matched to names, I could go through the lines that carry gender and check them against the person saying them.
Yoshino, character 4, was calling herself “nervioso”. It says “nerviosa” now. Aki's lines were already fine, because the game stores two versions of everything the protagonist says, one for the girl and one for the boy.
Some lines show no portrait at all: the event asks for face -2, which means “leave the last one up”. In the altar scene, “I always wanted to be friends with you” is one of those. For those I read the event instead. It checks the variable that holds the player's gender and splits in two, and the first branch is always the girl. That line is in the first branch, so it reads “Siempre quise ser tu amiga”. The boy has his own version a bit further down, worded differently in English too.
Knowing who talks is also how you keep them from all sounding the same. Tohma is rude, Kudoh is formal, Ayaka exaggerates everything.
Aki ♀Character 0 — the protagonist as a girl, and the first branch of every gendered scene
Aki ♂Character 1 — the same lines, stored again for the boy
YoshinoCharacter 4 — the line that was coming out masculine
TohmaCharacter 3 — blunt, crude
KudohCharacter 5 — formal, polite
AyakaExaggerates everything