s.defaultWriteObject();  Time tempTimer = null; if (verbose) tempTimer = new Time();  if (verbose) { System.err.print("Writing out canonicalEvents..."); tempTimer.reset(); } boolean precomputeProbs = Boolean.valueOf(Settings.get(Settings.precomputeProbs)).booleanValue(); if (precomputeProbs) canonicalEvents = null; else { String writeCanonicalEventsStr = Settings.get(Settings.writeCanonicalEvents); boolean writeCanonicalEvents = Boolean.valueOf(writeCanonicalEventsStr).booleanValue(); if (!writeCanonicalEvents) { if (verbose) System.err.print("emptying..."); canonicalEvents.clear(); } } s.writeObject(canonicalEvents); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Writing out lexPriorModel..."); tempTimer.reset(); } s.writeObject(lexPriorModel); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Writing out nonterminalPriorModel..."); tempTimer.reset(); } s.writeObject(nonterminalPriorModel); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Writing out topNonterminalModel..."); tempTimer.reset(); } s.writeObject(topNonterminalModel); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Writing out topLexModel..."); tempTimer.reset(); } s.writeObject(topLexModel); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Writing out headModel..."); tempTimer.reset(); } s.writeObject(headModel); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Writing out gapModel..."); tempTimer.reset(); } s.writeObject(gapModel); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Writing out leftSubcatModel..."); tempTimer.reset(); } s.writeObject(leftSubcatModel); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Writing out rightSubcatModel..."); tempTimer.reset(); } s.writeObject(rightSubcatModel); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Writing out modNonterminalModel..."); tempTimer.reset(); } s.writeObject(modNonterminalModel); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Writing out modWordModel..."); tempTimer.reset(); } s.writeObject(modWordModel); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Writing out vocabCounter..."); tempTimer.reset(); } s.writeObject(vocabCounter); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Writing out wordFeatureCounter..."); tempTimer.reset(); } s.writeObject(wordFeatureCounter); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Writing out nonterminals..."); tempTimer.reset(); } s.writeObject(nonterminals); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Writing out posMap..."); tempTimer.reset(); } s.writeObject(posMap); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Writing out leftSubcatMap..."); tempTimer.reset(); } s.writeObject(leftSubcatMap); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Writing out rightSubcatMap..."); tempTimer.reset(); } s.writeObject(rightSubcatMap); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Writing out modNonterminalMap..."); tempTimer.reset(); } s.writeObject(modNonterminalMap); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Writing out prunedPreterms..."); tempTimer.reset(); } s.writeObject(prunedPreterms); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Writing out prunedPunctuation..."); tempTimer.reset(); } s.writeObject(prunedPunctuation); if (verbose) System.err.println("done (" + tempTimer + ").");
internalWriteObject(s);
  private void writeObject(java.io.ObjectOutputStream s)    throws IOException {    Time totalTime = null;    if (verbose)      totalTime = new Time();    s.defaultWriteObject();    Time tempTimer = null;    if (verbose)      tempTimer = new Time();    if (verbose) {      System.err.print("Writing out canonicalEvents...");      tempTimer.reset();    }    boolean precomputeProbs =      Boolean.valueOf(Settings.get(Settings.precomputeProbs)).booleanValue();    if (precomputeProbs)      canonicalEvents = null;    else {      String writeCanonicalEventsStr =	Settings.get(Settings.writeCanonicalEvents);      boolean writeCanonicalEvents =	Boolean.valueOf(writeCanonicalEventsStr).booleanValue();      if (!writeCanonicalEvents) {	if (verbose)	  System.err.print("emptying...");	canonicalEvents.clear();      }    }    s.writeObject(canonicalEvents);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Writing out lexPriorModel...");      tempTimer.reset();    }    s.writeObject(lexPriorModel);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Writing out nonterminalPriorModel...");      tempTimer.reset();    }    s.writeObject(nonterminalPriorModel);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Writing out topNonterminalModel...");      tempTimer.reset();    }    s.writeObject(topNonterminalModel);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Writing out topLexModel...");      tempTimer.reset();    }    s.writeObject(topLexModel);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Writing out headModel...");      tempTimer.reset();    }    s.writeObject(headModel);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Writing out gapModel...");      tempTimer.reset();    }    s.writeObject(gapModel);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Writing out leftSubcatModel...");      tempTimer.reset();    }    s.writeObject(leftSubcatModel);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Writing out rightSubcatModel...");      tempTimer.reset();    }    s.writeObject(rightSubcatModel);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Writing out modNonterminalModel...");      tempTimer.reset();    }    s.writeObject(modNonterminalModel);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Writing out modWordModel...");      tempTimer.reset();    }    s.writeObject(modWordModel);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Writing out vocabCounter...");      tempTimer.reset();    }    s.writeObject(vocabCounter);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Writing out wordFeatureCounter...");      tempTimer.reset();    }    s.writeObject(wordFeatureCounter);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Writing out nonterminals...");      tempTimer.reset();    }    s.writeObject(nonterminals);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Writing out posMap...");      tempTimer.reset();    }    s.writeObject(posMap);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Writing out leftSubcatMap...");      tempTimer.reset();    }    s.writeObject(leftSubcatMap);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Writing out rightSubcatMap...");      tempTimer.reset();    }    s.writeObject(rightSubcatMap);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Writing out modNonterminalMap...");      tempTimer.reset();    }    s.writeObject(modNonterminalMap);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Writing out prunedPreterms...");      tempTimer.reset();    }    s.writeObject(prunedPreterms);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Writing out prunedPunctuation...");      tempTimer.reset();    }    s.writeObject(prunedPunctuation);    if (verbose)      System.err.println("done (" + tempTimer + ").");    /*    if (verbose)      System.err.println("Total time writing out ModelCollection object: " +                         totalTime + ".");    */  }