code: protected void setCategoriesToAvoid(String[] categoriesToAvoid) {
      // automatically build defaultLeftRule, defaultRightRule
      ArrayList<String> asList = new ArrayList<String>(Arrays.asList(categoriesToAvoid));
      asList.add(0, "leftexcept");
      defaultLeftRule = new String[asList.size()];
      defaultRightRule = new String[asList.size()];
      asList.toArray(defaultLeftRule);
      asList.set(0, "rightexcept");
      asList.toArray(defaultRightRule);
    }
docs: Set categories which, if it comes to last resort processing (i.e. none of
  the rules matched), will be avoided as heads. In last resort processing,
  it will attempt to match the leftmost or rightmost constituent not in this
  set but will fall back to the left or rightmost constituent if necessary.
  
  @param categoriesToAvoid list of constituent types to avoid