Added option to output indices rather than sentences;