code: public double evaluateCoverage(Collection<Tree> trees, Set<String> missingWords,
                                   Set<String> missingTags, Set<IntTaggedWord> missingTW) {
  
      List<IntTaggedWord> iTW1 = new ArrayList<IntTaggedWord>();
      for (Tree t : trees) {
        iTW1.addAll(treeToEvents(t));
      }
  
      int total = 0;
      int unseen = 0;
  
      for (IntTaggedWord itw : iTW1) {
        total++;
        if (!words.contains(new IntTaggedWord(itw.word(), nullTag))) {
          missingWords.add(wordIndex.get(itw.word()));
        }
        if (!tags.contains(new IntTaggedWord(nullWord, itw.tag()))) {
          missingTags.add(tagIndex.get(itw.tag()));
        }
        // if (!rules.contains(itw)) {
        if (seenCounter.getCount(itw) == 0.0) {
          unseen++;
          missingTW.add(itw);
        }
      }
      return (double) unseen / total;
    }
docs: Evaluates how many words (= terminals) in a collection of trees are
  covered by the lexicon. First arg is the collection of trees; second
  through fourth args get the results. Currently unused; this probably
  only works if train and test at same time so tags and words variables
  are initialized.