예제 #1
0
            internal void createEntryPointMap()
            {
                HashMap  hashMap  = new HashMap();
                HashMap  hashMap2 = new HashMap();
                Iterator iterator = HMMTree.access_000(this.this_0).iterator();

                while (iterator.hasNext())
                {
                    Unit     unit      = (Unit)iterator.next();
                    Node     node      = new Node(float.MinValue);
                    Iterator iterator2 = this.getEntryPointRC().iterator();
                    while (iterator2.hasNext())
                    {
                        Unit unit2 = (Unit)iterator2.next();
                        HMM  hmm   = HMMTree.access_100(this.this_0).getHMM(this.baseUnit, unit, unit2, HMMPosition.__BEGIN);
                        Node node2;
                        if ((node2 = (Node)hashMap.get(hmm)) == null)
                        {
                            node2 = node.addSuccessor(hmm, this.getProbability());
                            hashMap.put(hmm, node2);
                        }
                        else
                        {
                            node.putSuccessor(hmm, node2);
                        }
                        this.nodeCount++;
                        this.connectEntryPointNode(node2, unit2);
                    }
                    this.connectSingleUnitWords(unit, node, hashMap2);
                    this.unitToEntryPointMap.put(unit, node);
                }
            }
예제 #2
0
 internal EntryPoint(HMMTree hmmtree, Unit unit)
 {
     this.this_0              = hmmtree;
     this.baseUnit            = unit;
     this.baseNode            = new Node(float.MinValue);
     this.unitToEntryPointMap = new HashMap();
     this.singleUnitWords     = new ArrayList();
     this.totalProbability    = float.MinValue;
 }
예제 #3
0
            internal EntryPointTable(HMMTree hmmtree, Collection collection)
            {
                this.this_0      = hmmtree;
                this.entryPoints = new HashMap();
                Iterator iterator = collection.iterator();

                while (iterator.hasNext())
                {
                    Unit unit = (Unit)iterator.next();
                    this.entryPoints.put(unit, new HMMTree.EntryPoint(hmmtree, unit));
                }
            }
예제 #4
0
 private void connectSingleUnitWords(Unit lc, Node node, HashMap hashMap)
 {
     if (!this.singleUnitWords.isEmpty())
     {
         Iterator iterator = HMMTree.access_200(this.this_0).iterator();
         while (iterator.hasNext())
         {
             Unit    unit = (Unit)iterator.next();
             HMM     hmm  = HMMTree.access_100(this.this_0).getHMM(this.baseUnit, lc, unit, HMMPosition.__SINGLE);
             HMMNode hmmnode;
             if ((hmmnode = (HMMNode)hashMap.get(hmm)) == null)
             {
                 hmmnode = (HMMNode)node.addSuccessor(hmm, this.getProbability());
                 hashMap.put(hmm, hmmnode);
             }
             else
             {
                 node.putSuccessor(hmm, hmmnode);
             }
             hmmnode.addRC(unit);
             this.nodeCount++;
             Iterator iterator2 = this.singleUnitWords.iterator();
             while (iterator2.hasNext())
             {
                 Pronunciation pronunciation = (Pronunciation)iterator2.next();
                 if (pronunciation.getWord() == HMMTree.access_300(this.this_0).getSentenceStartWord())
                 {
                     HMMTree.access_402(this.this_0, new InitialWordNode(pronunciation, hmmnode));
                 }
                 else
                 {
                     float    num      = HMMTree.access_500(this.this_0, pronunciation.getWord());
                     WordNode wordNode = hmmnode.addSuccessor(pronunciation, num, HMMTree.access_600(this.this_0));
                     if (pronunciation.getWord() == HMMTree.access_300(this.this_0).getSentenceEndWord())
                     {
                         HMMTree.access_702(this.this_0, wordNode);
                     }
                 }
                 this.nodeCount++;
             }
         }
     }
 }
예제 #5
0
 internal static WordNode access_702(HMMTree hmmtree, WordNode result)
 {
     hmmtree.sentenceEndWordNode = result;
     return(result);
 }
예제 #6
0
 internal static Map access_600(HMMTree hmmtree)
 {
     return(hmmtree.wordNodeMap);
 }
예제 #7
0
 internal static float access_500(HMMTree hmmtree, Word word)
 {
     return(hmmtree.getWordUnigramProbability(word));
 }
예제 #8
0
 internal static InitialWordNode access_402(HMMTree hmmtree, InitialWordNode result)
 {
     hmmtree.initialNode = result;
     return(result);
 }
예제 #9
0
 internal static dictionary.Dictionary access_300(HMMTree hmmtree)
 {
     return(hmmtree.dictionary);
 }
예제 #10
0
 internal static Set access_200(HMMTree hmmtree)
 {
     return(hmmtree.entryPoints);
 }
예제 #11
0
 internal static HMMPool access_100(HMMTree hmmtree)
 {
     return(hmmtree.hmmPool);
 }
예제 #12
0
 internal static Set access_000(HMMTree hmmtree)
 {
     return(hmmtree.exitPoints);
 }