au.id.pbw.hyfo.hyph
Class HyphenatorDisplay

java.lang.Object
  extended by au.id.pbw.hyfo.hyph.HyphenatorDisplay

public class HyphenatorDisplay
extends Object

Static methods to display hyphenations from instances of HyphenatedWord. This class is designed as a testing mechanism.

Author:
pbw

Method Summary
static String show_string_breakpoints(HyphenatedWord hyphenator)
          Gets a string representing possible hyphenation breaks.
static String show_string_hyphens(HyphenatedWord hyphenator)
          Gets a string representing possible hyphenation breaks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

show_string_breakpoints

public static String show_string_breakpoints(HyphenatedWord hyphenator)
Gets a string representing possible hyphenation breaks. If simple hyphenation break occur in the word, their positions in the original word will be marked with a the weight digit of the break point. If no complex (re-spelling) hyphenation points occur in the word, the output will contain only this string.

If complex (re-spelling) hyphenation breaks occur, the replacment text will be displayed, with the break point marked by weight digit of the break point. If the word includes simple hyphenation points, the output string will contain the results of simple hyphenation replacement, concatenated with a slash ('/') and the results of the complex hyphenation. If not, the result string will contain only the results of complex hyphenation replacement.

Note that if the text being replaced after a complex break contains another complex breakpoint, that point will not be displayed.

Parameters:
hyphenator - the HyphenatedWord holding the hyphenatation data for a word_string.
Returns:
a string containing the characters of the orig_word, with single odd digits representing possible hyphenation points.

show_string_hyphens

public static String show_string_hyphens(HyphenatedWord hyphenator)
Gets a string representing possible hyphenation breaks. If simple hyphenation break occur in the word, their positions in the original word will be marked with a hyphen. If no complex (re-spelling) hyphenation points occur in the word, the output will contain only this string.

If complex (re-spelling) hyphenation breaks occur, the replacment text will be displayed, with the break point marked by a hyphen. If the word includes simple hyphenation points, the output string will contain the results of simple hyphenation replacement, concatenated with a slash ('/') and the results of the complex hyphenation. If not, the result string will contain only the results of complex hyphenation replacement.

Note that if the text being replaced after a complex break contains another complex breakpoint, that point will not be displayed.

Parameters:
hyphenator - the HyphenatedWord holding the hyphenatation data for a word.
Returns:
a string containing the characters of the orig_word, with hyphens representing possible hyphenation points.


Copyright © 2005-2006 Peter B. West.