code: public int setOption(String[] flags, int i) {
      int j = setOptionFlag(flags, i);
      if (j == i) {
        j = tlpParams.setOptionFlag(flags, i);
      }
      if (j == i) {
        throw new IllegalArgumentException("Unknown option: " + flags[i]);
      }
      return j;
    }
docs: Set an option based on a String array in the style of
  commandline flags. The option may
  be either one known by the Options object, or one recognized by the
  TreebankLangParserParams which has already been set up inside the Options
  object, and then the option is set in the language-particular
  TreebankLangParserParams.
  Note that despite this method being an instance method, many flags
  are actually set as static class variables in the Train and Test
  classes (this should be fixed some day).
  Some options (there are many others; see the source code):
  <ul>
  <li> <code>-maxLength n</code> set the maximum length sentence to parse (inclusively)
  <li> <code>-printTT</code> print the training trees in raw, annotated, and annotated+binarized form.  Useful for debugging and other miscellany.
  <li> <code>-printAnnotated filename</code> use only in conjunction with -printTT.  Redirects printing of annotated training trees to <code>filename</code>.
  <li> <code>-forceTags</code> when the parser is tested against a set of gold standard trees, use the tagged yield, instead of just the yield, as input.
  </ul>
  
  @param flags An array of options arguments, command-line style.  E.g. {"-maxLength", "50"}.
  @param i The index in flags to start at when processing an option
  @return The index in flags of the position after the last element used in
  processing this option.
  @throws IllegalArgumentException If the current array position cannot be
  processed as a valid option