edu.stanford.nlp.ie.pascal
Class TeXHyphenator

java.lang.Object
  extended by edu.stanford.nlp.ie.pascal.TeXHyphenator

public class TeXHyphenator
extends Object

Hyphenates words according to the TeX algorithm.

Author:
Jamie Nicolson (nicolson@cs.stanford.edu)

Constructor Summary
TeXHyphenator()
           
 
Method Summary
 boolean[] findBreakPoints(char[] lcphrase)
           
 void load(BufferedReader input)
          Loads custom hyphenation rules.
 void loadDefault()
          Loads the default hyphenation rules in DefaultTeXHyphenator.
static void main(String[] args)
           
static String toString(int[] i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TeXHyphenator

public TeXHyphenator()
Method Detail

loadDefault

public void loadDefault()
Loads the default hyphenation rules in DefaultTeXHyphenator.


load

public void load(BufferedReader input)
          throws IOException
Loads custom hyphenation rules. You probably want to use loadDefault() instead.

Throws:
IOException

toString

public static String toString(int[] i)

findBreakPoints

public boolean[] findBreakPoints(char[] lcphrase)
Parameters:
lcphrase - Some English text in lowercase.
Returns:
An array of booleans, one per character of the input, indicating whether it would be OK to insert a hyphen before that character.

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Stanford NLP Group