Package opennlp.tools.cmdline.stopword
Class StopwordFilterTool
java.lang.Object
opennlp.tools.cmdline.CmdLineTool
opennlp.tools.cmdline.BasicCmdLineTool
opennlp.tools.cmdline.stopword.StopwordFilterTool
public final class StopwordFilterTool
extends opennlp.tools.cmdline.BasicCmdLineTool
A command line tool that filters stop words from whitespace-separated
tokens read on standard input and prints the kept tokens to standard
output, one input line per output line.
Usage: opennlp StopwordFilter <lang|file>. The single argument is
either an ISO 639 language code matching one of the bundled lists, or a path
to a custom stopword list file (one entry per line, # comments and
blank lines ignored, loaded case-insensitively). The tokens to filter are
always read from standard input. A bundled language code takes precedence;
to force loading a file whose name happens to be a language code, qualify it
with a path (e.g. ./en).
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class opennlp.tools.cmdline.CmdLineTool
getName
-
Constructor Details
-
StopwordFilterTool
public StopwordFilterTool()
-
-
Method Details
-
getShortDescription
- Overrides:
getShortDescriptionin classopennlp.tools.cmdline.CmdLineTool- Returns:
- Retrieves a short description of what the tool does
-
getHelp
- Specified by:
getHelpin classopennlp.tools.cmdline.CmdLineTool- Returns:
- Retrieves a description on how to use the tool
-
hasParams
public boolean hasParams()- Overrides:
hasParamsin classopennlp.tools.cmdline.CmdLineTool- Returns:
- Retrieves whether the tool has any command line params
-
run
Description copied from class:opennlp.tools.cmdline.BasicCmdLineToolExecutes the tool with the given parameters.- Specified by:
runin classopennlp.tools.cmdline.BasicCmdLineTool- Parameters:
args- arguments
-