Skip to content

Commit

Permalink
fix/ when commentary has less segment than root
Browse files Browse the repository at this point in the history
  • Loading branch information
tenzin3 committed Feb 24, 2025
1 parent 5f3df27 commit 1db5db1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/alignment_ann_transfer/commentary.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def get_aligned_display_commentary(
commentary_texts = []
for m in map:
if root_anns[m[0]]["text"].strip():
if m[0] - 1 >= len(commentary_anns):
continue
commentary_texts.append(commentary_anns[m[0] - 1]["text"])

aligned_segments.append(
Expand Down

0 comments on commit 1db5db1

Please sign in to comment.