Class NerInferenceOptions.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<NerInferenceOptions.Builder>
co.elastic.clients.elasticsearch.ml.NerInferenceOptions.Builder
- All Implemented Interfaces:
WithJson<NerInferenceOptions.Builder>
,ObjectBuilder<NerInferenceOptions>
- Enclosing class:
- NerInferenceOptions
public static class NerInferenceOptions.Builder extends WithJsonObjectBuilderBase<NerInferenceOptions.Builder> implements ObjectBuilder<NerInferenceOptions>
Builder for
NerInferenceOptions
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description NerInferenceOptions
build()
Builds aNerInferenceOptions
.NerInferenceOptions.Builder
classificationLabels(java.lang.String value, java.lang.String... values)
The token classification labels.NerInferenceOptions.Builder
classificationLabels(java.util.List<java.lang.String> list)
The token classification labels.NerInferenceOptions.Builder
resultsField(java.lang.String value)
The field that is added to incoming documents to contain the inference prediction.protected NerInferenceOptions.Builder
self()
NerInferenceOptions.Builder
tokenization(TokenizationConfig value)
The tokenization optionsNerInferenceOptions.Builder
tokenization(java.util.function.Function<TokenizationConfig.Builder,ObjectBuilder<TokenizationConfig>> fn)
The tokenization optionsMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
tokenization
The tokenization optionsAPI name:
tokenization
-
tokenization
public final NerInferenceOptions.Builder tokenization(java.util.function.Function<TokenizationConfig.Builder,ObjectBuilder<TokenizationConfig>> fn)The tokenization optionsAPI name:
tokenization
-
resultsField
The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.API name:
results_field
-
classificationLabels
public final NerInferenceOptions.Builder classificationLabels(java.util.List<java.lang.String> list)The token classification labels. Must be IOB formatted tagsAPI name:
classification_labels
Adds all elements of
list
toclassificationLabels
. -
classificationLabels
public final NerInferenceOptions.Builder classificationLabels(java.lang.String value, java.lang.String... values)The token classification labels. Must be IOB formatted tagsAPI name:
classification_labels
Adds one or more values to
classificationLabels
. -
self
- Specified by:
self
in classWithJsonObjectBuilderBase<NerInferenceOptions.Builder>
-
build
Builds aNerInferenceOptions
.- Specified by:
build
in interfaceObjectBuilder<NerInferenceOptions>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-