if (verbose) { System.err.print("Reading canonicalEvents..."); tempTimer.reset(); } canonicalEvents = (FlexibleMap)s.readObject(); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Reading lexPriorModel..."); tempTimer.reset(); } lexPriorModel = (Model)s.readObject(); lexPriorModel.setCanonicalEvents(canonicalEvents); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Reading nonterminalPriorModel..."); tempTimer.reset(); } nonterminalPriorModel = (Model)s.readObject(); nonterminalPriorModel.setCanonicalEvents(canonicalEvents); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Reading topNonterminalModel..."); tempTimer.reset(); } topNonterminalModel = (Model)s.readObject(); topNonterminalModel.setCanonicalEvents(canonicalEvents); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Reading topLexModel..."); tempTimer.reset(); } topLexModel = (Model)s.readObject(); topLexModel.setCanonicalEvents(canonicalEvents); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Reading headModel..."); tempTimer.reset(); } headModel = (Model)s.readObject(); headModel.setCanonicalEvents(canonicalEvents); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Reading gapModel..."); tempTimer.reset(); } gapModel = (Model)s.readObject(); gapModel.setCanonicalEvents(canonicalEvents); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Reading leftSubcatModel..."); tempTimer.reset(); } leftSubcatModel = (Model)s.readObject(); leftSubcatModel.setCanonicalEvents(canonicalEvents); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Reading rightSubcatModel..."); tempTimer.reset(); } rightSubcatModel = (Model)s.readObject(); rightSubcatModel.setCanonicalEvents(canonicalEvents); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Reading modNonterminalModel..."); tempTimer.reset(); } modNonterminalModel = (Model)s.readObject(); modNonterminalModel.setCanonicalEvents(canonicalEvents); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Reading modWordModel..."); tempTimer.reset(); } modWordModel = (Model)s.readObject(); modWordModel.setCanonicalEvents(canonicalEvents); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Reading vocabCounter..."); tempTimer.reset(); } vocabCounter = (CountsTable)s.readObject(); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Reading wordFeatureCounter..."); tempTimer.reset(); } wordFeatureCounter = (CountsTable)s.readObject(); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Reading nonterminals..."); tempTimer.reset(); } nonterminals = (CountsTable)s.readObject(); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Reading posMap..."); tempTimer.reset(); } posMap = (Map)s.readObject(); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Reading leftSubcatMap..."); tempTimer.reset(); } leftSubcatMap = (Map)s.readObject(); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Reading rightSubcatMap..."); tempTimer.reset(); } rightSubcatMap = (Map)s.readObject(); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Reading modNonterminalMap..."); tempTimer.reset(); } modNonterminalMap = (Map)s.readObject(); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Reading prunedPreterms..."); tempTimer.reset(); } prunedPreterms = (Set)s.readObject(); if (verbose) System.err.println("done (" + tempTimer + ")."); if (verbose) { System.err.print("Reading prunedPunctuation..."); tempTimer.reset(); } prunedPunctuation = (Set)s.readObject(); if (verbose) System.err.println("done (" + tempTimer + ").");
createModelArray();
  private void readObject(java.io.ObjectInputStream s)    throws IOException, ClassNotFoundException {    Time totalTime = null;    if (verbose)      totalTime = new Time();    s.defaultReadObject();    Time tempTimer = null;    if (verbose)      tempTimer = new Time();    if (verbose) {      System.err.print("Reading canonicalEvents...");      tempTimer.reset();    }    canonicalEvents = (FlexibleMap)s.readObject();    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Reading lexPriorModel...");      tempTimer.reset();    }    lexPriorModel = (Model)s.readObject();    lexPriorModel.setCanonicalEvents(canonicalEvents);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Reading nonterminalPriorModel...");      tempTimer.reset();    }    nonterminalPriorModel = (Model)s.readObject();    nonterminalPriorModel.setCanonicalEvents(canonicalEvents);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Reading topNonterminalModel...");      tempTimer.reset();    }    topNonterminalModel = (Model)s.readObject();    topNonterminalModel.setCanonicalEvents(canonicalEvents);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Reading topLexModel...");      tempTimer.reset();    }    topLexModel = (Model)s.readObject();    topLexModel.setCanonicalEvents(canonicalEvents);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Reading headModel...");      tempTimer.reset();    }    headModel = (Model)s.readObject();    headModel.setCanonicalEvents(canonicalEvents);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Reading gapModel...");      tempTimer.reset();    }    gapModel = (Model)s.readObject();    gapModel.setCanonicalEvents(canonicalEvents);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Reading leftSubcatModel...");      tempTimer.reset();    }    leftSubcatModel = (Model)s.readObject();    leftSubcatModel.setCanonicalEvents(canonicalEvents);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Reading rightSubcatModel...");      tempTimer.reset();    }    rightSubcatModel = (Model)s.readObject();    rightSubcatModel.setCanonicalEvents(canonicalEvents);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Reading modNonterminalModel...");      tempTimer.reset();    }    modNonterminalModel = (Model)s.readObject();    modNonterminalModel.setCanonicalEvents(canonicalEvents);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Reading modWordModel...");      tempTimer.reset();    }    modWordModel = (Model)s.readObject();    modWordModel.setCanonicalEvents(canonicalEvents);    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Reading vocabCounter...");      tempTimer.reset();    }    vocabCounter = (CountsTable)s.readObject();    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Reading wordFeatureCounter...");      tempTimer.reset();    }    wordFeatureCounter = (CountsTable)s.readObject();    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Reading nonterminals...");      tempTimer.reset();    }    nonterminals = (CountsTable)s.readObject();    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Reading posMap...");      tempTimer.reset();    }    posMap = (Map)s.readObject();    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Reading leftSubcatMap...");      tempTimer.reset();    }    leftSubcatMap = (Map)s.readObject();    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Reading rightSubcatMap...");      tempTimer.reset();    }    rightSubcatMap = (Map)s.readObject();    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Reading modNonterminalMap...");      tempTimer.reset();    }    modNonterminalMap = (Map)s.readObject();    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Reading prunedPreterms...");      tempTimer.reset();    }    prunedPreterms = (Set)s.readObject();    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose) {      System.err.print("Reading prunedPunctuation...");      tempTimer.reset();    }    prunedPunctuation = (Set)s.readObject();    if (verbose)      System.err.println("done (" + tempTimer + ").");    if (verbose)      System.err.println("Total time reading ModelCollection object: " +                         totalTime + ".");    if (callGCAfterReadingObject) {      if (verbose)	System.err.print("gc...");      System.gc();      if (verbose)	System.err.println("done");    }  }