this post was submitted on 03 Jul 2024
48 points (98.0% liked)

Star Trek Social Club

10675 readers
113 users here now

r/startrek: The Next Generation

Star Trek news and discussion. No slash fic...

Maybe a little slash fic.


New to Star Trek and wondering where to start?


Rules

1 Be constructiveAll posts/comments must be thoughtful and balanced.


2 Be welcomingIt is important that everyone from newbies to OG Trekkers feel welcome, no matter their gender, sexual orientation, religion or race.


3 Be truthfulAll posts/comments must be factually accurate and verifiable. We are not a place for gossip, rumors, or manipulative or misleading content.


4 Be niceIf a polite way cannot be found to phrase what it is you want to say, don't say anything at all. Insulting or disparaging remarks about any human being are expressly not allowed.


5 SpoilersUtilize the spoiler system for any and all spoilers relating to the most recently-aired episode. There is no formal spoiler protection for episodes/films after they have been available for approximately one week.


6 Keep on-topicAll busmittions must be directly about the Star Trek franchise (the shows, movies, books, etc.). Off-topic discussions are welcome at c/Quarks.


7 MetaQuestions and concerns about moderator actions should be brought forward via DM.


Upcoming Episodes

Date Episode Title
11-28 LD 5x07 "Fully Dilated"
12-05 LD 5x08 "Upper Decks"
12-12 LD 5x09 "Fissure Quest"
12-19 LD 5x10 "The New Next Generation"
01-24 Film "Section 31"

Episode Discussion Archive


In Production

Strange New Worlds (TBA)

Section 31 (2025-01-24)

Starfleet Academy (TBA)


In Development

Untitled theatrical film

Untitled comedy series


Wondering where to stream a series? Check here.

Allied Discord Server


founded 2 years ago
MODERATORS
 

It would seem that I have far too much time on my hands. After the post about a Star Trek "test", I started wondering if there could be any data to back it up and... well here we go:

The Next Generation

Name Percentage of Lines
PICARD 20.16
RIKER 11.64
DATA 10.1
LAFORGE 6.93
WORF 6.14
TROI 5.4
CRUSHER 5.11
WESLEY 2.32

DS9

Name Percentage of Lines
SISKO 13.0
KIRA 8.23
BASHIR 7.79
O'BRIEN 7.31
ODO 7.26
QUARK 6.98
DAX 5.73
WORF 3.18
JAKE 2.31
GARAK 2.29
NOG 2.01
ROM 1.89
DUKAT 1.76
EZRI 1.53

Voyager

Name Percentage of Lines
JANEWAY 17.7
CHAKOTAY 8.76
EMH 8.34
PARIS 7.63
TUVOK 6.9
KIM 6.57
TORRES 6.45
SEVEN 6.1
NEELIX 4.99
KES 2.06

Enterprise

Name Percentage of Lines
ARCHER 24.52
T'POL 13.09
TUCKER 12.72
REED 7.34
PHLOX 5.71
HOSHI 4.63
TRAVIS 3.83
SHRAN 1.26

Discovery

Note: This is a limited dataset, as the source site only has transcripts for seasons 1, 2, and 4

Name Percentage of Lines
BURNHAM 22.92
SARU 8.2
BOOK 6.21
STAMETS 5.44
TILLY 5.17
LORCA 4.99
TARKA 3.32
TYLER 3.18
GEORGIOU 2.96
CULBER 2.83
RILLAK 2.17
DETMER 1.97
OWOSEKUN 1.79
ADIRA 1.63
COMPUTER 1.61
ZORA 1.6
VANCE 1.07
CORNWELL 1.07
SAREK 1.06
T'RINA 1.02

If anyone is interested, here's the (rather hurried) Python used:

#!/usr/bin/env python

#
# This script assumes that you've already downloaded all the episode lines from
# the fantastic chakoteya.net:
#
# wget --accept=html,htm --relative --wait=2 --include-directories=/STDisco17/ http://www.chakoteya.net/STDisco17/episodes.html -m
# wget --accept=html,htm --relative --wait=2 --include-directories=/Enterprise/ http://www.chakoteya.net/Enterprise/episodes.htm -m
# wget --accept=html,htm --relative --wait=2 --include-directories=/Voyager/ http://www.chakoteya.net/Voyager/episode_listing.htm -m
# wget --accept=html,htm --relative --wait=2 --include-directories=/DS9/ http://www.chakoteya.net/DS9/episodes.htm -m
# wget --accept=html,htm --relative --wait=2 --include-directories=/NextGen/ http://www.chakoteya.net/NextGen/episodes.htm -m
#
# Then you'll probably have to convert the following files to UTF-8 as they
# differ from the rest:
#
# * Voyager/709.htm
# * Voyager/515.htm
# * Voyager/416.htm
# * Enterprise/41.htm
#

