Class Token.Builder (2.44.0)

public static final class Token.Builder extends GeneratedMessageV3.Builder<Token.Builder> implements TokenOrBuilder

Represents the smallest syntactic building block of the text.

Protobuf type google.cloud.language.v1.Token

Implements

TokenOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Token build()
Returns
Type Description
Token

buildPartial()

public Token buildPartial()
Returns
Type Description
Token

clear()

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

clearDependencyEdge()

public Token.Builder clearDependencyEdge()

Dependency tree parse for this token.

.google.cloud.language.v1.DependencyEdge dependency_edge = 3;

Returns
Type Description
Token.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearLemma()

public Token.Builder clearLemma()

Lemma of the token.

string lemma = 4;

Returns
Type Description
Token.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPartOfSpeech()

public Token.Builder clearPartOfSpeech()

Parts of speech tag for this token.

.google.cloud.language.v1.PartOfSpeech part_of_speech = 2;

Returns
Type Description
Token.Builder

clearText()

public Token.Builder clearText()

The token text.

.google.cloud.language.v1.TextSpan text = 1;

Returns
Type Description
Token.Builder

clone()

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

getDefaultInstanceForType()

public Token getDefaultInstanceForType()
Returns
Type Description
Token

getDependencyEdge()

public DependencyEdge getDependencyEdge()

Dependency tree parse for this token.

.google.cloud.language.v1.DependencyEdge dependency_edge = 3;

Returns
Type Description
DependencyEdge

The dependencyEdge.

getDependencyEdgeBuilder()

public DependencyEdge.Builder getDependencyEdgeBuilder()

Dependency tree parse for this token.

.google.cloud.language.v1.DependencyEdge dependency_edge = 3;

Returns
Type Description
DependencyEdge.Builder

getDependencyEdgeOrBuilder()

public DependencyEdgeOrBuilder getDependencyEdgeOrBuilder()

Dependency tree parse for this token.

.google.cloud.language.v1.DependencyEdge dependency_edge = 3;

Returns
Type Description
DependencyEdgeOrBuilder

getDescriptorForType()

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

getLemma()

public String getLemma()

Lemma of the token.

string lemma = 4;

Returns
Type Description
String

The lemma.

getLemmaBytes()

public ByteString getLemmaBytes()

Lemma of the token.

string lemma = 4;

Returns
Type Description
ByteString

The bytes for lemma.

getPartOfSpeech()

public PartOfSpeech getPartOfSpeech()

Parts of speech tag for this token.

.google.cloud.language.v1.PartOfSpeech part_of_speech = 2;

Returns
Type Description
PartOfSpeech

The partOfSpeech.

getPartOfSpeechBuilder()

public PartOfSpeech.Builder getPartOfSpeechBuilder()

Parts of speech tag for this token.

.google.cloud.language.v1.PartOfSpeech part_of_speech = 2;

Returns
Type Description
PartOfSpeech.Builder

getPartOfSpeechOrBuilder()

public PartOfSpeechOrBuilder getPartOfSpeechOrBuilder()

Parts of speech tag for this token.

.google.cloud.language.v1.PartOfSpeech part_of_speech = 2;

Returns
Type Description
PartOfSpeechOrBuilder

getText()

public TextSpan getText()

The token text.

.google.cloud.language.v1.TextSpan text = 1;

Returns
Type Description
TextSpan

The text.

getTextBuilder()

public TextSpan.Builder getTextBuilder()

The token text.

.google.cloud.language.v1.TextSpan text = 1;

Returns
Type Description
TextSpan.Builder

getTextOrBuilder()

public TextSpanOrBuilder getTextOrBuilder()

The token text.

.google.cloud.language.v1.TextSpan text = 1;

Returns
Type Description
TextSpanOrBuilder

hasDependencyEdge()

public boolean hasDependencyEdge()

Dependency tree parse for this token.

.google.cloud.language.v1.DependencyEdge dependency_edge = 3;

Returns
Type Description
boolean

Whether the dependencyEdge field is set.

hasPartOfSpeech()

public boolean hasPartOfSpeech()

Parts of speech tag for this token.

.google.cloud.language.v1.PartOfSpeech part_of_speech = 2;

Returns
Type Description
boolean

Whether the partOfSpeech field is set.

hasText()

public boolean hasText()

The token text.

.google.cloud.language.v1.TextSpan text = 1;

Returns
Type Description
boolean

Whether the text field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeDependencyEdge(DependencyEdge value)

public Token.Builder mergeDependencyEdge(DependencyEdge value)

Dependency tree parse for this token.

.google.cloud.language.v1.DependencyEdge dependency_edge = 3;

Parameter
Name Description
value DependencyEdge
Returns
Type Description
Token.Builder

mergeFrom(Token other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergePartOfSpeech(PartOfSpeech value)

public Token.Builder mergePartOfSpeech(PartOfSpeech value)

Parts of speech tag for this token.

.google.cloud.language.v1.PartOfSpeech part_of_speech = 2;

Parameter
Name Description
value PartOfSpeech
Returns
Type Description
Token.Builder

mergeText(TextSpan value)

public Token.Builder mergeText(TextSpan value)

The token text.

.google.cloud.language.v1.TextSpan text = 1;

Parameter
Name Description
value TextSpan
Returns
Type Description
Token.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setDependencyEdge(DependencyEdge value)

public Token.Builder setDependencyEdge(DependencyEdge value)

Dependency tree parse for this token.

.google.cloud.language.v1.DependencyEdge dependency_edge = 3;

Parameter
Name Description
value DependencyEdge
Returns
Type Description
Token.Builder

setDependencyEdge(DependencyEdge.Builder builderForValue)

public Token.Builder setDependencyEdge(DependencyEdge.Builder builderForValue)

Dependency tree parse for this token.

.google.cloud.language.v1.DependencyEdge dependency_edge = 3;

Parameter
Name Description
builderForValue DependencyEdge.Builder
Returns
Type Description
Token.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setLemma(String value)

public Token.Builder setLemma(String value)

Lemma of the token.

string lemma = 4;

Parameter
Name Description
value String

The lemma to set.

Returns
Type Description
Token.Builder

This builder for chaining.

setLemmaBytes(ByteString value)

public Token.Builder setLemmaBytes(ByteString value)

Lemma of the token.

string lemma = 4;

Parameter
Name Description
value ByteString

The bytes for lemma to set.

Returns
Type Description
Token.Builder

This builder for chaining.

setPartOfSpeech(PartOfSpeech value)

public Token.Builder setPartOfSpeech(PartOfSpeech value)

Parts of speech tag for this token.

.google.cloud.language.v1.PartOfSpeech part_of_speech = 2;

Parameter
Name Description
value PartOfSpeech
Returns
Type Description
Token.Builder

setPartOfSpeech(PartOfSpeech.Builder builderForValue)

public Token.Builder setPartOfSpeech(PartOfSpeech.Builder builderForValue)

Parts of speech tag for this token.

.google.cloud.language.v1.PartOfSpeech part_of_speech = 2;

Parameter
Name Description
builderForValue PartOfSpeech.Builder
Returns
Type Description
Token.Builder

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

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

setText(TextSpan value)

public Token.Builder setText(TextSpan value)

The token text.

.google.cloud.language.v1.TextSpan text = 1;

Parameter
Name Description
value TextSpan
Returns
Type Description
Token.Builder

setText(TextSpan.Builder builderForValue)

public Token.Builder setText(TextSpan.Builder builderForValue)

The token text.

.google.cloud.language.v1.TextSpan text = 1;

Parameter
Name Description
builderForValue TextSpan.Builder
Returns
Type Description
Token.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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