org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow_metadata/proto/v0/statistics.proto
// Protobuf Java Version: 3.25.4
package org.tensorflow.metadata.v0;
/**
*
* Statistics for a weighted feature with an NL domain.
*
*
* Protobuf type {@code tensorflow.metadata.v0.WeightedNaturalLanguageStatistics}
*/
public final class WeightedNaturalLanguageStatistics extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.metadata.v0.WeightedNaturalLanguageStatistics)
WeightedNaturalLanguageStatisticsOrBuilder {
private static final long serialVersionUID = 0L;
// Use WeightedNaturalLanguageStatistics.newBuilder() to construct.
private WeightedNaturalLanguageStatistics(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private WeightedNaturalLanguageStatistics() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new WeightedNaturalLanguageStatistics();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_WeightedNaturalLanguageStatistics_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_WeightedNaturalLanguageStatistics_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics.class, org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics.Builder.class);
}
private int bitField0_;
public static final int FEATURE_COVERAGE_FIELD_NUMBER = 1;
private double featureCoverage_ = 0D;
/**
*
* Weighted feature coverage.
*
*
* double feature_coverage = 1;
* @return The featureCoverage.
*/
@java.lang.Override
public double getFeatureCoverage() {
return featureCoverage_;
}
public static final int AVG_TOKEN_LENGTH_FIELD_NUMBER = 2;
private double avgTokenLength_ = 0D;
/**
*
* Weighted average token length.
*
*
* double avg_token_length = 2;
* @return The avgTokenLength.
*/
@java.lang.Override
public double getAvgTokenLength() {
return avgTokenLength_;
}
public static final int TOKEN_LENGTH_HISTOGRAM_FIELD_NUMBER = 3;
private org.tensorflow.metadata.v0.Histogram tokenLengthHistogram_;
/**
*
* Histogram containing the distribution of token lengths.
*
*
* .tensorflow.metadata.v0.Histogram token_length_histogram = 3;
* @return Whether the tokenLengthHistogram field is set.
*/
@java.lang.Override
public boolean hasTokenLengthHistogram() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Histogram containing the distribution of token lengths.
*
*
* .tensorflow.metadata.v0.Histogram token_length_histogram = 3;
* @return The tokenLengthHistogram.
*/
@java.lang.Override
public org.tensorflow.metadata.v0.Histogram getTokenLengthHistogram() {
return tokenLengthHistogram_ == null ? org.tensorflow.metadata.v0.Histogram.getDefaultInstance() : tokenLengthHistogram_;
}
/**
*
* Histogram containing the distribution of token lengths.
*
*
* .tensorflow.metadata.v0.Histogram token_length_histogram = 3;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.HistogramOrBuilder getTokenLengthHistogramOrBuilder() {
return tokenLengthHistogram_ == null ? org.tensorflow.metadata.v0.Histogram.getDefaultInstance() : tokenLengthHistogram_;
}
public static final int SEQUENCE_LENGTH_HISTOGRAM_FIELD_NUMBER = 9;
private org.tensorflow.metadata.v0.Histogram sequenceLengthHistogram_;
/**
*
* Histogram containing the distribution of sequence lengths.
*
*
* .tensorflow.metadata.v0.Histogram sequence_length_histogram = 9;
* @return Whether the sequenceLengthHistogram field is set.
*/
@java.lang.Override
public boolean hasSequenceLengthHistogram() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Histogram containing the distribution of sequence lengths.
*
*
* .tensorflow.metadata.v0.Histogram sequence_length_histogram = 9;
* @return The sequenceLengthHistogram.
*/
@java.lang.Override
public org.tensorflow.metadata.v0.Histogram getSequenceLengthHistogram() {
return sequenceLengthHistogram_ == null ? org.tensorflow.metadata.v0.Histogram.getDefaultInstance() : sequenceLengthHistogram_;
}
/**
*
* Histogram containing the distribution of sequence lengths.
*
*
* .tensorflow.metadata.v0.Histogram sequence_length_histogram = 9;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.HistogramOrBuilder getSequenceLengthHistogramOrBuilder() {
return sequenceLengthHistogram_ == null ? org.tensorflow.metadata.v0.Histogram.getDefaultInstance() : sequenceLengthHistogram_;
}
public static final int LOCATION_MISSES_FIELD_NUMBER = 4;
private double locationMisses_ = 0D;
/**
*
* Weighted number of sequences that do not match the location constraint.
*
*
* double location_misses = 4;
* @return The locationMisses.
*/
@java.lang.Override
public double getLocationMisses() {
return locationMisses_;
}
public static final int TOKEN_STATISTICS_FIELD_NUMBER = 5;
private org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics tokenStatistics_;
/**
*
* Per-token weighted statistics.
*
*
* .tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics token_statistics = 5;
* @return Whether the tokenStatistics field is set.
*/
@java.lang.Override
public boolean hasTokenStatistics() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Per-token weighted statistics.
*
*
* .tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics token_statistics = 5;
* @return The tokenStatistics.
*/
@java.lang.Override
public org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics getTokenStatistics() {
return tokenStatistics_ == null ? org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics.getDefaultInstance() : tokenStatistics_;
}
/**
*
* Per-token weighted statistics.
*
*
* .tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics token_statistics = 5;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatisticsOrBuilder getTokenStatisticsOrBuilder() {
return tokenStatistics_ == null ? org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics.getDefaultInstance() : tokenStatistics_;
}
public static final int RANK_HISTOGRAM_FIELD_NUMBER = 6;
private org.tensorflow.metadata.v0.RankHistogram rankHistogram_;
/**
*
* The rank histogram with the weighted tokens for the feature.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 6;
* @return Whether the rankHistogram field is set.
*/
@java.lang.Override
public boolean hasRankHistogram() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* The rank histogram with the weighted tokens for the feature.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 6;
* @return The rankHistogram.
*/
@java.lang.Override
public org.tensorflow.metadata.v0.RankHistogram getRankHistogram() {
return rankHistogram_ == null ? org.tensorflow.metadata.v0.RankHistogram.getDefaultInstance() : rankHistogram_;
}
/**
*
* The rank histogram with the weighted tokens for the feature.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 6;
*/
@java.lang.Override
public org.tensorflow.metadata.v0.RankHistogramOrBuilder getRankHistogramOrBuilder() {
return rankHistogram_ == null ? org.tensorflow.metadata.v0.RankHistogram.getDefaultInstance() : rankHistogram_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (java.lang.Double.doubleToRawLongBits(featureCoverage_) != 0) {
output.writeDouble(1, featureCoverage_);
}
if (java.lang.Double.doubleToRawLongBits(avgTokenLength_) != 0) {
output.writeDouble(2, avgTokenLength_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(3, getTokenLengthHistogram());
}
if (java.lang.Double.doubleToRawLongBits(locationMisses_) != 0) {
output.writeDouble(4, locationMisses_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(5, getTokenStatistics());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(6, getRankHistogram());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(9, getSequenceLengthHistogram());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (java.lang.Double.doubleToRawLongBits(featureCoverage_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(1, featureCoverage_);
}
if (java.lang.Double.doubleToRawLongBits(avgTokenLength_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, avgTokenLength_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getTokenLengthHistogram());
}
if (java.lang.Double.doubleToRawLongBits(locationMisses_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(4, locationMisses_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getTokenStatistics());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getRankHistogram());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, getSequenceLengthHistogram());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics)) {
return super.equals(obj);
}
org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics other = (org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics) obj;
if (java.lang.Double.doubleToLongBits(getFeatureCoverage())
!= java.lang.Double.doubleToLongBits(
other.getFeatureCoverage())) return false;
if (java.lang.Double.doubleToLongBits(getAvgTokenLength())
!= java.lang.Double.doubleToLongBits(
other.getAvgTokenLength())) return false;
if (hasTokenLengthHistogram() != other.hasTokenLengthHistogram()) return false;
if (hasTokenLengthHistogram()) {
if (!getTokenLengthHistogram()
.equals(other.getTokenLengthHistogram())) return false;
}
if (hasSequenceLengthHistogram() != other.hasSequenceLengthHistogram()) return false;
if (hasSequenceLengthHistogram()) {
if (!getSequenceLengthHistogram()
.equals(other.getSequenceLengthHistogram())) return false;
}
if (java.lang.Double.doubleToLongBits(getLocationMisses())
!= java.lang.Double.doubleToLongBits(
other.getLocationMisses())) return false;
if (hasTokenStatistics() != other.hasTokenStatistics()) return false;
if (hasTokenStatistics()) {
if (!getTokenStatistics()
.equals(other.getTokenStatistics())) return false;
}
if (hasRankHistogram() != other.hasRankHistogram()) return false;
if (hasRankHistogram()) {
if (!getRankHistogram()
.equals(other.getRankHistogram())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + FEATURE_COVERAGE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getFeatureCoverage()));
hash = (37 * hash) + AVG_TOKEN_LENGTH_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getAvgTokenLength()));
if (hasTokenLengthHistogram()) {
hash = (37 * hash) + TOKEN_LENGTH_HISTOGRAM_FIELD_NUMBER;
hash = (53 * hash) + getTokenLengthHistogram().hashCode();
}
if (hasSequenceLengthHistogram()) {
hash = (37 * hash) + SEQUENCE_LENGTH_HISTOGRAM_FIELD_NUMBER;
hash = (53 * hash) + getSequenceLengthHistogram().hashCode();
}
hash = (37 * hash) + LOCATION_MISSES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getLocationMisses()));
if (hasTokenStatistics()) {
hash = (37 * hash) + TOKEN_STATISTICS_FIELD_NUMBER;
hash = (53 * hash) + getTokenStatistics().hashCode();
}
if (hasRankHistogram()) {
hash = (37 * hash) + RANK_HISTOGRAM_FIELD_NUMBER;
hash = (53 * hash) + getRankHistogram().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Statistics for a weighted feature with an NL domain.
*
*
* Protobuf type {@code tensorflow.metadata.v0.WeightedNaturalLanguageStatistics}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.metadata.v0.WeightedNaturalLanguageStatistics)
org.tensorflow.metadata.v0.WeightedNaturalLanguageStatisticsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_WeightedNaturalLanguageStatistics_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_WeightedNaturalLanguageStatistics_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics.class, org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics.Builder.class);
}
// Construct using org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTokenLengthHistogramFieldBuilder();
getSequenceLengthHistogramFieldBuilder();
getTokenStatisticsFieldBuilder();
getRankHistogramFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
featureCoverage_ = 0D;
avgTokenLength_ = 0D;
tokenLengthHistogram_ = null;
if (tokenLengthHistogramBuilder_ != null) {
tokenLengthHistogramBuilder_.dispose();
tokenLengthHistogramBuilder_ = null;
}
sequenceLengthHistogram_ = null;
if (sequenceLengthHistogramBuilder_ != null) {
sequenceLengthHistogramBuilder_.dispose();
sequenceLengthHistogramBuilder_ = null;
}
locationMisses_ = 0D;
tokenStatistics_ = null;
if (tokenStatisticsBuilder_ != null) {
tokenStatisticsBuilder_.dispose();
tokenStatisticsBuilder_ = null;
}
rankHistogram_ = null;
if (rankHistogramBuilder_ != null) {
rankHistogramBuilder_.dispose();
rankHistogramBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.metadata.v0.Statistics.internal_static_tensorflow_metadata_v0_WeightedNaturalLanguageStatistics_descriptor;
}
@java.lang.Override
public org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics getDefaultInstanceForType() {
return org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics build() {
org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics buildPartial() {
org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics result = new org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.featureCoverage_ = featureCoverage_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.avgTokenLength_ = avgTokenLength_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.tokenLengthHistogram_ = tokenLengthHistogramBuilder_ == null
? tokenLengthHistogram_
: tokenLengthHistogramBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.sequenceLengthHistogram_ = sequenceLengthHistogramBuilder_ == null
? sequenceLengthHistogram_
: sequenceLengthHistogramBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.locationMisses_ = locationMisses_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.tokenStatistics_ = tokenStatisticsBuilder_ == null
? tokenStatistics_
: tokenStatisticsBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.rankHistogram_ = rankHistogramBuilder_ == null
? rankHistogram_
: rankHistogramBuilder_.build();
to_bitField0_ |= 0x00000008;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics) {
return mergeFrom((org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics other) {
if (other == org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics.getDefaultInstance()) return this;
if (other.getFeatureCoverage() != 0D) {
setFeatureCoverage(other.getFeatureCoverage());
}
if (other.getAvgTokenLength() != 0D) {
setAvgTokenLength(other.getAvgTokenLength());
}
if (other.hasTokenLengthHistogram()) {
mergeTokenLengthHistogram(other.getTokenLengthHistogram());
}
if (other.hasSequenceLengthHistogram()) {
mergeSequenceLengthHistogram(other.getSequenceLengthHistogram());
}
if (other.getLocationMisses() != 0D) {
setLocationMisses(other.getLocationMisses());
}
if (other.hasTokenStatistics()) {
mergeTokenStatistics(other.getTokenStatistics());
}
if (other.hasRankHistogram()) {
mergeRankHistogram(other.getRankHistogram());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 9: {
featureCoverage_ = input.readDouble();
bitField0_ |= 0x00000001;
break;
} // case 9
case 17: {
avgTokenLength_ = input.readDouble();
bitField0_ |= 0x00000002;
break;
} // case 17
case 26: {
input.readMessage(
getTokenLengthHistogramFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 33: {
locationMisses_ = input.readDouble();
bitField0_ |= 0x00000010;
break;
} // case 33
case 42: {
input.readMessage(
getTokenStatisticsFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 42
case 50: {
input.readMessage(
getRankHistogramFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 50
case 74: {
input.readMessage(
getSequenceLengthHistogramFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 74
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private double featureCoverage_ ;
/**
*
* Weighted feature coverage.
*
*
* double feature_coverage = 1;
* @return The featureCoverage.
*/
@java.lang.Override
public double getFeatureCoverage() {
return featureCoverage_;
}
/**
*
* Weighted feature coverage.
*
*
* double feature_coverage = 1;
* @param value The featureCoverage to set.
* @return This builder for chaining.
*/
public Builder setFeatureCoverage(double value) {
featureCoverage_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Weighted feature coverage.
*
*
* double feature_coverage = 1;
* @return This builder for chaining.
*/
public Builder clearFeatureCoverage() {
bitField0_ = (bitField0_ & ~0x00000001);
featureCoverage_ = 0D;
onChanged();
return this;
}
private double avgTokenLength_ ;
/**
*
* Weighted average token length.
*
*
* double avg_token_length = 2;
* @return The avgTokenLength.
*/
@java.lang.Override
public double getAvgTokenLength() {
return avgTokenLength_;
}
/**
*
* Weighted average token length.
*
*
* double avg_token_length = 2;
* @param value The avgTokenLength to set.
* @return This builder for chaining.
*/
public Builder setAvgTokenLength(double value) {
avgTokenLength_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Weighted average token length.
*
*
* double avg_token_length = 2;
* @return This builder for chaining.
*/
public Builder clearAvgTokenLength() {
bitField0_ = (bitField0_ & ~0x00000002);
avgTokenLength_ = 0D;
onChanged();
return this;
}
private org.tensorflow.metadata.v0.Histogram tokenLengthHistogram_;
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.Histogram, org.tensorflow.metadata.v0.Histogram.Builder, org.tensorflow.metadata.v0.HistogramOrBuilder> tokenLengthHistogramBuilder_;
/**
*
* Histogram containing the distribution of token lengths.
*
*
* .tensorflow.metadata.v0.Histogram token_length_histogram = 3;
* @return Whether the tokenLengthHistogram field is set.
*/
public boolean hasTokenLengthHistogram() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Histogram containing the distribution of token lengths.
*
*
* .tensorflow.metadata.v0.Histogram token_length_histogram = 3;
* @return The tokenLengthHistogram.
*/
public org.tensorflow.metadata.v0.Histogram getTokenLengthHistogram() {
if (tokenLengthHistogramBuilder_ == null) {
return tokenLengthHistogram_ == null ? org.tensorflow.metadata.v0.Histogram.getDefaultInstance() : tokenLengthHistogram_;
} else {
return tokenLengthHistogramBuilder_.getMessage();
}
}
/**
*
* Histogram containing the distribution of token lengths.
*
*
* .tensorflow.metadata.v0.Histogram token_length_histogram = 3;
*/
public Builder setTokenLengthHistogram(org.tensorflow.metadata.v0.Histogram value) {
if (tokenLengthHistogramBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tokenLengthHistogram_ = value;
} else {
tokenLengthHistogramBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Histogram containing the distribution of token lengths.
*
*
* .tensorflow.metadata.v0.Histogram token_length_histogram = 3;
*/
public Builder setTokenLengthHistogram(
org.tensorflow.metadata.v0.Histogram.Builder builderForValue) {
if (tokenLengthHistogramBuilder_ == null) {
tokenLengthHistogram_ = builderForValue.build();
} else {
tokenLengthHistogramBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Histogram containing the distribution of token lengths.
*
*
* .tensorflow.metadata.v0.Histogram token_length_histogram = 3;
*/
public Builder mergeTokenLengthHistogram(org.tensorflow.metadata.v0.Histogram value) {
if (tokenLengthHistogramBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
tokenLengthHistogram_ != null &&
tokenLengthHistogram_ != org.tensorflow.metadata.v0.Histogram.getDefaultInstance()) {
getTokenLengthHistogramBuilder().mergeFrom(value);
} else {
tokenLengthHistogram_ = value;
}
} else {
tokenLengthHistogramBuilder_.mergeFrom(value);
}
if (tokenLengthHistogram_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
* Histogram containing the distribution of token lengths.
*
*
* .tensorflow.metadata.v0.Histogram token_length_histogram = 3;
*/
public Builder clearTokenLengthHistogram() {
bitField0_ = (bitField0_ & ~0x00000004);
tokenLengthHistogram_ = null;
if (tokenLengthHistogramBuilder_ != null) {
tokenLengthHistogramBuilder_.dispose();
tokenLengthHistogramBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Histogram containing the distribution of token lengths.
*
*
* .tensorflow.metadata.v0.Histogram token_length_histogram = 3;
*/
public org.tensorflow.metadata.v0.Histogram.Builder getTokenLengthHistogramBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getTokenLengthHistogramFieldBuilder().getBuilder();
}
/**
*
* Histogram containing the distribution of token lengths.
*
*
* .tensorflow.metadata.v0.Histogram token_length_histogram = 3;
*/
public org.tensorflow.metadata.v0.HistogramOrBuilder getTokenLengthHistogramOrBuilder() {
if (tokenLengthHistogramBuilder_ != null) {
return tokenLengthHistogramBuilder_.getMessageOrBuilder();
} else {
return tokenLengthHistogram_ == null ?
org.tensorflow.metadata.v0.Histogram.getDefaultInstance() : tokenLengthHistogram_;
}
}
/**
*
* Histogram containing the distribution of token lengths.
*
*
* .tensorflow.metadata.v0.Histogram token_length_histogram = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.Histogram, org.tensorflow.metadata.v0.Histogram.Builder, org.tensorflow.metadata.v0.HistogramOrBuilder>
getTokenLengthHistogramFieldBuilder() {
if (tokenLengthHistogramBuilder_ == null) {
tokenLengthHistogramBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.Histogram, org.tensorflow.metadata.v0.Histogram.Builder, org.tensorflow.metadata.v0.HistogramOrBuilder>(
getTokenLengthHistogram(),
getParentForChildren(),
isClean());
tokenLengthHistogram_ = null;
}
return tokenLengthHistogramBuilder_;
}
private org.tensorflow.metadata.v0.Histogram sequenceLengthHistogram_;
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.Histogram, org.tensorflow.metadata.v0.Histogram.Builder, org.tensorflow.metadata.v0.HistogramOrBuilder> sequenceLengthHistogramBuilder_;
/**
*
* Histogram containing the distribution of sequence lengths.
*
*
* .tensorflow.metadata.v0.Histogram sequence_length_histogram = 9;
* @return Whether the sequenceLengthHistogram field is set.
*/
public boolean hasSequenceLengthHistogram() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Histogram containing the distribution of sequence lengths.
*
*
* .tensorflow.metadata.v0.Histogram sequence_length_histogram = 9;
* @return The sequenceLengthHistogram.
*/
public org.tensorflow.metadata.v0.Histogram getSequenceLengthHistogram() {
if (sequenceLengthHistogramBuilder_ == null) {
return sequenceLengthHistogram_ == null ? org.tensorflow.metadata.v0.Histogram.getDefaultInstance() : sequenceLengthHistogram_;
} else {
return sequenceLengthHistogramBuilder_.getMessage();
}
}
/**
*
* Histogram containing the distribution of sequence lengths.
*
*
* .tensorflow.metadata.v0.Histogram sequence_length_histogram = 9;
*/
public Builder setSequenceLengthHistogram(org.tensorflow.metadata.v0.Histogram value) {
if (sequenceLengthHistogramBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sequenceLengthHistogram_ = value;
} else {
sequenceLengthHistogramBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Histogram containing the distribution of sequence lengths.
*
*
* .tensorflow.metadata.v0.Histogram sequence_length_histogram = 9;
*/
public Builder setSequenceLengthHistogram(
org.tensorflow.metadata.v0.Histogram.Builder builderForValue) {
if (sequenceLengthHistogramBuilder_ == null) {
sequenceLengthHistogram_ = builderForValue.build();
} else {
sequenceLengthHistogramBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Histogram containing the distribution of sequence lengths.
*
*
* .tensorflow.metadata.v0.Histogram sequence_length_histogram = 9;
*/
public Builder mergeSequenceLengthHistogram(org.tensorflow.metadata.v0.Histogram value) {
if (sequenceLengthHistogramBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
sequenceLengthHistogram_ != null &&
sequenceLengthHistogram_ != org.tensorflow.metadata.v0.Histogram.getDefaultInstance()) {
getSequenceLengthHistogramBuilder().mergeFrom(value);
} else {
sequenceLengthHistogram_ = value;
}
} else {
sequenceLengthHistogramBuilder_.mergeFrom(value);
}
if (sequenceLengthHistogram_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
* Histogram containing the distribution of sequence lengths.
*
*
* .tensorflow.metadata.v0.Histogram sequence_length_histogram = 9;
*/
public Builder clearSequenceLengthHistogram() {
bitField0_ = (bitField0_ & ~0x00000008);
sequenceLengthHistogram_ = null;
if (sequenceLengthHistogramBuilder_ != null) {
sequenceLengthHistogramBuilder_.dispose();
sequenceLengthHistogramBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Histogram containing the distribution of sequence lengths.
*
*
* .tensorflow.metadata.v0.Histogram sequence_length_histogram = 9;
*/
public org.tensorflow.metadata.v0.Histogram.Builder getSequenceLengthHistogramBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getSequenceLengthHistogramFieldBuilder().getBuilder();
}
/**
*
* Histogram containing the distribution of sequence lengths.
*
*
* .tensorflow.metadata.v0.Histogram sequence_length_histogram = 9;
*/
public org.tensorflow.metadata.v0.HistogramOrBuilder getSequenceLengthHistogramOrBuilder() {
if (sequenceLengthHistogramBuilder_ != null) {
return sequenceLengthHistogramBuilder_.getMessageOrBuilder();
} else {
return sequenceLengthHistogram_ == null ?
org.tensorflow.metadata.v0.Histogram.getDefaultInstance() : sequenceLengthHistogram_;
}
}
/**
*
* Histogram containing the distribution of sequence lengths.
*
*
* .tensorflow.metadata.v0.Histogram sequence_length_histogram = 9;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.Histogram, org.tensorflow.metadata.v0.Histogram.Builder, org.tensorflow.metadata.v0.HistogramOrBuilder>
getSequenceLengthHistogramFieldBuilder() {
if (sequenceLengthHistogramBuilder_ == null) {
sequenceLengthHistogramBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.Histogram, org.tensorflow.metadata.v0.Histogram.Builder, org.tensorflow.metadata.v0.HistogramOrBuilder>(
getSequenceLengthHistogram(),
getParentForChildren(),
isClean());
sequenceLengthHistogram_ = null;
}
return sequenceLengthHistogramBuilder_;
}
private double locationMisses_ ;
/**
*
* Weighted number of sequences that do not match the location constraint.
*
*
* double location_misses = 4;
* @return The locationMisses.
*/
@java.lang.Override
public double getLocationMisses() {
return locationMisses_;
}
/**
*
* Weighted number of sequences that do not match the location constraint.
*
*
* double location_misses = 4;
* @param value The locationMisses to set.
* @return This builder for chaining.
*/
public Builder setLocationMisses(double value) {
locationMisses_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Weighted number of sequences that do not match the location constraint.
*
*
* double location_misses = 4;
* @return This builder for chaining.
*/
public Builder clearLocationMisses() {
bitField0_ = (bitField0_ & ~0x00000010);
locationMisses_ = 0D;
onChanged();
return this;
}
private org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics tokenStatistics_;
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics, org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics.Builder, org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatisticsOrBuilder> tokenStatisticsBuilder_;
/**
*
* Per-token weighted statistics.
*
*
* .tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics token_statistics = 5;
* @return Whether the tokenStatistics field is set.
*/
public boolean hasTokenStatistics() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Per-token weighted statistics.
*
*
* .tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics token_statistics = 5;
* @return The tokenStatistics.
*/
public org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics getTokenStatistics() {
if (tokenStatisticsBuilder_ == null) {
return tokenStatistics_ == null ? org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics.getDefaultInstance() : tokenStatistics_;
} else {
return tokenStatisticsBuilder_.getMessage();
}
}
/**
*
* Per-token weighted statistics.
*
*
* .tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics token_statistics = 5;
*/
public Builder setTokenStatistics(org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics value) {
if (tokenStatisticsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tokenStatistics_ = value;
} else {
tokenStatisticsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Per-token weighted statistics.
*
*
* .tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics token_statistics = 5;
*/
public Builder setTokenStatistics(
org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics.Builder builderForValue) {
if (tokenStatisticsBuilder_ == null) {
tokenStatistics_ = builderForValue.build();
} else {
tokenStatisticsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Per-token weighted statistics.
*
*
* .tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics token_statistics = 5;
*/
public Builder mergeTokenStatistics(org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics value) {
if (tokenStatisticsBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0) &&
tokenStatistics_ != null &&
tokenStatistics_ != org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics.getDefaultInstance()) {
getTokenStatisticsBuilder().mergeFrom(value);
} else {
tokenStatistics_ = value;
}
} else {
tokenStatisticsBuilder_.mergeFrom(value);
}
if (tokenStatistics_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
* Per-token weighted statistics.
*
*
* .tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics token_statistics = 5;
*/
public Builder clearTokenStatistics() {
bitField0_ = (bitField0_ & ~0x00000020);
tokenStatistics_ = null;
if (tokenStatisticsBuilder_ != null) {
tokenStatisticsBuilder_.dispose();
tokenStatisticsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Per-token weighted statistics.
*
*
* .tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics token_statistics = 5;
*/
public org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics.Builder getTokenStatisticsBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getTokenStatisticsFieldBuilder().getBuilder();
}
/**
*
* Per-token weighted statistics.
*
*
* .tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics token_statistics = 5;
*/
public org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatisticsOrBuilder getTokenStatisticsOrBuilder() {
if (tokenStatisticsBuilder_ != null) {
return tokenStatisticsBuilder_.getMessageOrBuilder();
} else {
return tokenStatistics_ == null ?
org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics.getDefaultInstance() : tokenStatistics_;
}
}
/**
*
* Per-token weighted statistics.
*
*
* .tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics token_statistics = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics, org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics.Builder, org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatisticsOrBuilder>
getTokenStatisticsFieldBuilder() {
if (tokenStatisticsBuilder_ == null) {
tokenStatisticsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics, org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatistics.Builder, org.tensorflow.metadata.v0.NaturalLanguageStatistics.TokenStatisticsOrBuilder>(
getTokenStatistics(),
getParentForChildren(),
isClean());
tokenStatistics_ = null;
}
return tokenStatisticsBuilder_;
}
private org.tensorflow.metadata.v0.RankHistogram rankHistogram_;
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.RankHistogram, org.tensorflow.metadata.v0.RankHistogram.Builder, org.tensorflow.metadata.v0.RankHistogramOrBuilder> rankHistogramBuilder_;
/**
*
* The rank histogram with the weighted tokens for the feature.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 6;
* @return Whether the rankHistogram field is set.
*/
public boolean hasRankHistogram() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* The rank histogram with the weighted tokens for the feature.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 6;
* @return The rankHistogram.
*/
public org.tensorflow.metadata.v0.RankHistogram getRankHistogram() {
if (rankHistogramBuilder_ == null) {
return rankHistogram_ == null ? org.tensorflow.metadata.v0.RankHistogram.getDefaultInstance() : rankHistogram_;
} else {
return rankHistogramBuilder_.getMessage();
}
}
/**
*
* The rank histogram with the weighted tokens for the feature.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 6;
*/
public Builder setRankHistogram(org.tensorflow.metadata.v0.RankHistogram value) {
if (rankHistogramBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
rankHistogram_ = value;
} else {
rankHistogramBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* The rank histogram with the weighted tokens for the feature.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 6;
*/
public Builder setRankHistogram(
org.tensorflow.metadata.v0.RankHistogram.Builder builderForValue) {
if (rankHistogramBuilder_ == null) {
rankHistogram_ = builderForValue.build();
} else {
rankHistogramBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* The rank histogram with the weighted tokens for the feature.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 6;
*/
public Builder mergeRankHistogram(org.tensorflow.metadata.v0.RankHistogram value) {
if (rankHistogramBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0) &&
rankHistogram_ != null &&
rankHistogram_ != org.tensorflow.metadata.v0.RankHistogram.getDefaultInstance()) {
getRankHistogramBuilder().mergeFrom(value);
} else {
rankHistogram_ = value;
}
} else {
rankHistogramBuilder_.mergeFrom(value);
}
if (rankHistogram_ != null) {
bitField0_ |= 0x00000040;
onChanged();
}
return this;
}
/**
*
* The rank histogram with the weighted tokens for the feature.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 6;
*/
public Builder clearRankHistogram() {
bitField0_ = (bitField0_ & ~0x00000040);
rankHistogram_ = null;
if (rankHistogramBuilder_ != null) {
rankHistogramBuilder_.dispose();
rankHistogramBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The rank histogram with the weighted tokens for the feature.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 6;
*/
public org.tensorflow.metadata.v0.RankHistogram.Builder getRankHistogramBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getRankHistogramFieldBuilder().getBuilder();
}
/**
*
* The rank histogram with the weighted tokens for the feature.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 6;
*/
public org.tensorflow.metadata.v0.RankHistogramOrBuilder getRankHistogramOrBuilder() {
if (rankHistogramBuilder_ != null) {
return rankHistogramBuilder_.getMessageOrBuilder();
} else {
return rankHistogram_ == null ?
org.tensorflow.metadata.v0.RankHistogram.getDefaultInstance() : rankHistogram_;
}
}
/**
*
* The rank histogram with the weighted tokens for the feature.
*
*
* .tensorflow.metadata.v0.RankHistogram rank_histogram = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.RankHistogram, org.tensorflow.metadata.v0.RankHistogram.Builder, org.tensorflow.metadata.v0.RankHistogramOrBuilder>
getRankHistogramFieldBuilder() {
if (rankHistogramBuilder_ == null) {
rankHistogramBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.tensorflow.metadata.v0.RankHistogram, org.tensorflow.metadata.v0.RankHistogram.Builder, org.tensorflow.metadata.v0.RankHistogramOrBuilder>(
getRankHistogram(),
getParentForChildren(),
isClean());
rankHistogram_ = null;
}
return rankHistogramBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tensorflow.metadata.v0.WeightedNaturalLanguageStatistics)
}
// @@protoc_insertion_point(class_scope:tensorflow.metadata.v0.WeightedNaturalLanguageStatistics)
private static final org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics();
}
public static org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public WeightedNaturalLanguageStatistics parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.tensorflow.metadata.v0.WeightedNaturalLanguageStatistics getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy