1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
\r
5 <!-- Generated by javadoc (build 1.4.2_16) on Mon Mar 09 18:20:30 CET 2009 -->
\r
7 Lexicon (FreeTTS 1.2)
\r
10 <META NAME="keywords" CONTENT="com.sun.speech.freetts.lexicon.Lexicon interface">
\r
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
\r
14 <SCRIPT type="text/javascript">
\r
15 function windowTitle()
\r
17 parent.document.title="Lexicon (FreeTTS 1.2)";
\r
23 <BODY BGCOLOR="white" onload="windowTitle();">
\r
26 <!-- ========= START OF TOP NAVBAR ======= -->
\r
27 <A NAME="navbar_top"><!-- --></A>
28 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
29 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
\r
31 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
\r
32 <A NAME="navbar_top_firstrow"><!-- --></A>
33 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
\r
34 <TR ALIGN="center" VALIGN="top">
\r
35 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
\r
36 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
\r
37 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
\r
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
\r
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
\r
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
\r
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
\r
45 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
\r
51 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
52 <A HREF="../../../../../com/sun/speech/freetts/lexicon/LetterToSound.html" title="interface in com.sun.speech.freetts.lexicon"><B>PREV CLASS</B></A>
\r
53 NEXT CLASS</FONT></TD>
\r
54 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
55 <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>
\r
56 <A HREF="Lexicon.html" target="_top"><B>NO FRAMES</B></A>
\r
57 <SCRIPT type="text/javascript">
\r
60 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
\r
65 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
\r
71 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
72 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
\r
73 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
74 DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
\r
77 <A NAME="skip-navbar_top"></A>
78 <!-- ========= END OF TOP NAVBAR ========= -->
\r
81 <!-- ======== START OF CLASS DATA ======== -->
\r
84 com.sun.speech.freetts.lexicon</FONT>
\r
86 Interface Lexicon</H2>
\r
88 <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../../com/sun/speech/freetts/lexicon/LexiconImpl.html" title="class in com.sun.speech.freetts.lexicon">LexiconImpl</A></DD>
\r
92 <DT>public interface <B>Lexicon</B></DL>
\r
95 Provides the phone list for words. A Lexicon is composed of three
96 pieces: an addenda, the compiled form, and the letter to sound
99 <li>The addenda either contains Word instances that are not in
100 the compiled form, or it contains Word instances that replace
101 definitions in the compiled form. The addenda is meant to be
102 relatively small (e.g., 10's of words).
103 <li>The compiled form is meant to hold a large number of words
104 (e.g., 10's of thousands of words) and provide a very efficient
105 means for finding those words.
106 <li>The letter to sound rules will attempt to find a definition for
107 a word not found in either the addenda or compiled form.
115 <!-- ======== NESTED CLASS SUMMARY ======== -->
\r
118 <!-- =========== FIELD SUMMARY =========== -->
\r
121 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
\r
124 <!-- ========== METHOD SUMMARY =========== -->
\r
126 <A NAME="method_summary"><!-- --></A>
127 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
128 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
129 <TD COLSPAN=2><FONT SIZE="+2">
\r
130 <B>Method Summary</B></FONT></TD>
\r
132 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
133 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
134 <CODE> void</CODE></FONT></TD>
\r
135 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/lexicon/Lexicon.html#addAddendum(java.lang.String, java.lang.String, java.lang.String[])">addAddendum</A></B>(java.lang.String word,
136 java.lang.String partOfSpeech,
137 java.lang.String[] phones)</CODE>
\r
140 Adds a word to the addenda. </TD>
\r
142 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
143 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
144 <CODE> java.lang.String[]</CODE></FONT></TD>
\r
145 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/lexicon/Lexicon.html#getPhones(java.lang.String, java.lang.String)">getPhones</A></B>(java.lang.String word,
146 java.lang.String partOfSpeech)</CODE>
\r
149 Gets the phone list for a given word. </TD>
\r
151 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
152 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
153 <CODE> java.lang.String[]</CODE></FONT></TD>
\r
154 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/lexicon/Lexicon.html#getPhones(java.lang.String, java.lang.String, boolean)">getPhones</A></B>(java.lang.String word,
155 java.lang.String partOfSpeech,
156 boolean useLTS)</CODE>
\r
159 Gets the phone list for a given word. </TD>
\r
161 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
162 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
163 <CODE> boolean</CODE></FONT></TD>
\r
164 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/lexicon/Lexicon.html#isLoaded()">isLoaded</A></B>()</CODE>
\r
167 Determines if this lexicon is loaded.</TD>
\r
169 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
170 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
171 <CODE> boolean</CODE></FONT></TD>
\r
172 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/lexicon/Lexicon.html#isSyllableBoundary(java.util.List, java.lang.String[], int)">isSyllableBoundary</A></B>(java.util.List syllablePhones,
173 java.lang.String[] wordPhones,
174 int currentWordPhone)</CODE>
\r
177 Determines if the <code>currentWordPhone</code> represents a
178 new syllable boundary.</TD>
\r
180 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
181 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
182 <CODE> void</CODE></FONT></TD>
\r
183 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/lexicon/Lexicon.html#load()">load</A></B>()</CODE>
\r
186 Loads this lexicon. </TD>
\r
188 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
189 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
190 <CODE> void</CODE></FONT></TD>
\r
191 <TD><CODE><B><A HREF="../../../../../com/sun/speech/freetts/lexicon/Lexicon.html#removeAddendum(java.lang.String, java.lang.String)">removeAddendum</A></B>(java.lang.String word,
192 java.lang.String partOfSpeech)</CODE>
\r
195 Removes a word from the addenda. </TD>
\r
201 <!-- ============ FIELD DETAIL =========== -->
\r
204 <!-- ========= CONSTRUCTOR DETAIL ======== -->
\r
207 <!-- ============ METHOD DETAIL ========== -->
\r
209 <A NAME="method_detail"><!-- --></A>
210 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
211 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
212 <TD COLSPAN=1><FONT SIZE="+2">
\r
213 <B>Method Detail</B></FONT></TD>
\r
217 <A NAME="getPhones(java.lang.String, java.lang.String)"><!-- --></A><H3>
\r
220 public java.lang.String[] <B>getPhones</B>(java.lang.String word,
221 java.lang.String partOfSpeech)</PRE>
\r
223 <DD>Gets the phone list for a given word. If a phone list cannot
224 be found, <code>null</code> is returned. The
225 <code>partOfSpeech</code> is implementation dependent, but
226 <code>null</code> always matches.
\r
229 <DT><B>Parameters:</B><DD><CODE>word</CODE> - the word to find<DD><CODE>partOfSpeech</CODE> - the part of speech or <code>null</code>
230 <DT><B>Returns:</B><DD>the list of phones for word or null</DL>
\r
235 <A NAME="getPhones(java.lang.String, java.lang.String, boolean)"><!-- --></A><H3>
\r
238 public java.lang.String[] <B>getPhones</B>(java.lang.String word,
239 java.lang.String partOfSpeech,
240 boolean useLTS)</PRE>
\r
242 <DD>Gets the phone list for a given word. If a phone list cannot
243 be found, <code>null</code> is returned. The
244 <code>partOfSpeech</code> is implementation dependent, but
245 <code>null</code> always matches.
\r
248 <DT><B>Parameters:</B><DD><CODE>word</CODE> - the word to find<DD><CODE>partOfSpeech</CODE> - the part of speech or <code>null</code><DD><CODE>useLTS</CODE> - whether to use the letter-to-sound rules when
249 the word is not in the lexicon.
250 <DT><B>Returns:</B><DD>the list of phones for word or null</DL>
\r
255 <A NAME="addAddendum(java.lang.String, java.lang.String, java.lang.String[])"><!-- --></A><H3>
\r
258 public void <B>addAddendum</B>(java.lang.String word,
259 java.lang.String partOfSpeech,
260 java.lang.String[] phones)</PRE>
\r
262 <DD>Adds a word to the addenda. The
263 part of speech is implementation dependent.
\r
266 <DT><B>Parameters:</B><DD><CODE>word</CODE> - the word to add<DD><CODE>partOfSpeech</CODE> - the part of speech or <code>null</code></DL>
\r
271 <A NAME="removeAddendum(java.lang.String, java.lang.String)"><!-- --></A><H3>
\r
272 removeAddendum</H3>
\r
274 public void <B>removeAddendum</B>(java.lang.String word,
275 java.lang.String partOfSpeech)</PRE>
\r
277 <DD>Removes a word from the addenda. Both the part of speech and
278 word must be an exact match.
\r
281 <DT><B>Parameters:</B><DD><CODE>word</CODE> - the word to add<DD><CODE>partOfSpeech</CODE> - the part of speech</DL>
\r
286 <A NAME="isSyllableBoundary(java.util.List, java.lang.String[], int)"><!-- --></A><H3>
\r
287 isSyllableBoundary</H3>
\r
289 public boolean <B>isSyllableBoundary</B>(java.util.List syllablePhones,
290 java.lang.String[] wordPhones,
291 int currentWordPhone)</PRE>
\r
293 <DD>Determines if the <code>currentWordPhone</code> represents a
294 new syllable boundary.
\r
297 <DT><B>Parameters:</B><DD><CODE>syllablePhones</CODE> - the phones in the current syllable so far<DD><CODE>wordPhones</CODE> - the phones for the whole word<DD><CODE>currentWordPhone</CODE> - the word phone in question
298 <DT><B>Returns:</B><DD><code>true</code> if the phone is a new boundary</DL>
\r
303 <A NAME="load()"><!-- --></A><H3>
\r
306 public void <B>load</B>()
307 throws java.io.IOException</PRE>
\r
309 <DD>Loads this lexicon. The loading of a lexicon need not be done
310 in the constructor.
\r
315 <DD><CODE>java.io.IOException</CODE> - if an error occurs while loading</DL>
\r
320 <A NAME="isLoaded()"><!-- --></A><H3>
\r
323 public boolean <B>isLoaded</B>()</PRE>
\r
325 <DD>Determines if this lexicon is loaded.
\r
329 <DT><B>Returns:</B><DD><code>true</code> if the lexicon is loaded</DL>
\r
332 <!-- ========= END OF CLASS DATA ========= -->
\r
336 <!-- ======= START OF BOTTOM NAVBAR ====== -->
\r
337 <A NAME="navbar_bottom"><!-- --></A>
338 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
339 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
\r
341 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
\r
342 <A NAME="navbar_bottom_firstrow"><!-- --></A>
343 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
\r
344 <TR ALIGN="center" VALIGN="top">
\r
345 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
\r
346 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
\r
347 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
\r
348 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
\r
349 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
\r
350 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
\r
351 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
\r
355 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
\r
361 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
362 <A HREF="../../../../../com/sun/speech/freetts/lexicon/LetterToSound.html" title="interface in com.sun.speech.freetts.lexicon"><B>PREV CLASS</B></A>
\r
363 NEXT CLASS</FONT></TD>
\r
364 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
365 <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>
\r
366 <A HREF="Lexicon.html" target="_top"><B>NO FRAMES</B></A>
\r
367 <SCRIPT type="text/javascript">
\r
370 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
\r
375 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
\r
381 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
382 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
\r
383 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
384 DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
\r
387 <A NAME="skip-navbar_bottom"></A>
388 <!-- ======== END OF BOTTOM NAVBAR ======= -->
\r