SourceForge.net Logo
aXSL API 0.1

org.axsl.hyphenR
Interface HyphenationServer


public interface HyphenationServer

The main entry point to the hyphenation package. Provides methods for finding the start and size of a word in a text sequence, and for creating hyphenation information for a word.


Method Summary
 Hyphenation hyphenate(char[] word, int offset, int len, java.lang.String language, java.lang.String country, int remainCount, int pushCount, boolean includeInhibitors)
          Hyphenate a word.
 Hyphenation hyphenate(java.lang.CharSequence word, int offset, int len, java.lang.String language, java.lang.String country, int remainCount, int pushCount, boolean includeInhibitors)
          Hyphenate a word.
 Hyphenation hyphenate(int[] word, int offset, int len, java.lang.String language, java.lang.String country, int remainCount, int pushCount, boolean includeInhibitors)
          Hyphenate a word.
 int wordSize(char[] characters, int startIndex, java.lang.String language, java.lang.String country)
          Finds the size of a word in the text being evaluated.
 int wordSize(java.lang.CharSequence characters, int startIndex, java.lang.String language, java.lang.String country)
          Finds the size of a word in the text being evaluated.
 int wordSize(int[] characters, int startIndex, java.lang.String language, java.lang.String country)
          Finds the size of a word in the text being evaluated.
 int wordStarts(char[] characters, int startIndex, java.lang.String language, java.lang.String country)
          Finds the start of a word in the text being evaluated.
 int wordStarts(java.lang.CharSequence characters, int startIndex, java.lang.String language, java.lang.String country)
          Finds the start of a word in the text being evaluated.
 int wordStarts(int[] characters, int startIndex, java.lang.String language, java.lang.String country)
          Finds the start of a word in the text being evaluated.
 

Method Detail

hyphenate

public Hyphenation hyphenate(java.lang.CharSequence word,
                             int offset,
                             int len,
                             java.lang.String language,
                             java.lang.String country,
                             int remainCount,
                             int pushCount,
                             boolean includeInhibitors)
Hyphenate a word.

Parameters:
word - The sequence of text to be evaluated.
offset - The index to the first character in word that is part of the word.
len - The length of the word.
language - The language to be used for purpose of finding hyphenation points.
country - The country to be used for purpose of finding hyphenation points.
remainCount - The minimum number of characters that must be left before any hyphenation point. Otherwise valid hyphenation points that would result in fewer characters before the hyphen should be excluded from the output. (Note that potentially useful data is lost by specifying a value here. Client applications may wish to pass zero here and evaluate the returned results manually.)
pushCount - The minimum number of characters that must be left after any hyphenation point. Otherwise valid hyphenation points that would result in fewer character after the hyphen should be excluded from the output. (Note that potentially useful data is lost by specifying a value here. Client applications may wish to pass zero here and evaluate the returned results manually.)
includeInhibitors - True if negative hyphenation points (even values in the Liang notation) should be included in the output.
Returns:
A Hyphenation instance containing the hyphenation points for the word, or null if no hyphenation points were found.
See Also:
hyphenate(char[], int, int, String, String, int, int, boolean), hyphenate(int[], int, int, String, String, int, int, boolean)

hyphenate

public Hyphenation hyphenate(char[] word,
                             int offset,
                             int len,
                             java.lang.String language,
                             java.lang.String country,
                             int remainCount,
                             int pushCount,
                             boolean includeInhibitors)
Hyphenate a word. This is an overloaded version of hyphenate(CharSequence, int, int, String, String, int, int, boolean) that takes a char[] instead of CharSequence for input.

Parameters:
word - The sequence of text to be evaluated.
offset - The index to the first character in word that is part of the word.
len - The length of the word.
language - The language to be used for purpose of finding hyphenation points.
country - The country to be used for purpose of finding hyphenation points.
remainCount - The minimum number of characters that must be left before any hyphenation point. Otherwise valid hyphenation points that would result in fewer characters before the hyphen should be excluded from the output. (Note that potentially useful data is lost by specifying a value here. Client applications may wish to pass zero here and evaluate the returned results manually.)
pushCount - The minimum number of characters that must be left after any hyphenation point. Otherwise valid hyphenation points that would result in fewer character after the hyphen should be excluded from the output. (Note that potentially useful data is lost by specifying a value here. Client applications may wish to pass zero here and evaluate the returned results manually.)
includeInhibitors - True if negative hyphenation points (even values in the Liang notation) should be included in the output.
Returns:
A Hyphenation instance containing the hyphenation points for the word, or null if no hyphenation points were found.
See Also:
hyphenate(CharSequence, int, int, String, String, int, int, boolean), hyphenate(int[], int, int, String, String, int, int, boolean)

hyphenate

public Hyphenation hyphenate(int[] word,
                             int offset,
                             int len,
                             java.lang.String language,
                             java.lang.String country,
                             int remainCount,
                             int pushCount,
                             boolean includeInhibitors)
Hyphenate a word. This is an overloaded version of hyphenate(CharSequence, int, int, String, String, int, int, boolean) that takes an array of Unicode code points instead of CharSequence for input.

