Class Token.Builder (2.3.4)

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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Token.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Token.Builder
Overrides

build()

public Token build()
Returns
TypeDescription
Token

buildPartial()

public Token buildPartial()
Returns
TypeDescription
Token

clear()

public Token.Builder clear()
Returns
TypeDescription
Token.Builder
Overrides

clearDependencyEdge()

public Token.Builder clearDependencyEdge()

Dependency tree parse for this token.

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

Returns
TypeDescription
Token.Builder

clearField(Descriptors.FieldDescriptor field)

public Token.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Token.Builder
Overrides

clearLemma()

public Token.Builder clearLemma()

Lemma of the token.

string lemma = 4;

Returns
TypeDescription
Token.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Token.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
Token.Builder

clearText()

public Token.Builder clearText()

The token text.

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

Returns
TypeDescription
Token.Builder

clone()

public Token.Builder clone()
Returns
TypeDescription
Token.Builder
Overrides

getDefaultInstanceForType()

public Token getDefaultInstanceForType()
Returns
TypeDescription
Token

getDependencyEdge()

public DependencyEdge getDependencyEdge()

Dependency tree parse for this token.

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

Returns
TypeDescription
DependencyEdge

The dependencyEdge.

getDependencyEdgeBuilder()

public DependencyEdge.Builder getDependencyEdgeBuilder()

Dependency tree parse for this token.

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

Returns
TypeDescription
DependencyEdge.Builder

getDependencyEdgeOrBuilder()

public DependencyEdgeOrBuilder getDependencyEdgeOrBuilder()

Dependency tree parse for this token.

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

Returns
TypeDescription
DependencyEdgeOrBuilder

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLemma()

public String getLemma()

Lemma of the token.

string lemma = 4;

Returns
TypeDescription
String

The lemma.

getLemmaBytes()

public ByteString getLemmaBytes()

Lemma of the token.

string lemma = 4;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
PartOfSpeech.Builder

getPartOfSpeechOrBuilder()

public PartOfSpeechOrBuilder getPartOfSpeechOrBuilder()

Parts of speech tag for this token.

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

Returns
TypeDescription
PartOfSpeechOrBuilder

getText()

public TextSpan getText()

The token text.

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

Returns
TypeDescription
TextSpan

The text.

getTextBuilder()

public TextSpan.Builder getTextBuilder()

The token text.

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

Returns
TypeDescription
TextSpan.Builder

getTextOrBuilder()

public TextSpanOrBuilder getTextOrBuilder()

The token text.

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

Returns
TypeDescription
TextSpanOrBuilder

hasDependencyEdge()

public boolean hasDependencyEdge()

Dependency tree parse for this token.

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

Returns
TypeDescription
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
TypeDescription
boolean

Whether the partOfSpeech field is set.

hasText()

public boolean hasText()

The token text.

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

Returns
TypeDescription
boolean

Whether the text field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueDependencyEdge
Returns
TypeDescription
Token.Builder

mergeFrom(Token other)

public Token.Builder mergeFrom(Token other)
Parameter
NameDescription
otherToken
Returns
TypeDescription
Token.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Token.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Token.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Token.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valuePartOfSpeech
Returns
TypeDescription
Token.Builder

mergeText(TextSpan value)

public Token.Builder mergeText(TextSpan value)

The token text.

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

Parameter
NameDescription
valueTextSpan
Returns
TypeDescription
Token.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Token.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueDependencyEdge
Returns
TypeDescription
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
NameDescription
builderForValueDependencyEdge.Builder
Returns
TypeDescription
Token.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Token.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Token.Builder
Overrides

setLemma(String value)

public Token.Builder setLemma(String value)

Lemma of the token.

string lemma = 4;

Parameter
NameDescription
valueString

The lemma to set.

Returns
TypeDescription
Token.Builder

This builder for chaining.

setLemmaBytes(ByteString value)

public Token.Builder setLemmaBytes(ByteString value)

Lemma of the token.

string lemma = 4;

Parameter
NameDescription
valueByteString

The bytes for lemma to set.

Returns
TypeDescription
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
NameDescription
valuePartOfSpeech
Returns
TypeDescription
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
NameDescription
builderForValuePartOfSpeech.Builder
Returns
TypeDescription
Token.Builder

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

public Token.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Token.Builder
Overrides

setText(TextSpan value)

public Token.Builder setText(TextSpan value)

The token text.

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

Parameter
NameDescription
valueTextSpan
Returns
TypeDescription
Token.Builder

setText(TextSpan.Builder builderForValue)

public Token.Builder setText(TextSpan.Builder builderForValue)

The token text.

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

Parameter
NameDescription
builderForValueTextSpan.Builder
Returns
TypeDescription
Token.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Token.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Token.Builder
Overrides