public virtual void connect(SentenceHMMStateArc arc) { if (this.successorArray != null) { this.successorArray = null; } this.rawConnect(arc); }
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()); } }
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); }
internal virtual void deleteSuccessor(SentenceHMMStateArc sentenceHMMStateArc) { this.arcs.values().remove(sentenceHMMStateArc); }
private void rawConnect(SentenceHMMStateArc sentenceHMMStateArc) { SentenceHMMState sentenceHMMState = (SentenceHMMState)sentenceHMMStateArc.getState(); this.arcs.put(new StringBuilder().append(sentenceHMMState.getValueSignature()).append(sentenceHMMState.getStateNumber()).toString(), sentenceHMMStateArc); }
protected internal virtual void attachState(SentenceHMMState prevState, SentenceHMMState nextState, float logLanguageProbability, float logInsertionProbability) { SentenceHMMStateArc arc = new SentenceHMMStateArc(nextState, logLanguageProbability, logInsertionProbability); prevState.connect(arc); }