code: public static ArrayList<TaggedWord> toTaggedList(List<String> lex, List<String> tags) {
      ArrayList<TaggedWord> sent = new ArrayList<TaggedWord>();
      int ls = lex.size();
      int ts = tags.size();
      if (ls != ts) {
        throw new IllegalArgumentException("Sentence.toSentence: lengths differ");
      }
      for (int i = 0; i < ls; i++) {
        sent.add(new TaggedWord(lex.get(i), tags.get(i)));
      }
      return sent;
    }
docs: Create an ArrayList as a list of <code>TaggedWord</code> from two
  lists of <code>String</code>, one for the words, and the second for
  the tags.
  
  @param lex  a list whose items are of type <code>String</code> and
  are the words
  @param tags a list whose items are of type <code>String</code> and
  are the tags
  @return The Sentence