Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 0e54ba0ee564ce6063a5e83aa86060c5 > files > 247

festival-speechtools-devel-1.2.96-18.fc14.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>
<HEAD>
   <TITLE>class  EST_Viterbi_Decoder</TITLE>
   <META NAME="GENERATOR" CONTENT="DOC++ 3.4.6">
</HEAD>
 <body bgcolor="#ffffff" link="#0000ff" 
	vlink="#dd0000" text="#000088" alink="9000ff">

<A HREF = "http://www.cstr.ed.ac.uk/">
   <IMG align=left BORDER=0 SRC = "cstr.gif"></A> 
<A HREF="http://www.cstr.ed.ac.uk/projects/speech_tools.html">
	<IMG BORDER=0 ALIGN=right SRC="est.jpg" width=150 height=93></A>
<br>

<br clear=left>
<p align=right>

In file ../include/EST_viterbi.h:<TABLE BORDER=0><TR>
<TD VALIGN=TOP><H2>class  <A HREF="#DOC.DOCU">EST_Viterbi_Decoder</A></H2></TD></H2></TD></TR></TABLE>
<BLOCKQUOTE>A class that offers a generalised Viterbi decoder.</BLOCKQUOTE>
<HR>

<DL>
<P><TABLE>
<DT><H3>Public Fields</H3><DD><TR>
<TD VALIGN=TOP><A HREF="#DOC.90.4"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="EST_Features.html">EST_Features</A> </TD><TD><B>f</B> <BR>
<I>For holding vlaues to pass to user called functions</I>
</TD></TR></TABLE></P>

<P><TABLE>
<DT><H3>Public Methods</H3><DD><TR>
<TD VALIGN=TOP><A HREF="#DOC.90.7"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_Viterbi_Decoder</B> (uclist_f_t <!1><A HREF="EST_Wave.html#DOC.81.4.1">a</A>, unpath_f_t <!1><A HREF="EST_TBuffer.html#DOC.101.5.12.1">b</A>)<BR>
<I>Construct a decoder with given candidate function and join function, as number of states is given this implies a beam search</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.90.8"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_Viterbi_Decoder</B> (uclist_f_t <!1><A HREF="EST_Wave.html#DOC.81.4.1">a</A>, unpath_f_t <!1><A HREF="EST_TBuffer.html#DOC.101.5.12.1">b</A>, int num_states)<BR>
<I>Construct a decoder with given candidate function and join function with a state size as specified</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.90.9"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>~EST_Viterbi_Decoder</B> ()<BR>
<I></I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.90.10"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>set_beam_width</B> (int <!1><A HREF="EST_TrieNode.html#DOC.12.1">w</A>)<BR>
<I>Only for use in beam search mode: number of paths to consider</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.90.11"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>set_cand_width</B> (int <!1><A HREF="EST_TrieNode.html#DOC.12.1">w</A>)<BR>
<I>Only for use in beam search mode: number of condidates to consider</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.90.12"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>set_debug</B> (int <!1><A HREF="EST_SCFG_traintest.html#DOC.106.4">d</A>)<BR>
<I>Output some debugging information</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.90.13"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>set_big_is_good</B> (int flag)<BR>
<I>Define is good scores are bigger or smaller.</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.90.14"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A><!1><A HREF="EST_VTCandidate.html">EST_VTCandidate</A>* </TD><TD><B>add_cand_prune</B> (<!1><A HREF="EST_VTCandidate.html">EST_VTCandidate</A>* newcand, <!1><A HREF="EST_VTCandidate.html">EST_VTCandidate</A>* allcands)<BR>
<I>Add a new candidtate to list if better than others, pruning the list if required</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.90.15"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>initialise</B> (<!1><A HREF="EST_Relation.html">EST_Relation</A>* r)<BR>
<I>Build the initial table from a <!1><A HREF="EST_Relation.html">EST_Relation</A></I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.90.16"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>set_pruning_parameters</B> (float beam, float ob_beam)<BR>
<I>set beam widths for pruning</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.90.17"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>search</B> (void)<BR>
<I>Do the the actual search</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.90.18"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>bool </TD><TD><B>result</B> (const <!1><A HREF="EST_String.html">EST_String</A> &amp;<!1><A HREF="EST_TVector.html#DOC.15.1.20.3">n</A>)<BR>
<I>Extract the result from the table and store it as a feature on the related <!1><A HREF="EST_Item.html">EST_Item</A> in the given <!1><A HREF="EST_Relation.html">EST_Relation</A> named as <TT>n</TT>.</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.90.19"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>copy_feature</B> (const <!1><A HREF="EST_String.html">EST_String</A> &amp;<!1><A HREF="EST_TVector.html#DOC.15.1.20.3">n</A>)<BR>
<I>Copy named feature from the best path to related stream item</I>
</TD></TR></TABLE></P>

