Class Hyphenator

java.lang.Object
  extended byHyphenator

public class Hyphenator
extends java.lang.Object

A Hyphenator object hyphenates a given word based on a Tex Pattern file. The algorithm used is based on F.Liang. It is described in the TeXBook, Appendix H.


Constructor Summary
Hyphenator()
          Create an instance of Hyphenator.
 
Method Summary
 java.util.HashMap getPatternHash()
          Get patterns of this Hyphenator instance.
 java.lang.String getVowels()
          Return the String of German vowels that this instance uses.
 java.util.ArrayList hyphenate(java.lang.String s)
           
 void hyphenate(YaspWord word)
          The heart of the algorithm.
 void setPatternHash(java.util.HashMap hash)
          Set patterns that are necessary for hyphenation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hyphenator

public Hyphenator()
Create an instance of Hyphenator.

Method Detail

setPatternHash

public void setPatternHash(java.util.HashMap hash)
Set patterns that are necessary for hyphenation. Form of patterns: abc => {-1,1,2,4} with meaning 1abc4.

Parameters:
hash - HashMap containing patterns as described.

getPatternHash

public java.util.HashMap getPatternHash()
Get patterns of this Hyphenator instance.


getVowels

public java.lang.String getVowels()
Return the String of German vowels that this instance uses.


hyphenate

public java.util.ArrayList hyphenate(java.lang.String s)

hyphenate

public void hyphenate(YaspWord word)
The heart of the algorithm.

Parameters:
word - a YaspWord