edu.stanford.nlp.ie.pascal
Class TeXHyphenator
java.lang.Object
edu.stanford.nlp.ie.pascal.TeXHyphenator
public class TeXHyphenator
- extends java.lang.Object
Hyphenates words according to the TeX algorithm.
- Author:
- Jamie Nicolson (nicolson@cs.stanford.edu)
Method Summary |
boolean[] |
findBreakPoints(char[] lcphrase)
|
void |
load(java.io.BufferedReader input)
Loads custom hyphenation rules. |
void |
loadDefault()
Loads the default hyphenation rules in DefaultTeXHyphenator. |
static void |
main(java.lang.String[] args)
|
static java.lang.String |
toString(int[] i)
|
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(java.io.BufferedReader input)
throws java.io.IOException
- Loads custom hyphenation rules. You probably want to use
loadDefault() instead.
- Throws:
java.io.IOException
toString
public static java.lang.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(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception
Stanford NLP Group