<P><TABLE>
<DT><H3>Public</H3><DD><TR>
<TD VALIGN=TOP><A HREF="#DOC.90.5"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>Unfortunately using MAX_DOUBLE doesn't do the right thing</B> <BR>
<I></I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.90.6"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>(eg.</B> <BR>
<I></I>
</TD></TR></TABLE></P>

</DL>

<A NAME="DOC.DOCU"></A>
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>A class that offers a generalised Viterbi decoder.

<P>This class can be used to find the best path through a set
of candidates based on liklihoods of the candidates and 
some combination function.  The candidate list and joining
are not included in the decoder itself but are user defined functions
that are specified as construction time.  

<P>Those functions need to return a list of candidates and score
a join of a path to a candidate and (optionally define a state).

<P>Although this offers a full Viterbi search it may also be used as
a generalised beam search.

<P>See <TT>viterbi_main.cc</TT> for an example of using this.

<P></BLOCKQUOTE>
<DL>

<A NAME="f"></A>
<A NAME="DOC.90.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="EST_Features.html">EST_Features</A> f</B></TT>
<DD>For holding vlaues to pass to user called functions
<DL><DT><DD></DL><P>
<A NAME="Unfortunately using MAX_DOUBLE doesn't do the right thing"></A>
<A NAME="DOC.90.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Unfortunately using MAX_DOUBLE doesn't do the right thing</B></TT>
<DD>Unfortunately using MAX_DOUBLE doesn't do the right thing
<DL><DT><DD></DL><P>
<A NAME="(eg."></A>
<A NAME="DOC.90.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> (eg.</B></TT>
<DD>(eg. comparison don't work with MAX_DOUBLE on alphas), so
<DL><DT><DD></DL><P>
<A NAME="EST_Viterbi_Decoder"></A>
<A NAME="DOC.90.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_Viterbi_Decoder(uclist_f_t <!1><A HREF="EST_Wave.html#DOC.81.4.1">a</A>, unpath_f_t <!1><A HREF="EST_TBuffer.html#DOC.101.5.12.1">b</A>)</B></TT>
<DD>Construct a decoder with given candidate function and join function,
as number of states is given this implies a beam search
<DL><DT><DD></DL><P>
<A NAME="EST_Viterbi_Decoder"></A>
<A NAME="DOC.90.8"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_Viterbi_Decoder(uclist_f_t <!1><A HREF="EST_Wave.html#DOC.81.4.1">a</A>, unpath_f_t <!1><A HREF="EST_TBuffer.html#DOC.101.5.12.1">b</A>, int num_states)</B></TT>
<DD>Construct a decoder with given candidate function and join function
with a state size as specified
<DL><DT><DD></DL><P>
<A NAME="~EST_Viterbi_Decoder"></A>
<A NAME="DOC.90.9"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> ~EST_Viterbi_Decoder()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="set_beam_width"></A>
<A NAME="DOC.90.10"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void set_beam_width(int <!1><A HREF="EST_TrieNode.html#DOC.12.1">w</A>)</B></TT>
<DD>Only for use in beam search mode: number of paths to consider
<DL><DT><DD></DL><P>
<A NAME="set_cand_width"></A>
<A NAME="DOC.90.11"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void set_cand_width(int <!1><A HREF="EST_TrieNode.html#DOC.12.1">w</A>)</B></TT>
<DD>Only for use in beam search mode: number of condidates to consider
<DL><DT><DD></DL><P>
<A NAME="set_debug"></A>
<A NAME="DOC.90.12"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void set_debug(int <!1><A HREF="EST_SCFG_traintest.html#DOC.106.4">d</A>)</B></TT>
<DD>Output some debugging information
<DL><DT><DD></DL><P>
<A NAME="set_big_is_good"></A>
<A NAME="DOC.90.13"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void set_big_is_good(int flag)</B></TT>
<DD>Define is good scores are bigger or smaller.  This allows
the search to work for likelihoods probabailities, scores or
whatever
<DL><DT><DD></DL><P>
<A NAME="add_cand_prune"></A>
<A NAME="DOC.90.14"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="EST_VTCandidate.html">EST_VTCandidate</A>* add_cand_prune(<!1><A HREF="EST_VTCandidate.html">EST_VTCandidate</A>* newcand, <!1><A HREF="EST_VTCandidate.html">EST_VTCandidate</A>* allcands)</B></TT>
<DD>Add a new candidtate to list if better than others, pruning
the list if required
<DL><DT><DD></DL><P>
<A NAME="initialise"></A>
<A NAME="DOC.90.15"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void initialise(<!1><A HREF="EST_Relation.html">EST_Relation</A>* r)</B></TT>
<DD>Build the initial table from a <!1><A HREF="EST_Relation.html">EST_Relation</A>
<DL><DT><DD></DL><P>
<A NAME="set_pruning_parameters"></A>
<A NAME="DOC.90.16"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void set_pruning_parameters(float beam, float ob_beam)</B></TT>
<DD>set beam widths for pruning
<DL><DT><DD></DL><P>
<A NAME="search"></A>
<A NAME="DOC.90.17"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void search(void)</B></TT>
<DD>Do the the actual search
<DL><DT><DD></DL><P>
<A NAME="result"></A>
<A NAME="DOC.90.18"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>bool result(const <!1><A HREF="EST_String.html">EST_String</A> &amp;<!1><A HREF="EST_TVector.html#DOC.15.1.20.3">n</A>)</B></TT>
<DD>Extract the result from the table and store it as a feature
on the related <!1><A HREF="EST_Item.html">EST_Item</A> in the given <!1><A HREF="EST_Relation.html">EST_Relation</A>
named as <TT>n</TT>. Return FALSE if no path is found.
<DL><DT><DD></DL><P>
<A NAME="copy_feature"></A>
<A NAME="DOC.90.19"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void copy_feature(const <!1><A HREF="EST_String.html">EST_String</A> &amp;<!1><A HREF="EST_TVector.html#DOC.15.1.20.3">n</A>)</B></TT>
<DD>Copy named feature from the best path to related stream item
<DL><DT><DD></DL><P></DL>

<HR><DL><DT><B>This class has no child classes.</B></DL>

<DL><DT><DT><B>Author:</B><DD>Alan W Black (awb@cstr.ed.ac.uk): July 1996
<DD></DL><P><P><I><A HREF="index.html">Alphabetic index</A></I> <I><A HREF="HIER.html">HTML hierarchy of classes</A> or <A HREF="HIERjava.html">Java</A></I></P><HR>
<A HREF = "http://www.ed.ac.uk/">
   <IMG align=right BORDER=0 SRC = "edcrest.gif"></A>

<P Align=left><I>This page is part of the 
<A HREF="http://www.cstr.ed.ac.uk/projects/speech_tools.html">
Edinburgh Speech Tools Library</A> documentation
<br>
Copyright <A HREF="http://www.ed.ac.uk"> University of Edinburgh</A> 1997
<br>
Contact: <A HREF="mailto:speech_toolss@cstr.ed.ac.uk"> 
         speech_tools@cstr.ed.ac.uk </a>
</P>
<br clear=right>