private void processStages(string str) { if (!this.StageNames.contains(this.initialStage) || !this.StageNames.contains(this.finalStage)) { return; } Iterator iterator = this.StageList.iterator(); while (iterator.hasNext()) { Stage stage = (Stage)iterator.next(); if (!this.isStageActive && String.instancehelper_equals(this.initialStage, stage.toString())) { this.isStageActive = true; } if (this.isStageActive) { try { if (stage.equals(Stage.___00_INITIALIZATION)) { [email protected]("00 - Initializing"); this.trainManager.initializeModels(str); [email protected]("Saving"); this.trainManager.saveModels(str); } else if (stage.equals(Stage.___10_CI_TRAIN)) { [email protected]("01 - CI train"); this.trainManager.trainContextIndependentModels(str); [email protected]("Saving"); this.trainManager.saveModels(str); } else if (stage.equals(Stage.___20_UNTIED_CD_TRAIN)) { [email protected]("02 - Untied CD train"); } else if (stage.equals(Stage.___30_STATE_PRUNING)) { [email protected]("03 - State pruning"); } else if (stage.equals(Stage.___40_TIED_CD_TRAIN)) { [email protected]("04 - Tied CD train"); } else if (stage.equals(Stage.___90_CP_MODEL)) { [email protected]("Copying"); this.trainManager.copyModels(str); } else if (!Trainer.assertionsDisabled) { object obj = "stage not implemented"; throw new AssertionError(obj); } } catch (IOException ex) { throw new Error(new StringBuilder().append("IOE: Can't finish trainer ").append(ex).toString(), ex); } if (String.instancehelper_equals(this.finalStage, stage.toString())) { this.isStageActive = false; } } } }
private void addStage(Stage stage) { this.StageList.add(stage); this.StageNames.add(stage.toString()); }