removeOnlyChildBaseNPs(currChild);
if (!currChildRemoved) removeOnlyChildBaseNPs(currChild);
  protected void removeOnlyChildBaseNPs(Sexp tree) {    Treebank treebank = Language.treebank;    if (treebank.isPreterminal(tree))      return;    else if (tree.isList()) {      SexpList treeList = tree.list();      int treeListLen = treeList.length();      for (int i = 1; i < treeListLen; i++) {        Sexp currChild = treeList.get(i);        boolean hasOnlyChild = treeListLen == 2;        if (hasOnlyChild &&            !treebank.isPreterminal(currChild) && currChild.isList()) {          Symbol parentLabel = treebank.stripAugmentation(treeList.symbolAt(0));          if (parentLabel == treebank.NPLabel()) {            Symbol childLabel =              treebank.stripAugmentation(currChild.list().symbolAt(0));            if (childLabel == treebank.baseNPLabel()) {              // we've got an NP dominating an only child base NP!              // first, remove baseNP from parent              treeList.remove(i);              // next, make all baseNP's children become parent's children              SexpList childList = currChild.list();              int childListLen = childList.length();              for (int j = 1; j < childListLen; j++)                treeList.add(childList.get(j));              // need to re-calculate cached length              treeListLen = treeList.length();            }          }        }        removeOnlyChildBaseNPs(currChild);      }    }  }