Package opennlp.spellcheck.cmdline
Class CorrectTextTool
java.lang.Object
opennlp.tools.cmdline.CmdLineTool
opennlp.tools.cmdline.BasicCmdLineTool
opennlp.spellcheck.cmdline.CorrectTextTool
public class CorrectTextTool
extends opennlp.tools.cmdline.BasicCmdLineTool
A command line tool that corrects spelling in text using a
SymSpellModel.
The model is either loaded from a file (-model) or resolved from the classpath
by language (-lang) via SymSpellModelResolver. Input is read line by line
from a file (-inputFile) or, when absent, from standard input; corrected output is
written to a file (-outputFile) or to standard output.
By default each line is corrected token by token. With -compound true the whole
line is corrected as a phrase, additionally repairing wrong word splits and merges. With
-suggest true the tool instead lists the candidate suggestions for every token
(honoring -verbosity) rather than emitting corrected text.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class opennlp.tools.cmdline.CmdLineTool
getName, hasParams
-
Constructor Details
-
CorrectTextTool
public CorrectTextTool()
-
-
Method Details
-
getShortDescription
- Overrides:
getShortDescriptionin classopennlp.tools.cmdline.CmdLineTool
-
getHelp
- Specified by:
getHelpin classopennlp.tools.cmdline.CmdLineTool
-
run
- Specified by:
runin classopennlp.tools.cmdline.BasicCmdLineTool
-