Ejemplo n.º 1
0
 public virtual void connect(SentenceHMMStateArc arc)
 {
     if (this.successorArray != null)
     {
         this.successorArray = null;
     }
     this.rawConnect(arc);
 }
Ejemplo n.º 2
0
 private void dump()
 {
     [email protected](new StringBuilder().append(" ----- ").append(this.getTitle()).append(" ---- ").toString());
     for (int i = 0; i < this.getSuccessors().Length; i++)
     {
         SentenceHMMStateArc sentenceHMMStateArc = (SentenceHMMStateArc)this.getSuccessors()[i];
         [email protected](new StringBuilder().append("   -> ").append(sentenceHMMStateArc.getState().toPrettyString()).toString());
     }
 }
Ejemplo n.º 3
0
        protected internal virtual SentenceHMMStateArc getArc(SentenceHMMState nextState, float logLanguageProbability, float logInsertionProbability)
        {
            SentenceHMMStateArc sentenceHMMStateArc  = new SentenceHMMStateArc(nextState, logLanguageProbability * this.languageWeight, logInsertionProbability);
            SentenceHMMStateArc sentenceHMMStateArc2 = (SentenceHMMStateArc)this.arcPool.cache(sentenceHMMStateArc);

            this.actualArcs.value = (double)this.arcPool.getMisses();
            this.totalArcs.value  = (double)(this.arcPool.getHits() + this.arcPool.getMisses());
            return((sentenceHMMStateArc2 != null) ? sentenceHMMStateArc2 : sentenceHMMStateArc);
        }
 public override bool equals(object o)
 {
     if (this == o)
     {
         return(true);
     }
     if (o is SentenceHMMStateArc)
     {
         SentenceHMMStateArc sentenceHMMStateArc = (SentenceHMMStateArc)o;
         return(this.nextState == sentenceHMMStateArc.nextState && this.logLanguageProbability == sentenceHMMStateArc.logLanguageProbability && this.logInsertionProbability == sentenceHMMStateArc.logInsertionProbability);
     }
     return(false);
 }
Ejemplo n.º 5
0
 internal virtual void deleteSuccessor(SentenceHMMStateArc sentenceHMMStateArc)
 {
     this.arcs.values().remove(sentenceHMMStateArc);
 }
Ejemplo n.º 6
0
        private void rawConnect(SentenceHMMStateArc sentenceHMMStateArc)
        {
            SentenceHMMState sentenceHMMState = (SentenceHMMState)sentenceHMMStateArc.getState();

            this.arcs.put(new StringBuilder().append(sentenceHMMState.getValueSignature()).append(sentenceHMMState.getStateNumber()).toString(), sentenceHMMStateArc);
        }
Ejemplo n.º 7
0
            protected internal virtual void attachState(SentenceHMMState prevState, SentenceHMMState nextState, float logLanguageProbability, float logInsertionProbability)
            {
                SentenceHMMStateArc arc = new SentenceHMMStateArc(nextState, logLanguageProbability, logInsertionProbability);

                prevState.connect(arc);
            }