Package org.coordinatekit.crf.annotator
Class RetokenizeConfiguration.Builder
java.lang.Object
org.coordinatekit.crf.annotator.RetokenizeConfiguration.Builder
- Enclosing class:
RetokenizeConfiguration
Builder for constructing
RetokenizeConfiguration instances.
input(Path) and output(Path) are required; the model is optional and the
threshold defaults to RetokenizeConfiguration.DEFAULT_THRESHOLD.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configuration with the current settings.Sets the path to the XML training-data file to review.Sets the path to a serialized model.Sets the path to the XML output file; must be absent or empty, and must differ from the input.threshold(double threshold) Sets the confidence threshold below which token rows are highlighted.
-
Method Details
-
build
Builds the configuration with the current settings.- Returns:
- an immutable configuration instance
- Throws:
IllegalStateException- if the input or output path was not set
-
input
Sets the path to the XML training-data file to review.- Parameters:
input- the input file path- Returns:
- this builder
-
model
Sets the path to a serialized model. Optional; if absent re-tagging runs without tag suggestions.- Parameters:
model- the model path, ornullif no model is supplied- Returns:
- this builder
-
output
Sets the path to the XML output file; must be absent or empty, and must differ from the input.- Parameters:
output- the output file path- Returns:
- this builder
-
threshold
Sets the confidence threshold below which token rows are highlighted.- Parameters:
threshold- the threshold, in the closed interval[0.0, 1.0]- Returns:
- this builder
- Throws:
IllegalArgumentException- if the threshold isNaNor outside[0.0, 1.0]
-