def get_segments(text_particles, segmentation):
    """
    Reorganize text particles by aggregating them to arrays described by the
    provided `segmentation`.
    """
    segmented_text = []
    L = len(text_particles)
    for beg, end in zip([0] + segmentation.splits, segmentation.splits + [L]):
        segmented_text.append(text_particles[beg:end])
    return segmented_text