code: private String wordFeature(String word) {
      //String feat = (String) wordFeatureCache.get(word);
      //if (feat != null) {
      //  return(feat);
      //}
      String feat;
      if (lowercase.matcher(word).find()) {
        feat = "lc";
      }
      else if (twoDigits.matcher(word).find()) {
        feat = "2d";
      }
      else if (fourDigits.matcher(word).find()) {
        feat = "4d";
      }
      else if (containsNumber.matcher(word).find()) {
        if (containsLetter.matcher(word).find()) {
          feat = "an";
        }
        else if (containsHyphens.matcher(word).find()) {
          feat = "dd";
        }
        else if (containsBackslash.matcher(word).find()) {
          feat = "ds";
        }
        else if (containsComma.matcher(word).find()) {
          feat = "dc";
        }
        else if (containsPeriod.matcher(word).find()) {
          feat = "dp";
        }
        else {
          feat = "num";
        }
      }
      else if (allCaps.matcher(word).find() && word.length() == 1) {
        feat = "sc";
      }
      else if (allCaps.matcher(word).find()) {
        feat = "ac";
      }
      else if (capPeriod.matcher(word).find()) {
        feat = "cp";
      }
      else if (initialCap.matcher(word).find()) {
        feat = "ic";
      }
      else {
        feat = "other";
      }
      //wordFeatureCache.put(word,feat);
      //System.err.println("Finder.wordFeature: word="+word+" feat="+feat);
      return (feat);
    }
docs: Returns the most relevant feature for a given word.  This method
  is called by getCachedFeatures to get the features for words
  within a window of the word being analyzed.  Typical features
  are "2d" (2 digits); "4d" (4 digits); and "ac" (all caps).
  Note that only a single feature is returned.  The default
  feature is "other".
  
  @param word The word whose features should be returned.