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
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aNerInferenceOptions
.classificationLabels
(String value, String... values) The token classification labels.classificationLabels
(List<String> list) The token classification labels.resultsField
(String value) The field that is added to incoming documents to contain the inference prediction.protected NerInferenceOptions.Builder
self()
tokenization
(TokenizationConfig value) The tokenization optionsThe tokenization optionsvocabulary
(Vocabulary value) API name:vocabulary
API name:vocabulary
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
tokenization
The tokenization optionsAPI name:
tokenization
-
tokenization
public final NerInferenceOptions.Builder tokenization(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
The token classification labels. Must be IOB formatted tagsAPI name:
classification_labels
Adds all elements of
list
toclassificationLabels
. -
classificationLabels
The token classification labels. Must be IOB formatted tagsAPI name:
classification_labels
Adds one or more values to
classificationLabels
. -
vocabulary
API name:vocabulary
-
vocabulary
public final NerInferenceOptions.Builder vocabulary(Function<Vocabulary.Builder, ObjectBuilder<Vocabulary>> fn) API name:vocabulary
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<NerInferenceOptions.Builder>
-
build
Builds aNerInferenceOptions
.- Specified by:
build
in interfaceObjectBuilder<NerInferenceOptions>
- Throws:
NullPointerException
- if some of the required fields are null.
-