public boolean inTestSet(String sourceSide){
  if (!sourceSide.equals(lastSourceSide)) {
    lastSourceSide=sourceSide;
    acceptedLastSourceSide=filter.permits(sourceSide);
  }
 else {
    cached++;
  }
  return acceptedLastSourceSide;
}

public boolean inTestSet ( String sourceSide ) { if ( ! sourceSide . equals ( lastSourceSide ) ) { lastSourceSide = sourceSide ; acceptedLastSourceSide = filter . permits ( sourceSide ) ; } else { cached ++ ; } return acceptedLastSourceSide ; }
top - level filter , responsible for calling the fast or exact version . takes the source side of a rule and determines whether there is any sentence in the test set that can match it .
