Module org.elasticsearch.xcore
Class TextClassificationConfigUpdate
java.lang.Object
org.elasticsearch.xpack.core.ml.inference.trainedmodel.NlpConfigUpdate
org.elasticsearch.xpack.core.ml.inference.trainedmodel.TextClassificationConfigUpdate
- All Implemented Interfaces:
NamedWriteable,VersionedNamedWriteable,Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject,InferenceConfigUpdate,NamedXContentObject
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from class org.elasticsearch.xpack.core.ml.inference.trainedmodel.NlpConfigUpdate
tokenizationUpdateFields inherited from interface org.elasticsearch.xpack.core.ml.inference.trainedmodel.InferenceConfigUpdate
RESERVED_ML_FIELD_NAMESFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionTextClassificationConfigUpdate(List<String> classificationLabels, Integer numTopClasses, String resultsField, TokenizationUpdate tokenizationUpdate) -
Method Summary
Modifier and TypeMethodDescriptionorg.elasticsearch.xcontent.XContentBuilderdoXContentBody(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) booleanfromXContentStrict(org.elasticsearch.xcontent.XContentParser parser) getName()Required because this class implements 2 interfaces defining the methodString getName()and the compiler insists it must be resolved here in the abstract classinthashCode()booleanisSupported(InferenceConfig config) InferenceConfigUpdate.Builder<? extends InferenceConfigUpdate.Builder<?, ?>, ? extends InferenceConfigUpdate> voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.xpack.core.ml.inference.trainedmodel.NlpConfigUpdate
getTokenizationUpdate, isNoop, tokenizationFromMap, toXContentMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xpack.core.ml.inference.trainedmodel.InferenceConfigUpdate
isEmptyMethods inherited from interface org.elasticsearch.xcontent.ToXContent
toXContentMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
TextClassificationConfigUpdate
public TextClassificationConfigUpdate(List<String> classificationLabels, Integer numTopClasses, String resultsField, TokenizationUpdate tokenizationUpdate) -
TextClassificationConfigUpdate
- Throws:
IOException
-
-
Method Details
-
fromMap
-
fromXContentStrict
public static TextClassificationConfigUpdate fromXContentStrict(org.elasticsearch.xcontent.XContentParser parser) -
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable- Specified by:
getWriteableNamein interfaceVersionedNamedWriteable
-
getName
Description copied from class:NlpConfigUpdateRequired because this class implements 2 interfaces defining the methodString getName()and the compiler insists it must be resolved here in the abstract class- Specified by:
getNamein interfaceInferenceConfigUpdate- Specified by:
getNamein interfaceNamedXContentObject- Overrides:
getNamein classNlpConfigUpdate- Returns:
- The name of the XContentObject that is to be serialized
-
getMinimalSupportedVersion
- Specified by:
getMinimalSupportedVersionin interfaceVersionedNamedWriteable
-
writeTo
- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classNlpConfigUpdate- Throws:
IOException
-
isSupported
- Specified by:
isSupportedin interfaceInferenceConfigUpdate
-
getResultsField
- Specified by:
getResultsFieldin interfaceInferenceConfigUpdate
-
getNumTopClasses
-
getClassificationLabels
-
newBuilder
public InferenceConfigUpdate.Builder<? extends InferenceConfigUpdate.Builder<?,?>, newBuilder()? extends InferenceConfigUpdate> - Specified by:
newBuilderin interfaceInferenceConfigUpdate
-
doXContentBody
public org.elasticsearch.xcontent.XContentBuilder doXContentBody(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
doXContentBodyin classNlpConfigUpdate- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-