arch
Class LexicalTree

java.lang.Object
  extended by arch.LexicalTree

public class LexicalTree
extends java.lang.Object

The LexicalTree stores the compiled lexicon. The tree is organized by phone prefixes and used for both training and recognition.

Author:
sikoried

Constructor Summary
LexicalTree(PhoneInventory phoneInventory, Lexicon lexicon)
          Construct a lexical tree using the given PhoneInventory and Lexicon.
 
Method Summary
 void addToTree(Lexicon.Entry word, Polyphone[] transcription)
          Add a Polyphone sequence (i.e.
static void main(java.lang.String[] args)
           
 void rebuildTree()
          Rebuild the lexical tree structure using the current PhoneInventory and Lexicon
 HMM[] synthesize(java.lang.Iterable<Lexicon.Entry> sent)
          Synthesize a sequence of HMMs for the given sentence
 java.lang.String toDotFormat(boolean includeHeader)
          Return a .dot representation of the LexicalTree for use with a graph plotter
 java.lang.String toString()
          Return a String representation of the lexical tree.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LexicalTree

public LexicalTree(PhoneInventory phoneInventory,
                   Lexicon lexicon)
Construct a lexical tree using the given PhoneInventory and Lexicon.

Parameters:
phoneInventory -
lexicon -
Method Detail

addToTree

public void addToTree(Lexicon.Entry word,
                      Polyphone[] transcription)
Add a Polyphone sequence (i.e. a word) to the lexical tree

Parameters:
transcription -

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

rebuildTree

public void rebuildTree()
Rebuild the lexical tree structure using the current PhoneInventory and Lexicon


synthesize

public HMM[] synthesize(java.lang.Iterable<Lexicon.Entry> sent)
                 throws OutOfVocabularyException
Synthesize a sequence of HMMs for the given sentence

Parameters:
sent - List of Lexicon.Entrys representing the sentence
Returns:
sequence of hmms
Throws:
OutOfVocabularyException

toDotFormat

public java.lang.String toDotFormat(boolean includeHeader)
Return a .dot representation of the LexicalTree for use with a graph plotter

Parameters:
includeHeader - include the .dot header?
Returns:

toString

public java.lang.String toString()
Return a String representation of the lexical tree.

Overrides:
toString in class java.lang.Object