public class EnglishContractionExpander extends AbstractContractionExpander implements ContractionExpander
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
contractedSpellingsFileName
Path to list of contracted spellings.
|
protected WordTokenizer |
contractionTokenizer
Contraction tokenizer.
|
contractedSpellings, logger
Constructor and Description |
---|
EnglishContractionExpander()
Create an English contraction expander.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
expandContraction(java.lang.String spelling)
Returns an expanded spelling for a contracted spelling.
|
getLogger, loadContractedSpellings, setLogger
close
protected static java.lang.String contractedSpellingsFileName
The contracted spellings file contains pairs of contracted forms and expanded forms separated by a tab character. Each line of the file contains one pair.
protected WordTokenizer contractionTokenizer
public EnglishContractionExpander()
public java.lang.String expandContraction(java.lang.String spelling)
expandContraction
in interface ContractionExpander
expandContraction
in class AbstractContractionExpander
spelling
- The spelling.