public class BaseHyphenator extends java.lang.Object implements Hyphenator
Modifier and Type | Field and Description |
---|---|
protected net.davidashen.text.Hyphenator |
texHyphenator
The internal TeX-based hyphenator.
|
protected static java.lang.String |
ukhyphenPath
UK Base hyphenation rules in TeX format.
|
protected static java.lang.String |
ushyphenPath
US Base hyphenation rules in TeX format.
|
Constructor and Description |
---|
BaseHyphenator()
Create a base hyphenator using UK English rules.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
hyphenate(java.lang.String word)
Add hyphenation points to a single Base word.
|
void |
loadHyphenationRules(java.io.InputStream hyphenRulesStream)
Load TeX format hyphenation rules from a stream.
|
void |
loadHyphenationRules(java.lang.String hyphenRulesFileName)
Load TeX format hyphenation rules from a file.
|
protected static java.lang.String ukhyphenPath
protected static java.lang.String ushyphenPath
protected net.davidashen.text.Hyphenator texHyphenator
public BaseHyphenator()
public void loadHyphenationRules(java.io.InputStream hyphenRulesStream) throws java.lang.Exception
hyphenRulesStream
- Stream with TeX format hyphenation rules.java.lang.Exception
public void loadHyphenationRules(java.lang.String hyphenRulesFileName) throws java.lang.Exception
hyphenRulesFileName
- File with TeX format hyphenation rules.java.lang.Exception
public java.lang.String hyphenate(java.lang.String word)
hyphenate
in interface Hyphenator
word
- The word to hyphenate.