Parameters:
word - The sequence of text to be evaluated.
offset - The index to the first character in word that is part of the word.
len - The length of the word.
language - The language to be used for purpose of finding hyphenation points.
country - The country to be used for purpose of finding hyphenation points.
remainCount - The minimum number of characters that must be left before any hyphenation point. Otherwise valid hyphenation points that would result in fewer characters before the hyphen should be excluded from the output. (Note that potentially useful data is lost by specifying a value here. Client applications may wish to pass zero here and evaluate the returned results manually.)
pushCount - The minimum number of characters that must be left after any hyphenation point. Otherwise valid hyphenation points that would result in fewer character after the hyphen should be excluded from the output. (Note that potentially useful data is lost by specifying a value here. Client applications may wish to pass zero here and evaluate the returned results manually.)
includeInhibitors - True if negative hyphenation points (even values in the Liang notation) should be included in the output.
Returns:
A Hyphenation instance containing the hyphenation points for the word, or null if no hyphenation points were found.
See Also:
hyphenate(CharSequence, int, int, String, String, int, int, boolean), hyphenate(char[], int, int, String, String, int, int, boolean)

wordStarts

public int wordStarts(java.lang.CharSequence characters,
                      int startIndex,
                      java.lang.String language,
                      java.lang.String country)
Finds the start of a word in the text being evaluated. Characters like " and ' which are not really part of the word, but which must be passed through to the output, should be skipped.

Parameters:
characters - The input being evaluated.
startIndex - Index into the first character in characters that should be evaluated. Characters at indexes before this will not be considered.
language - The language code to be used when evaluating characters to skip. Passing null is permitted. Implementations are not required to do anything with this information.
country - The country code to be used when evaluating characters to skip. Passing null is permitted. Implementations are not required to do anything with this information.
Returns:
The index to the start of the first word found, or -1 if no word was found.
See Also:
wordStarts(char[], int, String, String), wordStarts(int[], int, String, String)

wordStarts

public int wordStarts(char[] characters,
                      int startIndex,
                      java.lang.String language,
                      java.lang.String country)
Finds the start of a word in the text being evaluated. This is an overloaded version of wordStarts(CharSequence, int, String, String) that takes a char[] instead of a CharSequence for input.

Parameters:
characters - The input being evaluated.
startIndex - Index into the first character in characters that should be evaluated. Characters at indexes before this will not be considered.
language - The language code to be used when evaluating characters to skip. Passing null is permitted. Implementations are not required to do anything with this information.
country - The country code to be used when evaluating characters to skip. Passing null is permitted. Implementations are not required to do anything with this information.
Returns:
The index to the start of the first word found, or -1 if no word was found.
See Also:
wordStarts(CharSequence, int, String, String), wordStarts(int[], int, String, String)

wordStarts

public int wordStarts(int[] characters,
                      int startIndex,
                      java.lang.String language,
                      java.lang.String country)
Finds the start of a word in the text being evaluated. This is an overloaded version of wordStarts(CharSequence, int, String, String) that takes an array of Unicode codepoints instead of a CharSequence for input.

Parameters:
characters - The input being evaluated.
startIndex - Index into the first character in characters that should be evaluated. Characters at indexes before this will not be considered.
language - The language code to be used when evaluating characters to skip. Passing null is permitted. Implementations are not required to do anything with this information.
country - The country code to be used when evaluating characters to skip. Passing null is permitted. Implementations are not required to do anything with this information.
Returns:
The index to the start of the first word found, or -1 if no word was found.
See Also:
wordStarts(CharSequence, int, String, String), wordStarts(char[], int, String, String)

wordSize

public int wordSize(java.lang.CharSequence characters,
                    int startIndex,
                    java.lang.String language,
                    java.lang.String country)
Finds the size of a word in the text being evaluated.

Parameters:
characters - The input being evaluated.
startIndex - Index into the first character in characters that should be evaluated. Characters at indexes before this will not be considered.
language - The language code to be used when evaluating where the end of the word lies. Passing null is permitted. Implementations are not required to do anything with this information.
country - The country code to be used when evaluating where the end of the word lies. Passing null is permitted. Implementations are not required to do anything with this information.
Returns:
The size of the word.
See Also:
wordSize(char[], int, String, String), wordSize(int[], int, String, String)

wordSize

public int wordSize(char[] characters,
                    int startIndex,
                    java.lang.String language,
                    java.lang.String country)
Finds the size of a word in the text being evaluated. Overloaded version of wordSize(CharSequence, int, String, String) that takes a char[] instead of a CharSequence for input.

Parameters:
characters - The input being evaluated.
startIndex - Index into the first character in characters that should be evaluated. Characters at indexes before this will not be considered.
language - The language code to be used when evaluating where the end of the word lies. Passing null is permitted. Implementations are not required to do anything with this information.
country - The country code to be used when evaluating where the end of the word lies. Passing null is permitted. Implementations are not required to do anything with this information.
Returns:
The size of the word.
See Also:
wordSize(CharSequence, int, String, String), wordSize(int[], int, String, String)

wordSize

public int wordSize(int[] characters,
                    int startIndex,
                    java.lang.String language,
                    java.lang.String country)
Finds the size of a word in the text being evaluated. Overloaded version of wordSize(CharSequence, int, String, String) that takes an array of Unicode codepoints instead of a CharSequence for input.

Parameters:
characters - The input being evaluated.
startIndex - Index into the first character in characters that should be evaluated. Characters at indexes before this will not be considered.
language - The language code to be used when evaluating where the end of the word lies. Passing null is permitted. Implementations are not required to do anything with this information.
country - The country code to be used when evaluating where the end of the word lies. Passing null is permitted. Implementations are not required to do anything with this information.
Returns:
The size of the word.
See Also:
wordSize(CharSequence, int, String, String), wordSize(char[], int, String, String)

SourceForge.net Logo
aXSL API 0.1

This documentation was created September 6 2006 by The aXSL Group and may be freely copied. See license for details.