⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hyphenationtree.html

📁 IText PDF开发工具说明文档,使用很方便。
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<A NAME="hstrcmp(char[], int, char[], int)"><!-- --></A><H3>hstrcmp</H3><PRE>protected int <B>hstrcmp</B>(char[]&nbsp;s,                      int&nbsp;si,                      char[]&nbsp;t,                      int&nbsp;ti)</PRE><DL><DD>String compare, returns 0 if equal or t is a substring of s<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getValues(int)"><!-- --></A><H3>getValues</H3><PRE>protected byte[] <B>getValues</B>(int&nbsp;k)</PRE><DL><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="searchPatterns(char[], int, byte[])"><!-- --></A><H3>searchPatterns</H3><PRE>protected void <B>searchPatterns</B>(char[]&nbsp;word,                              int&nbsp;index,                              byte[]&nbsp;il)</PRE><DL><DD><p>Search for all possible partial matches of word starting at index an update interletter values. In other words, it does something like:</p> <code> for(i=0; i<patterns.length; i++) { if ( word.substring(index).startsWidth(patterns[i]) ) update_interletter_values(patterns[i]); } </code> <p>But it is done in an efficient way since the patterns are stored in a ternary tree. In fact, this is the whole purpose of having the tree: doing this search without having to test every single pattern. The number of patterns for languages such as English range from 4000 to 10000. Thus, doing thousands of string comparisons for each word to hyphenate would be really slow without the tree. The tradeoff is memory, but using a ternary tree instead of a trie, almost halves the the memory used by Lout or TeX. It's also faster than using a hash table</p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>word</CODE> - null terminated word to match<DD><CODE>index</CODE> - start index from word<DD><CODE>il</CODE> - interletter values array to update</DL></DD></DL><HR><A NAME="hyphenate(java.lang.String, int, int)"><!-- --></A><H3>hyphenate</H3><PRE>public <A HREF="../../../../../com/lowagie/text/pdf/hyphenation/Hyphenation.html" title="class in com.lowagie.text.pdf.hyphenation">Hyphenation</A> <B>hyphenate</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;word,                             int&nbsp;remainCharCount,                             int&nbsp;pushCharCount)</PRE><DL><DD>Hyphenate word and return a Hyphenation object.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>word</CODE> - the word to be hyphenated<DD><CODE>remainCharCount</CODE> - Minimum number of characters allowed before the hyphenation point.<DD><CODE>pushCharCount</CODE> - Minimum number of characters allowed after the hyphenation point.<DT><B>Returns:</B><DD>a <A HREF="../../../../../com/lowagie/text/pdf/hyphenation/Hyphenation.html" title="class in com.lowagie.text.pdf.hyphenation"><CODE>Hyphenation</CODE></A> object representing the hyphenated word or null if word is not hyphenated.</DL></DD></DL><HR><A NAME="hyphenate(char[], int, int, int, int)"><!-- --></A><H3>hyphenate</H3><PRE>public <A HREF="../../../../../com/lowagie/text/pdf/hyphenation/Hyphenation.html" title="class in com.lowagie.text.pdf.hyphenation">Hyphenation</A> <B>hyphenate</B>(char[]&nbsp;w,                             int&nbsp;offset,                             int&nbsp;len,                             int&nbsp;remainCharCount,                             int&nbsp;pushCharCount)</PRE><DL><DD>Hyphenate word and return an array of hyphenation points.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>w</CODE> - char array that contains the word<DD><CODE>offset</CODE> - Offset to first character in word<DD><CODE>len</CODE> - Length of word<DD><CODE>remainCharCount</CODE> - Minimum number of characters allowed before the hyphenation point.<DD><CODE>pushCharCount</CODE> - Minimum number of characters allowed after the hyphenation point.<DT><B>Returns:</B><DD>a <A HREF="../../../../../com/lowagie/text/pdf/hyphenation/Hyphenation.html" title="class in com.lowagie.text.pdf.hyphenation"><CODE>Hyphenation</CODE></A> object representing the hyphenated word or null if word is not hyphenated.</DL></DD></DL><HR><A NAME="addClass(java.lang.String)"><!-- --></A><H3>addClass</H3><PRE>public void <B>addClass</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;chargroup)</PRE><DL><DD>Add a character class to the tree. It is used by <A HREF="../../../../../com/lowagie/text/pdf/hyphenation/SimplePatternParser.html" title="class in com.lowagie.text.pdf.hyphenation"><CODE>SimplePatternParser</CODE></A> as callback to add character classes. Character classes define the valid word characters for hyphenation. If a word contains a character not defined in any of the classes, it is not hyphenated. It also defines a way to normalize the characters in order to compare them with the stored patterns. Usually pattern files use only lower case characters, in this case a class for letter 'a', for example, should be defined as "aA", the first character being the normalization char.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/lowagie/text/pdf/hyphenation/PatternConsumer.html#addClass(java.lang.String)">addClass</A></CODE> in interface <CODE><A HREF="../../../../../com/lowagie/text/pdf/hyphenation/PatternConsumer.html" title="interface in com.lowagie.text.pdf.hyphenation">PatternConsumer</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>chargroup</CODE> - character group</DL></DD></DL><HR><A NAME="addException(java.lang.String, java.util.ArrayList)"><!-- --></A><H3>addException</H3><PRE>public void <B>addException</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;word,                         <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/ArrayList.html?is-external=true" title="class or interface in java.util">ArrayList</A>&nbsp;hyphenatedword)</PRE><DL><DD>Add an exception to the tree. It is used by <A HREF="../../../../../com/lowagie/text/pdf/hyphenation/SimplePatternParser.html" title="class in com.lowagie.text.pdf.hyphenation"><CODE>SimplePatternParser</CODE></A> class as callback to store the hyphenation exceptions.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/lowagie/text/pdf/hyphenation/PatternConsumer.html#addException(java.lang.String, java.util.ArrayList)">addException</A></CODE> in interface <CODE><A HREF="../../../../../com/lowagie/text/pdf/hyphenation/PatternConsumer.html" title="interface in com.lowagie.text.pdf.hyphenation">PatternConsumer</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>word</CODE> - normalized word<DD><CODE>hyphenatedword</CODE> - a vector of alternating strings and <A HREF="../../../../../com/lowagie/text/pdf/hyphenation/Hyphen.html" title="class in com.lowagie.text.pdf.hyphenation"><CODE>hyphen</CODE></A> objects.</DL></DD></DL><HR><A NAME="addPattern(java.lang.String, java.lang.String)"><!-- --></A><H3>addPattern</H3><PRE>public void <B>addPattern</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;pattern,                       <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;ivalue)</PRE><DL><DD>Add a pattern to the tree. Mainly, to be used by <A HREF="../../../../../com/lowagie/text/pdf/hyphenation/SimplePatternParser.html" title="class in com.lowagie.text.pdf.hyphenation"><CODE>SimplePatternParser</CODE></A> class as callback to add a pattern to the tree.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../com/lowagie/text/pdf/hyphenation/PatternConsumer.html#addPattern(java.lang.String, java.lang.String)">addPattern</A></CODE> in interface <CODE><A HREF="../../../../../com/lowagie/text/pdf/hyphenation/PatternConsumer.html" title="interface in com.lowagie.text.pdf.hyphenation">PatternConsumer</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pattern</CODE> - the hyphenation pattern<DD><CODE>ivalue</CODE> - interletter weight values indicating the desirability and priority of hyphenating at a given point within the pattern. It should contain only digit characters. (i.e. '0' to '9').</DL></DD></DL><HR><A NAME="printStats()"><!-- --></A><H3>printStats</H3><PRE>public void <B>printStats</B>()</PRE><DL><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../com/lowagie/text/pdf/hyphenation/TernaryTree.html#printStats()">printStats</A></CODE> in class <CODE><A HREF="../../../../../com/lowagie/text/pdf/hyphenation/TernaryTree.html" title="class in com.lowagie.text.pdf.hyphenation">TernaryTree</A></CODE></DL></DD><DD><DL></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>Hosted by <a href="http://www.hostbasket.com/">Hostbasket</a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../../com/lowagie/text/pdf/hyphenation/HyphenationException.html" title="class in com.lowagie.text.pdf.hyphenation"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../../com/lowagie/text/pdf/hyphenation/Hyphenator.html" title="class in com.lowagie.text.pdf.hyphenation"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../../index.html?com/lowagie/text/pdf/hyphenation/HyphenationTree.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="HyphenationTree.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;<A HREF="#nested_classes_inherited_from_class_com.lowagie.text.pdf.hyphenation.TernaryTree">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -