public class ERXGoogleSpell extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ERXGoogleSpell.Correction
Correction encapsulates a suggested spelling correction for a word in a string of text.
|
static class |
ERXGoogleSpell.CorrectionException
CorrectionException is thrown if anything fails during the correction process.
|
Constructor and Description |
---|
ERXGoogleSpell() |
Modifier and Type | Method and Description |
---|---|
static String |
correct(String text)
Corrects the spelling of the given text (language = "en", escaping XML).
|
static String |
correct(String text,
String lang)
Corrects the spelling of the given text (escaping XML).
|
static String |
correct(String text,
String lang,
String hl)
Corrects the spelling of the given text (escaping XML).
|
static String |
correct(String text,
String lang,
String hl,
boolean escapeXml)
Corrects the spelling of the given text.
|
static void |
main(String[] args) |
static ERXGoogleSpell.Correction[] |
suggestions(String text)
Returns possible spelling corrections of the given text (language = "en", escaping XML).
|
static ERXGoogleSpell.Correction[] |
suggestions(String text,
String lang)
Returns possible spelling corrections of the given text (escaping XML).
|
static ERXGoogleSpell.Correction[] |
suggestions(String text,
String lang,
String hl)
Returns possible spelling corrections of the given text (escaping XML).
|
static ERXGoogleSpell.Correction[] |
suggestions(String text,
String lang,
String hl,
boolean escapeXml)
Returns possible spelling corrections of the given text.
|
public static void main(String[] args) throws ERXGoogleSpell.CorrectionException
public static String correct(String text) throws ERXGoogleSpell.CorrectionException
text
- the misspelled textERXGoogleSpell.CorrectionException
- if there is a problem correcting the textpublic static String correct(String text, String lang) throws ERXGoogleSpell.CorrectionException
text
- the misspelled textlang
- the language of the textERXGoogleSpell.CorrectionException
- if there is a problem correcting the textpublic static String correct(String text, String lang, String hl) throws ERXGoogleSpell.CorrectionException
text
- the misspelled textlang
- the language of the texthl
- the human interface languageERXGoogleSpell.CorrectionException
- if there is a problem correcting the textpublic static String correct(String text, String lang, String hl, boolean escapeXml) throws ERXGoogleSpell.CorrectionException
text
- the misspelled textlang
- the language of the texthl
- the human interface languageescapeXml
- if true, xml characters in the text will be escapedERXGoogleSpell.CorrectionException
- if there is a problem correcting the textpublic static ERXGoogleSpell.Correction[] suggestions(String text) throws ERXGoogleSpell.CorrectionException
text
- the misspelled textERXGoogleSpell.CorrectionException
- if there is a problem correcting the textpublic static ERXGoogleSpell.Correction[] suggestions(String text, String lang) throws ERXGoogleSpell.CorrectionException
text
- the misspelled textlang
- the language of the textERXGoogleSpell.CorrectionException
- if there is a problem correcting the textpublic static ERXGoogleSpell.Correction[] suggestions(String text, String lang, String hl) throws ERXGoogleSpell.CorrectionException
text
- the misspelled textlang
- the language of the texthl
- the human interface languageERXGoogleSpell.CorrectionException
- if there is a problem correcting the textpublic static ERXGoogleSpell.Correction[] suggestions(String text, String lang, String hl, boolean escapeXml) throws ERXGoogleSpell.CorrectionException
text
- the misspelled textlang
- the language of the texthl
- the human interface languageescapeXml
- if true, xml characters in the text will be escapedERXGoogleSpell.CorrectionException
- if there is a problem correcting the textCopyright © 2002 – 2024 Project Wonder.