feat: upload audio, get a private Swedish transcript, discuss it (#33, ADR-033) #39
@@ -118,3 +118,13 @@ func TestReconcileSegments_SegmentsThatDoNotLineUpWithTheTextAreLeftAsTheBases(t
|
|||||||
assert.Equal(t, base.Segments, out.Segments)
|
assert.Equal(t, base.Segments, out.Segments)
|
||||||
assert.Equal(t, "a y b c", out.Text, "the merged text is unaffected")
|
assert.Equal(t, "a y b c", out.Text, "the merged text is unaffected")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestReconcileSegments_ASpanThatCrossesASegmentEdgeIsRemovedFromBothSegments(t *testing.T) {
|
||||||
|
base := segmented("a b c d", domain.Segment{Start: 0, End: 5, Text: "a b"}, domain.Segment{Start: 5, End: 10, Text: "c d"})
|
||||||
|
|
||||||
|
out := merge(t, base, tr("a X d"), always(reconcile.VerdictAlt))
|
||||||
|
|
||||||
|
require.Equal(t, "a X d", out.Text)
|
||||||
|
assert.Equal(t, "a X", out.Segments[0].Text)
|
||||||
|
assert.Equal(t, "d", out.Segments[1].Text, "'c' was replaced too: it must not linger in the second segment")
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user