Package opennlp.tools.formats.conllu
Class ConlluDependencySampleStreamFactory
java.lang.Object
opennlp.tools.formats.AbstractSampleStreamFactory<DependencySample,ConlluDependencySampleStreamFactory.Parameters>
opennlp.tools.formats.conllu.ConlluDependencySampleStreamFactory
- All Implemented Interfaces:
ObjectStreamFactory<DependencySample,ConlluDependencySampleStreamFactory.Parameters>
@Internal
public class ConlluDependencySampleStreamFactory
extends AbstractSampleStreamFactory<DependencySample,ConlluDependencySampleStreamFactory.Parameters>
Creates
ConlluDependencySampleStream instances for the command line tools. The
data is always read as UTF-8, as the CoNLL-U format requires.
Note: Do not use this class, internal use only!
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe command line parameters of the CoNLL-U dependency format. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringThe message for an-encodingvalue other than UTF-8.Fields inherited from class opennlp.tools.formats.AbstractSampleStreamFactory
params -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInitializes the factory. -
Method Summary
Modifier and TypeMethodDescriptionCreates anObjectStreamof the template typeT.static voidRegisters the factory as the default and as theconlluformat fordependency samples.Methods inherited from class opennlp.tools.formats.AbstractSampleStreamFactory
getLang, getParameters, readData, validateBasicFormatParameters
-
Field Details
-
UTF_8_REQUIRED
The message for an-encodingvalue other than UTF-8.- See Also:
-
-
Constructor Details
-
ConlluDependencySampleStreamFactory
protected ConlluDependencySampleStreamFactory(Class<ConlluDependencySampleStreamFactory.Parameters> params) Initializes the factory.- Parameters:
params- The parameters interface the command line arguments are parsed into.
-
-
Method Details
-
registerFactory
public static void registerFactory()Registers the factory as the default and as theconlluformat fordependency samples. -
create
Creates anObjectStreamof the template typeT.- Parameters:
args- arguments- Returns:
- The created
ObjectStreaminstance. - Throws:
TerminateToolException- Thrown if the encoding is not UTF-8, the tagset parameter is unknown, or the data cannot be opened.
-