if (!filter.pass(headEvent)) continue;
  private void deriveSubcatMaps(ProbabilityStructure leftMS,				ProbabilityStructure rightMS) {    System.err.println("Deriving subcat maps.");    canonicalSubcatMap = new HashMap();    int leftMSLastLevel = leftMS.numLevels() - 1;    int rightMSLastLevel = rightMS.numLevels() - 1;    Iterator events = headEvents.keySet().iterator();    while (events.hasNext()) {      HeadEvent headEvent = (HeadEvent)events.next();      Event leftContext =	leftMS.getHistory(headEvent, leftMSLastLevel).copy();      leftContext.canonicalize(canonicalSubcatMap);      Subcat canonicalLeftSubcat =	headEvent.leftSubcat().getCanonical(canonicalSubcatMap, false);      addToValueSet(leftSubcatMap, leftContext, canonicalLeftSubcat);      Event rightContext =	rightMS.getHistory(headEvent, rightMSLastLevel).copy();      rightContext.canonicalize(canonicalSubcatMap);      Subcat canonicalRightSubcat =	headEvent.rightSubcat().getCanonical(canonicalSubcatMap, false);      addToValueSet(rightSubcatMap, rightContext, canonicalRightSubcat);    }    outputSubcatMaps();    canonicalSubcatMap = null; // it has served its purpose  }