public virtual Word getAssociatedWord() { Word result = null; SentenceHMMState sentenceHMMState = this; while (sentenceHMMState != null && !(sentenceHMMState is WordState)) { sentenceHMMState = sentenceHMMState.getParent(); } if (sentenceHMMState != null) { WordState wordState = (WordState)sentenceHMMState; result = wordState.getWord(); } return(result); }
public PronunciationState(WordState parent, int which) : base("P", parent, which) { this.pronunciation = parent.getWord().getPronunciations()[which]; }