import re
from collections import defaultdict
from pathlib import Path

EPISODE_REGEX = re.compile(r"^\d+\.html?$")
LINE_REGEX = re.compile(r"^(?P<name>[A-Z']+): ")

EPISODES = Path("www.chakoteya.net")
DISCO = EPISODES / "STDisco17"
ENT = EPISODES / "Enterprise"
TNG = EPISODES / "NextGen"
DS9 = EPISODES / "DS9"
VOY = EPISODES / "Voyager"


class CharacterLines:
    def __init__(self, path: Path) -> None:
        self.path = path
        self.line_count = defaultdict(int)

    def collect(self) -> None:
        for episode in self.path.glob("*.htm*"):
            if EPISODE_REGEX.match(episode.name):
                for line in episode.read_text().split("\n"):
                    if m := LINE_REGEX.match(line):
                        self.line_count[m.group("name")] += 1

    @property
    def as_percentages(self) -> dict[str, float]:
        total = sum(self.line_count.values())
        r = {}
        for k, v in self.line_count.items():
            percentage = round(v * 100 / total, 2)
            if percentage > 1:
                r[k] = percentage
        return {k: v for k, v in reversed(sorted(r.items(), key=lambda _: _[1]))}

    def render(self) -> None:
        print(self.path.name)
        print("| Name             | Percentage of Lines |")
        print("| ---------------- | ------------------- |")
        for character, pct in self.as_percentages.items():
            print(f"| {character:16} | {pct} |")


if __name__ == "__main__":
    for series in (TNG, DS9, VOY, ENT, DISCO):
        counter = CharacterLines(series)
        counter.collect()
        counter.render()
top 13 comments
sorted by: hot top controversial new old
[–] [email protected] 21 points 5 months ago (1 children)

Fascinating stuff I love that you did this. I'm surprised Morn didn't rank higher considering how chatty he is in every scene.

[–] [email protected] 5 points 5 months ago

Number of lines vs number of words spoken vs length of time speaking probably would have a lot of variation in results.

[–] [email protected] 9 points 5 months ago (1 children)

Thanks for sharing. I notice chakoteya.net has TOS scripts. Is there any reason they weren’t included in the analysis?

[–] [email protected] 12 points 5 months ago (1 children)

Honestly, it's 'cause I forgot to include it! I'll see if I can add it tonight. Check back in 24hrs :-)

[–] [email protected] 4 points 5 months ago* (last edited 5 months ago)

Thanks for the update.

Poor Chekov has almost no lines, but Koenig was great as Bester on B5.

[–] [email protected] 8 points 5 months ago* (last edited 5 months ago) (3 children)

This is really cool stuff! Thanks for posting the code!

This definitely goes to show why people felt Discovery was the Micheal Burnham show. Not that she had an unusual number of lines but that no one else spoke even half as much as her, with all of the other percentages of lines broken up by more characters than the other series.

Also does GEORGIOU count for both prime and mirror versions of the character?

[–] [email protected] 6 points 5 months ago

That was my takeaway as well. I just wish I had data for the other seasons. It'd be interesting to see how that might change the percentages as they are.

As for GEOGIOU, I'm reasonably sure that this refers to both versions of her.

[–] [email protected] 1 points 5 months ago* (last edited 5 months ago)

As the prime version of Georgiou's lines basically amounted to "Hi!" "Oh crap!" "Bye!" the overall math shouldn't be too affected.

[–] [email protected] 0 points 5 months ago

Georgiou also got fridged for Michael's character development. And then we follow Michael over the timeskip. Right out the gate, the universe exists to tell a story about Michael.

[–] [email protected] 8 points 5 months ago

Wow, Tarka was a chatty sonofagun.

[–] [email protected] 7 points 5 months ago

This is beautiful! I love data and I'm delighted you were inspired by my post to gather the data.

Thank you for doing this!

[–] [email protected] 5 points 5 months ago

Fascinating! It would be illuminating to see this broken up by season as well. Seven of Nine's relatively low ratio, for instance, can definitely be attributed to her late arrival to the series. In the latter seasons, I suspect her percentage could be rivalling Janeway's.

Conversely, it's impressive Lorca ranks as highly as he does, given he was gone by the end of Disco season one. But since he was simultaneously captain and antagonist while he was around, I guess it isn't that surprising.

[–] [email protected] 3 points 5 months ago

Maybe the two Dax hosts on DS9 should be combined, as they didn't overlap.