public class LatticeGrammar extends Grammar
| Modifier and Type | Field and Description |
|---|---|
Lattice |
lattice |
dictionary, initialNode, logger, PROP_ADD_FILLER_WORDS, PROP_ADD_SIL_WORDS, PROP_DICTIONARY, PROP_OPTIMIZE_GRAMMAR, PROP_SHOW_GRAMMAR| Constructor and Description |
|---|
LatticeGrammar() |
LatticeGrammar(Lattice lattice,
boolean showGrammar,
boolean optimizeGrammar,
boolean addSilenceWords,
boolean addFillerWords,
Dictionary dictionary) |
| Modifier and Type | Method and Description |
|---|---|
protected GrammarNode |
createGrammar()
Creates the grammar from the language model.
|
void |
newProperties(PropertySheet ps)
This method is called when this configurable component needs to be reconfigured.
|
void |
setLattice(Lattice lattice) |
allocate, createGrammar, createGrammarNode, createGrammarNode, createGrammarNode, createGrammarNode, createGrammarNode, deallocate, dumpGrammar, dumpRandomSentences, dumpRandomSentences, dumpStatistics, getDictionary, getGrammarNodes, getInitialNode, getNumNodes, getRandomSentence, newGrammar, postProcessGrammarpublic Lattice lattice
public LatticeGrammar(Lattice lattice, boolean showGrammar, boolean optimizeGrammar, boolean addSilenceWords, boolean addFillerWords, Dictionary dictionary)
public LatticeGrammar()
public void newProperties(PropertySheet ps) throws PropertyException
ConfigurablenewProperties in interface ConfigurablenewProperties in class Grammarps - a property sheet holding the new dataPropertyException - if there is a problem with the properties.protected GrammarNode createGrammar() throws java.io.IOException
createGrammar in class Grammarjava.io.IOException - if the grammar could not be loadedpublic void setLattice(Lattice lattice) throws java.io.IOException
java.io.IOException