public int numRules() {
    int accumulated = 0;
    for (List<IntTaggedWord> lis : rulesWithWord) {
      accumulated += lis.size();
    }
    return accumulated;
  }
public int numRules ( ) { int accumulated = 0 ; for ( List < IntTaggedWord > lis : rulesWithWord ) { accumulated += lis . size ( ) ; } return accumulated ; }
Returns the number of rules (tag rewrites as word) in the Lexicon.
This method assumes that the lexicon has been initialized.