public static <W>List<W> toList(final WordIndexer<W> wordIndexer,final int[] intNgram,final int startPos,final int endPos){
  final List<W> l=new ArrayList<W>(endPos - startPos);
  for (int i=startPos; i < endPos; ++i) {
    l.add(wordIndexer.getWord(intNgram[i]));
  }
  return l;
}

public static < W > List < W > toList ( final WordIndexer < W > wordIndexer , final int [ ] intNgram , final int startPos , final int endPos ) { final List < W > l = new ArrayList < W > ( endPos - startPos ) ; for ( int i = startPos ; i < endPos ; ++ i ) { l . add ( wordIndexer . getWord ( intNgram [ i ] ) ) ; } return l ; }
converts an int representation of an n - gram to a list . converts only the range of the array specified by [ startpos , endpos )
