public TransitionModel(KaldiTextParser parser) { parser.expectToken("<TransitionModel>"); this.parseTopology(parser); parser.expectToken("<Triples>"); this.transitionStates = new HashMap(); int @int = parser.getInt(); int num = 1; for (int i = 0; i < @int; i++) { int j = parser.getInt(); int int2 = parser.getInt(); int int3 = parser.getInt(); Triple triple = new Triple(j, int2, int3); this.transitionStates.put(triple, Integer.valueOf(num)); num += ((HmmState)((List)this.phoneStates.get(Integer.valueOf(j))).get(int2)).getTransitions().size(); } parser.expectToken("</Triples>"); parser.expectToken("<LogProbs>"); this.logProbabilities = parser.getFloatArray(); parser.expectToken("</LogProbs>"); parser.expectToken("</TransitionModel>"); LogMath logMath = LogMath.getLogMath(); for (int j = 0; j < this.logProbabilities.Length; j++) { this.logProbabilities[j] = logMath.lnToLog(this.logProbabilities[j]); } }