public static <W>int[] toArrayFromStrings(final WordIndexer<W> wordIndexer,final List<String> list){
  final int[] ret=new int[list.size()];
  for (int i=0; i < list.size(); ++i) {
    ret[i]=wordIndexer.getOrAddIndexFromString(list.get(i));
  }
  return ret;
}

public static < W > int [ ] toArrayFromStrings ( final WordIndexer < W > wordIndexer , final List < String > list ) { final int [ ] ret = new int [ list . size ( ) ] ; for ( int i = 0 ; i < list . size ( ) ; ++ i ) { ret [ i ] = wordIndexer . getOrAddIndexFromString ( list . get ( i ) ) ; } return ret ; }
converts an string representation to an int array , adding to the indexer .
