code: public static GrammaticalRelation valueOf(String s, Collection<GrammaticalRelation> values) {
      for (GrammaticalRelation reln : values) {
        if (reln.toString().equals(s)) return reln;
      }
  
      return null;
    }
docs: Returns the GrammaticalRelation having the given string
  representation (e.g. "nsubj"), or null if no such is found.
  
  @param s The short name of the GrammaticalRelation
  @param values The set of GrammaticalRelations to look for it among.
  @return The GrammaticalRelation with that name