Sophie

Sophie

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

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_SCFG_Rule</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_SCFG.h:<TABLE BORDER=0><TR>
<TD VALIGN=TOP><H2>class  <A HREF="#DOC.DOCU">EST_SCFG_Rule</A></H2></TD></H2></TD></TR></TABLE>
<BLOCKQUOTE>A stochastic context free grammar rule.</BLOCKQUOTE>
<HR>

<DL>
<P><TABLE>
<DT><H3>Public Methods</H3><DD><TR>
<TD VALIGN=TOP><A HREF="#DOC.104.1"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_SCFG_Rule</B> ()<BR>
<I></I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.104.2"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_SCFG_Rule</B> (const <!1><A HREF="EST_SCFG_Rule.html#DOC.104.2">EST_SCFG_Rule</A> &amp;r)<BR>
<I></I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.104.3"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_SCFG_Rule</B> (double <!1><A HREF="EST_SCFG_Rule.html#DOC.104.5">prob</A>, int <!1><A HREF="XML_Parser.html#DOC.190.3.9">p</A>, int m)<BR>
<I>Create a unary rule</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.104.4"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A> </TD><TD><B>EST_SCFG_Rule</B> (double <!1><A HREF="EST_SCFG_Rule.html#DOC.104.5">prob</A>, int <!1><A HREF="XML_Parser.html#DOC.190.3.9">p</A>, int q, int r)<BR>
<I>Create a binary rule</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.104.5"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>double </TD><TD><B>prob</B> () const <BR>
<I>The rule's probability</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.104.6"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>set_prob</B> (double <!1><A HREF="XML_Parser.html#DOC.190.3.9">p</A>)<BR>
<I>set the probability</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.104.7"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>est_scfg_rtype </TD><TD><B>type</B> () const <BR>
<I>rule type</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.104.8"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>int </TD><TD><B>mother</B> () const <BR>
<I></I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.104.9"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>int </TD><TD><B>daughter1</B> () const <BR>
<I>In a unary rule this is a terminal, in a binary rule it  is a nonterminal</I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.104.10"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>int </TD><TD><B>daughter2</B> () const <BR>
<I></I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.104.11"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>set_rule</B> (double <!1><A HREF="EST_SCFG_Rule.html#DOC.104.5">prob</A>, int <!1><A HREF="XML_Parser.html#DOC.190.3.9">p</A>, int m)<BR>
<I></I>
</TD></TR><TR>
<TD VALIGN=TOP><A HREF="#DOC.104.12"><IMG ALT="[more]" BORDER=0 SRC=icon1.gif></A>void </TD><TD><B>set_rule</B> (double <!1><A HREF="EST_SCFG_Rule.html#DOC.104.5">prob</A>, int <!1><A HREF="XML_Parser.html#DOC.190.3.9">p</A>, int q, int r)<BR>
<I></I>
</TD></TR></TABLE></P>

</DL>

<A NAME="DOC.DOCU"></A>
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>A stochastic context free grammar rule.  

<P>At present only two types of rule are supported: 
<TT>est_scfg_binary_rule</TT> and <TT>est_scfg_unary_rule</TT>.
This is sufficient for the representation of grammars in 
Chomsky Normal Form.  Each rule also has a probability associated
with it.  Terminals and noterminals are represented as ints using
the <!1><A HREF="EST_Discrete.html">EST_Discrete</A>s in <!1><A HREF="EST_SCFG.html">EST_SCFG</A> to reference the actual
alphabets.

<P>Although this class includes a ``probability'' nothing in the rule
itself enforces it to be a true probability.  It is responsibility
of the classes that use this rule to enforce that condition if
desired.

<P></BLOCKQUOTE>
<DL>

<A NAME="EST_SCFG_Rule"></A>
<A NAME="DOC.104.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_SCFG_Rule()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="EST_SCFG_Rule"></A>
<A NAME="DOC.104.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_SCFG_Rule(const <!1><A HREF="EST_SCFG_Rule.html#DOC.104.2">EST_SCFG_Rule</A> &amp;r)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="EST_SCFG_Rule"></A>
<A NAME="DOC.104.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_SCFG_Rule(double <!1><A HREF="EST_SCFG_Rule.html#DOC.104.5">prob</A>, int <!1><A HREF="XML_Parser.html#DOC.190.3.9">p</A>, int m)</B></TT>
<DD>Create a unary rule
<DL><DT><DD></DL><P>
<A NAME="EST_SCFG_Rule"></A>
<A NAME="DOC.104.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> EST_SCFG_Rule(double <!1><A HREF="EST_SCFG_Rule.html#DOC.104.5">prob</A>, int <!1><A HREF="XML_Parser.html#DOC.190.3.9">p</A>, int q, int r)</B></TT>
<DD>Create a binary rule
<DL><DT><DD></DL><P>
<A NAME="prob"></A>
<A NAME="DOC.104.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>double prob() const </B></TT>
<DD>The rule's probability
<DL><DT><DD></DL><P>
<A NAME="set_prob"></A>
<A NAME="DOC.104.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void set_prob(double <!1><A HREF="XML_Parser.html#DOC.190.3.9">p</A>)</B></TT>
<DD>set the probability
<DL><DT><DD></DL><P>
<A NAME="type"></A>
<A NAME="DOC.104.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>est_scfg_rtype type() const </B></TT>
<DD>rule type
<DL><DT><DD></DL><P>
<A NAME="mother"></A>
<A NAME="DOC.104.8"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int mother() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="daughter1"></A>
<A NAME="DOC.104.9"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int daughter1() const </B></TT>
<DD>In a unary rule this is a terminal, in a binary rule it 
is a nonterminal
<DL><DT><DD></DL><P>
<A NAME="daughter2"></A>
<A NAME="DOC.104.10"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>int daughter2() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="set_rule"></A>
<A NAME="DOC.104.11"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void set_rule(double <!1><A HREF="EST_SCFG_Rule.html#DOC.104.5">prob</A>, int <!1><A HREF="XML_Parser.html#DOC.190.3.9">p</A>, int m)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="set_rule"></A>
<A NAME="DOC.104.12"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void set_rule(double <!1><A HREF="EST_SCFG_Rule.html#DOC.104.5">prob</A>, int <!1><A HREF="XML_Parser.html#DOC.190.3.9">p</A>, int q, int r)</B></TT>
<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): October 1997
<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>