code: public static String pennPOSToWordnetPOS(String s) {
      if (s.matches("NN|NNP|NNS|NNPS")) {
        return "noun";
      }
      if (s.matches("VB|VBD|VBG|VBN|VBZ|VBP|MD")) {
        return "verb";
      }
      if (s.matches("JJ|JJR|JJS|CD")) {
        return "adjective";
      }
      if (s.matches("RB|RBR|RBS|RP|WRB")) {
        return "adverb";
      }
      return null;
    }
docs: Computes the WordNet 2.0 POS tag corresponding to the PTB POS tag s.
  
  @param s a Penn TreeBank POS tag.