code: private int postBasicCategoryIndex(String category) {
      boolean sawAtZero = false;
      char seenAtZero = '\u0000';
      int i = 0;
      for (int leng = category.length(); i < leng; i++) {
        char ch = category.charAt(i);
        if (isLabelAnnotationIntroducingCharacter(ch)) {
          if (i == 0) {
            sawAtZero = true;
            seenAtZero = ch;
          } else if (sawAtZero && i > 1 && ch == seenAtZero) {
            sawAtZero = false;
          } else {
            break;
          }
        }
      }
      return i;
    }
docs: Returns the index of the first character that is after the basic
  label.  That is, if category is "NP-LGS", it returns 2.
  This routine assumes category != null.
  This routine returns 0 iff the String is of length 0.
  This routine always returns a number &lt;= category.length(), and
  so it is safe to pass it as an argument to category.substring().
  <p>
  NOTE: the routine should never allow the first character of a label
  to be taken as the annotation introducing character, because in the
  Penn Treebank, "-" is a valid tag, but also the character used to
  set off functional and co-indexing annotations. If the first letter is
  such a character then a matched character is also not used, for
  -LRB- etc., iff there is an intervening character (so --PU becomes -).
  
  @param category Phrasal category
  @return The index of the first character that is after the basic
  label