edu.stanford.nlp.ie.pascal
Class TeXHyphenator
java.lang.Object
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)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TeXHyphenator
public TeXHyphenator()
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