@SuppressWarnings("ReturnOfNull")
    public static Option strToOpt(final String optStr) {
        final String[] parts = SPACE.split(optStr, 2);
        final String name = parts[0];
        final String param = 1 < parts.length ? parts[1] : null;

        final Option opt = OPTS.get(name);
        return opt == null ? null : opt.newInstance(param);
    }
@ SuppressWarnings ( "ReturnOfNull" ) public static Option strToOpt ( final String optStr ) { final String [ ] parts = SPACE . split ( optStr , 2 ) ; final String name = parts [ 0 ] ; final String param = 1 < parts . length ? parts [ 1 ] : null ; final Option opt = OPTS . get ( name ) ; return opt == null ? null : opt . newInstance ( param ) ; }
Parse an option string (without the leading double hyphens) into an option to pass to MetaMap,
e.g. "word_sense_disambiguation".