Class ConllOutputConfiguration.Builder
java.lang.Object
org.coordinatekit.crf.mallet.train.ConllOutputConfiguration.Builder
- Enclosing class:
ConllOutputConfiguration
Builder for constructing
ConllOutputConfiguration instances.
The outputDirectory(Path) must be set before calling build(). All other
parameters have sensible defaults.
Example:
ConllOutputEvaluatorConfiguration config = ConllOutputEvaluatorConfiguration.builder()
.outputDirectory(Path.of("results")).filePrefix("test_predictions").iterationInterval(5).build();
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configuration with the current settings.filePrefix(String filePrefix) Sets the prefix for output file names.fileSuffix(String fileSuffix) Sets the suffix (extension) for output file names.iterationInterval(int iterationInterval) Sets the iteration interval for writing output files.outputDirectory(Path outputDirectory) Sets the directory in which to write output files.
-
Method Details
-
build
Builds the configuration with the current settings.- Returns:
- an immutable configuration instance
-
filePrefix
Sets the prefix for output file names.- Parameters:
filePrefix- the file prefix, must not be null- Returns:
- this builder
- Throws:
NullPointerException- if filePrefix is null
-
fileSuffix
Sets the suffix (extension) for output file names.- Parameters:
fileSuffix- the file suffix, must not be null- Returns:
- this builder
- Throws:
NullPointerException- if fileSuffix is null
-
iterationInterval
Sets the iteration interval for writing output files.- Parameters:
iterationInterval- the interval, must be positive- Returns:
- this builder
- Throws:
IllegalArgumentException- if iterationInterval is not positive
-
outputDirectory
Sets the directory in which to write output files.This is a required parameter and must be set before calling
build().- Parameters:
outputDirectory- the output directory path, must not be null- Returns:
- this builder
- Throws:
NullPointerException- if outputDirectory is null
-