if (event != null && event.parent() == baseNP && Language.treebank.isPunctuation(prevModSym)) return;    if ((Language.treebank.isPunctuation(prevModSym) && Language.treebank.isConjunction(currModSym)) || (Language.treebank.isConjunction(prevModSym) && Language.treebank.isPunctuation(currModSym))) return;  list.remove(list.length() - 1); list.add(0, prevModSym);
if (event != null && event.parent() == baseNP) { doShift = !Language.treebank.isPunctuation(prevModSym); } else {    doShift = !((Language.treebank.isPunctuation(prevModSym) && Language.treebank.isConjunction(currModSym)) || (Language.treebank.isConjunction(prevModSym) && Language.treebank.isPunctuation(currModSym))); } if (doShift) { list.remove(list.length() - 1); list.add(0, prevModSym); }
  public void shift(TrainerEvent event, SexpList list,		    Sexp prevMod, Sexp currMod) {    Symbol currModSym = currMod.symbol();    Symbol prevModSym = prevMod.symbol();    // do not treat punctuation as a true "previous modifier" when inside    // a base NP    if (event != null && event.parent() == baseNP &&	Language.treebank.isPunctuation(prevModSym))      return;    // treat punctuation and conjunction as conditionally independent:    // if one follows the other, the previous element is *not* shifted    // into the history list    if ((Language.treebank.isPunctuation(prevModSym) &&	 Language.treebank.isConjunction(currModSym)) ||	(Language.treebank.isConjunction(prevModSym) &&	 Language.treebank.isPunctuation(currModSym)))      return;    list.remove(list.length() - 1);    list.add(0, prevModSym);  }