Class SpellingCorrection.Builder (2.48.0)

public static final class SpellingCorrection.Builder extends GeneratedMessageV3.Builder<SpellingCorrection.Builder> implements SpellingCorrectionOrBuilder

Spell check result.

Protobuf type google.cloud.talent.v4beta1.SpellingCorrection

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SpellingCorrection.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SpellingCorrection.Builder
Overrides

build()

public SpellingCorrection build()
Returns
Type Description
SpellingCorrection

buildPartial()

public SpellingCorrection buildPartial()
Returns
Type Description
SpellingCorrection

clear()

public SpellingCorrection.Builder clear()
Returns
Type Description
SpellingCorrection.Builder
Overrides

clearCorrected()

public SpellingCorrection.Builder clearCorrected()

Indicates if the query was corrected by the spell checker.

bool corrected = 1;

Returns
Type Description
SpellingCorrection.Builder

This builder for chaining.

clearCorrectedHtml()

public SpellingCorrection.Builder clearCorrectedHtml()

Corrected output with html tags to highlight the corrected words. Corrected words are called out with the "<b><i>...</i></b>" html tags.

For example, the user input query is "software enginear", where the second word, "enginear," is incorrect. It should be "engineer". When spelling correction is enabled, this value is "software <b><i>engineer</i></b>".

string corrected_html = 3;

Returns
Type Description
SpellingCorrection.Builder

This builder for chaining.

clearCorrectedText()

public SpellingCorrection.Builder clearCorrectedText()

Correction output consisting of the corrected keyword string.

string corrected_text = 2;

Returns
Type Description
SpellingCorrection.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public SpellingCorrection.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
SpellingCorrection.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public SpellingCorrection.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
SpellingCorrection.Builder
Overrides

clone()

public SpellingCorrection.Builder clone()
Returns
Type Description
SpellingCorrection.Builder
Overrides

getCorrected()

public boolean getCorrected()

Indicates if the query was corrected by the spell checker.

bool corrected = 1;

Returns
Type Description
boolean

The corrected.

getCorrectedHtml()

public String getCorrectedHtml()

Corrected output with html tags to highlight the corrected words. Corrected words are called out with the "<b><i>...</i></b>" html tags.

For example, the user input query is "software enginear", where the second word, "enginear," is incorrect. It should be "engineer". When spelling correction is enabled, this value is "software <b><i>engineer</i></b>".

string corrected_html = 3;

Returns
Type Description
String

The correctedHtml.

getCorrectedHtmlBytes()

public ByteString getCorrectedHtmlBytes()

Corrected output with html tags to highlight the corrected words. Corrected words are called out with the "<b><i>...</i></b>" html tags.

For example, the user input query is "software enginear", where the second word, "enginear," is incorrect. It should be "engineer". When spelling correction is enabled, this value is "software <b><i>engineer</i></b>".

string corrected_html = 3;

Returns
Type Description
ByteString

The bytes for correctedHtml.

getCorrectedText()

public String getCorrectedText()

Correction output consisting of the corrected keyword string.

string corrected_text = 2;

Returns
Type Description
String

The correctedText.

getCorrectedTextBytes()

public ByteString getCorrectedTextBytes()

Correction output consisting of the corrected keyword string.

string corrected_text = 2;

Returns
Type Description
ByteString

The bytes for correctedText.

getDefaultInstanceForType()

public SpellingCorrection getDefaultInstanceForType()
Returns
Type Description
SpellingCorrection

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SpellingCorrection other)

public SpellingCorrection.Builder mergeFrom(SpellingCorrection other)
Parameter
Name Description
other SpellingCorrection
Returns
Type Description
SpellingCorrection.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SpellingCorrection.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SpellingCorrection.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public SpellingCorrection.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
SpellingCorrection.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SpellingCorrection.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SpellingCorrection.Builder
Overrides

setCorrected(boolean value)

public SpellingCorrection.Builder setCorrected(boolean value)

Indicates if the query was corrected by the spell checker.

bool corrected = 1;

Parameter
Name Description
value boolean

The corrected to set.

Returns
Type Description
SpellingCorrection.Builder

This builder for chaining.

setCorrectedHtml(String value)

public SpellingCorrection.Builder setCorrectedHtml(String value)

Corrected output with html tags to highlight the corrected words. Corrected words are called out with the "<b><i>...</i></b>" html tags.

For example, the user input query is "software enginear", where the second word, "enginear," is incorrect. It should be "engineer". When spelling correction is enabled, this value is "software <b><i>engineer</i></b>".

string corrected_html = 3;

Parameter
Name Description
value String

The correctedHtml to set.

Returns
Type Description
SpellingCorrection.Builder

This builder for chaining.

setCorrectedHtmlBytes(ByteString value)

public SpellingCorrection.Builder setCorrectedHtmlBytes(ByteString value)

Corrected output with html tags to highlight the corrected words. Corrected words are called out with the "<b><i>...</i></b>" html tags.

For example, the user input query is "software enginear", where the second word, "enginear," is incorrect. It should be "engineer". When spelling correction is enabled, this value is "software <b><i>engineer</i></b>".

string corrected_html = 3;

Parameter
Name Description
value ByteString

The bytes for correctedHtml to set.

Returns
Type Description
SpellingCorrection.Builder

This builder for chaining.

setCorrectedText(String value)

public SpellingCorrection.Builder setCorrectedText(String value)

Correction output consisting of the corrected keyword string.

string corrected_text = 2;

Parameter
Name Description
value String

The correctedText to set.

Returns
Type Description
SpellingCorrection.Builder

This builder for chaining.

setCorrectedTextBytes(ByteString value)

public SpellingCorrection.Builder setCorrectedTextBytes(ByteString value)

Correction output consisting of the corrected keyword string.

string corrected_text = 2;

Parameter
Name Description
value ByteString

The bytes for correctedText to set.

Returns
Type Description
SpellingCorrection.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public SpellingCorrection.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SpellingCorrection.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public SpellingCorrection.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
SpellingCorrection.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final SpellingCorrection.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SpellingCorrection.Builder
Overrides