Perhaps these two blocks could be combined, since @characters is not used outside this block?

```
speech.elements.each("SPEAKER") do |speaker|
  @speakers[speaker] += @line_count
end