code: public static HeadedSyntacticCategory parseFrom(String typeString) {
      // Strip variable numbers and features, without using 
      // regular expressions for GWT compatibility.
      String syntacticString = stripBracketedExpression(typeString, "{", "}");
  
      SyntacticCategory syntax = SyntacticCategory.parseFrom(syntacticString);
      int[] semanticVariables = new int[syntax.getNumSubcategories()];
      parseSemanticVariables(syntax, typeString, semanticVariables, 0);
  
      int rootIndex = syntax.getNumReturnSubcategories();
      return new HeadedSyntacticCategory(syntax, semanticVariables, rootIndex);
    }
docs: Parses a syntactic category with augmented semantic variable
  information from a category string. The expected format is
  identical to that for {@link SyntacticCategory}, except that each
  parenthesized or atomic element may be followed by a semantic
  variable number in curly braces ({}). All elements with the same
  number will be semantically unified during parsing. Unnumbered
  elements will be assigned to semantic variable 0, which typically
  denotes the head of the syntactic category.
  <p>
  Furthermore, components of the category string may be annotated
  with syntactic subcategorization features in square braces ([]).
  These features may be passed to other syntactic variables via
  unification during parsing, in the same fashion as semantic
  variables. If included, these features must be placed before
  the semantic variable number, e.g., N[athlete]{1}.
  <p>
  Examples:<br>
  that := ((N{1}\N{1}){0}/(S\N{1})){0} <br>
  very := ((N{1}/N{1}){2}/(N{1}/N{1}){2}){0}
  going := ((S[ing]{0}\N{1}){0}/N{2}){0}
  
  @param typeString
  @return