* Fix alignment between the segments and the list of words * Ensure the word index does not overflow
black