code: public static GrammaticalRelation valueOf(Language language, String s) {
      GrammaticalRelation reln = (stringsToRelations.get(language) != null ? valueOf(s, stringsToRelations.get(language).values()) : null);
      if (reln == null) {
        // TODO this breaks the hierarchical structure of the classes,
        //      but it makes English relations that much likelier to work.
        reln = EnglishGrammaticalRelations.valueOf(s);
      }
      if (reln == null) {
        // the block below fails when 'specific' includes underscores.
        // this is possible on weird web text, which generates relations such as prep______
        /*
        String[] names = s.split("_");
        String specific = names.length > 1? names[1] : null;
        reln = new GrammaticalRelation(language, names[0], null, null, null, specific);
        */
        String name;
        String specific;
        int underscorePosition = s.indexOf('_');
        if (underscorePosition > 0) {
          name = s.substring(0, underscorePosition);
          specific = s.substring(underscorePosition + 1);
        } else {
          name = s;
          specific = null;
        }
        reln = new GrammaticalRelation(language, name, null, null, null, specific);
  
      }
      return reln;
    }
docs: Convert from a String representation of a GrammaticalRelation to a
  GrammaticalRelation.  Where possible, you should avoid using this
  method and simply work with true GrammaticalRelations rather than
  String representations.  Correct behavior of this method depends
  on the underlying data structure resources used being kept in sync
  with the toString() and equals() methods.  However, there is really
  no choice but to use this method when storing GrammaticalRelations
  to text files and then reading them back in, so this method is not
  deprecated.
  
  @param s The String representation of a GrammaticalRelation
  @return The grammatical relation represented by this String