code: public static CorpusFormat forName(@NonNull String name) {
        String format = StringUtils.trim(name).toUpperCase();
        boolean isOPL = format.endsWith("_OPL");
        final String normFormat = format.replaceAll("_OPL$", "").trim();
        if (formats.containsKey(normFormat)) {
           return isOPL ? new OnePerLineFormat(formats.get(normFormat)) : formats.get(normFormat);
        }
        throw new IllegalArgumentException(name + " is an unknown format.");
     }
docs: For name corpus format.
  
  @param name the name
  @return the corpus format