System.err.println("added unaries and stop probs " + i + " times");
System.err.println(className + ": added unaries and stop probs " + i + " times");
  protected void addUnariesAndStopProbs(int start, int end)  throws RemoteException {    prevItemsAdded.clear();    currItemsAdded.clear();    stopProbItemsToAdd.clear();    boolean buildingOnPreterminalProductions = start == end;    Iterator it = chart.get(start, end);    while (it.hasNext()) {      CKYItem item = (CKYItem)it.next();      if (item.stop() == false)        stopProbItemsToAdd.add(item);      else if (buildingOnPreterminalProductions)        prevItemsAdded.add(item);    }    if (!buildingOnPreterminalProductions) {      it = stopProbItemsToAdd.iterator();      while (it.hasNext())        addStopProbs((CKYItem)it.next(), prevItemsAdded);    }    int i = -1;    //for (i = 0; i < 5 && prevItemsAdded.size() > 0; i++) {    for (i = 0; prevItemsAdded.size() > 0; i++) {      Iterator prevItems = prevItemsAdded.iterator();      while (prevItems.hasNext()) {        CKYItem item = (CKYItem)prevItems.next();        addUnaries(item, currItemsAdded);      }      exchangePrevAndCurrItems();      currItemsAdded.clear();      prevItems = prevItemsAdded.iterator();      while (prevItems.hasNext()) {        CKYItem item = (CKYItem)prevItems.next();        addStopProbs(item, currItemsAdded);      }      exchangePrevAndCurrItems();      currItemsAdded.clear();    }    if (debugUnariesAndStopProbs) {      System.err.println("added unaries and stop probs " + i + " times");    }  }