Ejemplo n.º 1
0
        public HMMManager()
        {
            this.allHMMs         = new java.util.ArrayList();
            this.hmmsPerPosition = new EnumMap(ClassLiteral <HMMPosition> .Value);
            HMMPosition[] array = HMMPosition.values();
            int           num   = array.Length;

            for (int i = 0; i < num; i++)
            {
                HMMPosition hmmposition = array[i];
                this.hmmsPerPosition.put(hmmposition, new HashMap());
            }
        }
        private SenoneHMM getHMMAtAnyPosition(Unit unit)
        {
            HMMManager hmmmanager = this.loader.getHMMManager();

            HMMPosition[] array = HMMPosition.values();
            int           num   = array.Length;

            for (int i = 0; i < num; i++)
            {
                HMMPosition position  = array[i];
                SenoneHMM   senoneHMM = (SenoneHMM)hmmmanager.get(position, unit);
                if (senoneHMM != null)
                {
                    return(senoneHMM);
                }
            }
            return(null);
        }