internal HMMNode(HMM hmm, float num) : base(num) { this.hmm = hmm; Unit baseUnit = this.getBaseUnit(); int type = 1; if (baseUnit.isSilence()) { type = 3; } else if (baseUnit.isFiller()) { type = 4; } else if (hmm.getPosition().isWordBeginning()) { type = 2; } this.setType(type); }
public virtual void put(HMM hmm) { ((Map)this.hmmsPerPosition.get(hmm.getPosition())).put(hmm.getUnit(), hmm); this.allHMMs.add(hmm); }
public virtual void add(Token t) { this.numTokens++; SearchState searchState = t.getSearchState(); if (searchState is WordSearchState) { this.numWords++; } else if (searchState is UnitSearchState) { this.numUnits++; } else if (searchState is HMMSearchState) { HMM hmm = ((HMMSearchState)searchState).getHMMState().getHMM(); switch (TokenTypeTracker_1._SwitchMap_edu_cmu_sphinx_linguist_acoustic_HMMPosition[hmm.getPosition().ordinal()]) { case 1: this.numHMMBegin++; break; case 2: this.numHMMEnd++; break; case 3: this.numHMMSingle++; break; case 4: this.numHMMInternal++; break; } } else { this.numOthers++; } }