Class TypedCmdLineTool

Namespace
NOpenNLP.Tools.Cmdline
Assembly
nopennlp.dll

Base class for tools which process samples of some type coming from a stream of a certain format.

public abstract class TypedCmdLineTool : CmdLineTool
Inheritance
TypedCmdLineTool
Derived
Inherited Members

Properties

Format

The format named by the .format suffix, or DefaultFormat when the user named none.

public string Format { get; set; }

Property Value

string

Methods

GetFormatNames()

The format names registered for this tool's sample type, in registration order.

protected abstract IEnumerable<string> GetFormatNames()

Returns

IEnumerable<string>

GetFormatParameters(string)

The parameters the named format accepts, or null when it is not registered.

protected abstract IEnumerable<IFormatParameter>? GetFormatParameters(string format)

Parameters

format string

Returns

IEnumerable<IFormatParameter>

GetFormatsHelp()

Renders the [.fmt1|.fmt2] alternation upstream puts between the tool name and its arguments when more than one format is registered.

protected string GetFormatsHelp()

Returns

string

GetFormatsHelp(string)

Renders what upstream puts between the tool name and its arguments in a usage line: the concrete .format suffix when the user named one, and the [.fmt1|.fmt2] alternation of everything available when they did not.

protected string GetFormatsHelp(string format)

Parameters

format string

Returns

string

Remarks

This mirrors the two branches of upstream's AbstractTypedParamTool.getHelp(String). Printing the alternation for a named format would answer a question about one format with a menu of all of them, and the usage line would not be a command the user could copy.

GetHelp()

A description of how to use the tool.

public override string GetHelp()

Returns

string

GetHelp(string)

A description of how to use the tool with the given format.

public abstract string GetHelp(string format)

Parameters

format string

Returns

string