HyphenationTree
This tree structure stores the hyphenation patterns in an efficient way for fast lookup. It provides the provides the method to hyphenate a word.
This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified.
Functions
Add a character class to the tree. It is used by {@link PatternParser} 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.
Add an exception to the tree. It is used by {@link PatternParser PatternParser} class as callback to store the hyphenation exceptions.
Add a pattern to the tree. Mainly, to be used by {@link PatternParser PatternParser} class as callback to add a pattern to the tree.
Read hyphenation patterns from an XML file.