Using the Search module from TCL


Before using the search, you usually have to create quite a few objects it depends on directly or indirectly; Directly the search only depends on the vocabulary and the language model.

Creating a search object

Search _search _vocab _lm;  # this should create a search object

Search Methods

Example:
Search _search _vocab _lm;        # this should create a search object
_search treeFwd -eval test.adc;   # this does the tree search for file test.adc
_search lattice;                  # create lattice and do trigram rescoring


Search Configuration

It's mostly the submodules of the search that are configured. The search itself only has the following:
search configure \
  -phoneInsertionPenalty 0.000000 \
  -wordPenalty 0.000000 \
  -silenceWordPenalty 0.150000 \
  -fillerWordPenalty 0.000000 \
  -use3gFwd 1 \
  -verbose 1 \
  -printWidth 70 

Tree Forward Configuration

The Tree Forward can be configured before and after a search object has been created: before, you can modify the creation defaults for all search objects created lateron;
TreeFwd configure \
  -beamWidth 88.00 \
  -phoneBeamWidth 88.00 \
  -wordBeamWidth 87.00 \
  -lastPhoneBeamWidth 87.00 \
  -lastPhoneBeamWidth 87.00 \
  -topN 0 \
  -hypoFormat {{other stderr unfiltered} {file hypo.T.all append filtered}}}
Alternatively, you can configure the tree forward after creating a Search object:
Search _search _vocab _lm;        # this should create a search object
  search.treeFwd configure \
  -beamWidth 88.000000 \
  -phoneBeamWidth 88.000000 \
  -wordBeamWidth 87.000000 \
  -lastPhoneBeamWidth 87.000000 \
  -lastPhoneBeamWidth 87.000000 \
  -topN 0 \
  -hypoFormat {{other stderr unfiltered} {file hypo.T.all append filtered}}

Search Beams

The beams mean (roughly):

Search Info

The search stores internal bookkeeping stuff in places where you can get at it. The following are available as fmatrix in the search object (after tree pass only): WARNING: the format of these is not 100% finalized. If you use them be ready to update your scripts every now and then.
If this page is incomplete, ask monika@ira.uka.de or finkem@cs.cmu.edu to complete it.