Commit 881276cf authored by Simon Will's avatar Simon Will
Browse files

Assign IDs to syllables

parent 0edb067f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -226,8 +226,12 @@ def get_syllables_for_token(token: Token):


def get_syllables(reading):
    i = 0
    for token in reading.tokens:
        token.syllables = get_syllables_for_token(token)
        for s in token.syllables:
            s.id = i
            i += 1
    return reading