Package sentencepiece
Class SentencepieceModel.NormalizerSpec.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<SentencepieceModel.NormalizerSpec,SentencepieceModel.NormalizerSpec.Builder>
-
- sentencepiece.SentencepieceModel.NormalizerSpec.Builder
-
- All Implemented Interfaces:
com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<SentencepieceModel.NormalizerSpec>
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,java.lang.Cloneable
,SentencepieceModel.NormalizerSpecOrBuilder
- Enclosing class:
- SentencepieceModel.NormalizerSpec
public static final class SentencepieceModel.NormalizerSpec.Builder extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<SentencepieceModel.NormalizerSpec,SentencepieceModel.NormalizerSpec.Builder> implements SentencepieceModel.NormalizerSpecOrBuilder
NormalizerSpec encodes a various parameters for string normalizaiton
Protobuf typesentencepiece.NormalizerSpec
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <Type> SentencepieceModel.NormalizerSpec.Builder
addExtension(com.google.protobuf.GeneratedMessage.GeneratedExtension<SentencepieceModel.NormalizerSpec,java.util.List<Type>> extension, Type value)
SentencepieceModel.NormalizerSpec.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
SentencepieceModel.NormalizerSpec
build()
SentencepieceModel.NormalizerSpec
buildPartial()
SentencepieceModel.NormalizerSpec.Builder
clear()
SentencepieceModel.NormalizerSpec.Builder
clearAddDummyPrefix()
Adds dummy whitespace at the beginning of text in order to treat "world" in "world" and "hello world" in the same way.SentencepieceModel.NormalizerSpec.Builder
clearEscapeWhitespaces()
Replaces whitespace with meta symbol.<Type> SentencepieceModel.NormalizerSpec.Builder
clearExtension(com.google.protobuf.GeneratedMessage.GeneratedExtension<SentencepieceModel.NormalizerSpec,?> extension)
SentencepieceModel.NormalizerSpec.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
SentencepieceModel.NormalizerSpec.Builder
clearName()
name of normalization rule.SentencepieceModel.NormalizerSpec.Builder
clearNormalizationRuleTsv()
Custom normalization rule file in TSV format.SentencepieceModel.NormalizerSpec.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
SentencepieceModel.NormalizerSpec.Builder
clearPrecompiledCharsmap()
Pre-compiled normalization rule created by Builder::GetPrecompiledCharsMap() or Builder::CompileCharsMap() method.SentencepieceModel.NormalizerSpec.Builder
clearRemoveExtraWhitespaces()
Removes leading, trailing, and duplicate internal whitespace.SentencepieceModel.NormalizerSpec.Builder
clone()
boolean
getAddDummyPrefix()
Adds dummy whitespace at the beginning of text in order to treat "world" in "world" and "hello world" in the same way.SentencepieceModel.NormalizerSpec
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
boolean
getEscapeWhitespaces()
Replaces whitespace with meta symbol.java.lang.String
getName()
name of normalization rule.com.google.protobuf.ByteString
getNameBytes()
name of normalization rule.java.lang.String
getNormalizationRuleTsv()
Custom normalization rule file in TSV format.com.google.protobuf.ByteString
getNormalizationRuleTsvBytes()
Custom normalization rule file in TSV format.com.google.protobuf.ByteString
getPrecompiledCharsmap()
Pre-compiled normalization rule created by Builder::GetPrecompiledCharsMap() or Builder::CompileCharsMap() method.boolean
getRemoveExtraWhitespaces()
Removes leading, trailing, and duplicate internal whitespace.boolean
hasAddDummyPrefix()
Adds dummy whitespace at the beginning of text in order to treat "world" in "world" and "hello world" in the same way.boolean
hasEscapeWhitespaces()
Replaces whitespace with meta symbol.boolean
hasName()
name of normalization rule.boolean
hasNormalizationRuleTsv()
Custom normalization rule file in TSV format.boolean
hasPrecompiledCharsmap()
Pre-compiled normalization rule created by Builder::GetPrecompiledCharsMap() or Builder::CompileCharsMap() method.boolean
hasRemoveExtraWhitespaces()
Removes leading, trailing, and duplicate internal whitespace.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
SentencepieceModel.NormalizerSpec.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
SentencepieceModel.NormalizerSpec.Builder
mergeFrom(com.google.protobuf.Message other)
SentencepieceModel.NormalizerSpec.Builder
mergeFrom(SentencepieceModel.NormalizerSpec other)
SentencepieceModel.NormalizerSpec.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
SentencepieceModel.NormalizerSpec.Builder
setAddDummyPrefix(boolean value)
Adds dummy whitespace at the beginning of text in order to treat "world" in "world" and "hello world" in the same way.SentencepieceModel.NormalizerSpec.Builder
setEscapeWhitespaces(boolean value)
Replaces whitespace with meta symbol.<Type> SentencepieceModel.NormalizerSpec.Builder
setExtension(com.google.protobuf.GeneratedMessage.GeneratedExtension<SentencepieceModel.NormalizerSpec,java.util.List<Type>> extension, int index, Type value)
<Type> SentencepieceModel.NormalizerSpec.Builder
setExtension(com.google.protobuf.GeneratedMessage.GeneratedExtension<SentencepieceModel.NormalizerSpec,Type> extension, Type value)
SentencepieceModel.NormalizerSpec.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
SentencepieceModel.NormalizerSpec.Builder
setName(java.lang.String value)
name of normalization rule.SentencepieceModel.NormalizerSpec.Builder
setNameBytes(com.google.protobuf.ByteString value)
name of normalization rule.SentencepieceModel.NormalizerSpec.Builder
setNormalizationRuleTsv(java.lang.String value)
Custom normalization rule file in TSV format.SentencepieceModel.NormalizerSpec.Builder
setNormalizationRuleTsvBytes(com.google.protobuf.ByteString value)
Custom normalization rule file in TSV format.SentencepieceModel.NormalizerSpec.Builder
setPrecompiledCharsmap(com.google.protobuf.ByteString value)
Pre-compiled normalization rule created by Builder::GetPrecompiledCharsMap() or Builder::CompileCharsMap() method.SentencepieceModel.NormalizerSpec.Builder
setRemoveExtraWhitespaces(boolean value)
Removes leading, trailing, and duplicate internal whitespace.SentencepieceModel.NormalizerSpec.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
SentencepieceModel.NormalizerSpec.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.ExtendableBuilder
addExtension, addExtension, clearExtension, clearExtension, extensionsAreInitialized, getAllFields, getExtension, getExtension, getExtension, getExtension, getExtension, getExtension, getExtensionCount, getExtensionCount, getExtensionCount, getField, getFieldBuilder, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, hasExtension, hasExtension, hasExtension, hasField, mergeExtensionFields, newBuilderForField, setExtension, setExtension, setExtension, setExtension
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getOneofFieldDescriptor, getParentForChildren, getUnknownFields, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, onBuilt, onChanged, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<SentencepieceModel.NormalizerSpec.Builder>
-
clear
public SentencepieceModel.NormalizerSpec.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<SentencepieceModel.NormalizerSpec,SentencepieceModel.NormalizerSpec.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<SentencepieceModel.NormalizerSpec.Builder>
-
getDefaultInstanceForType
public SentencepieceModel.NormalizerSpec getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<SentencepieceModel.NormalizerSpec>
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public SentencepieceModel.NormalizerSpec build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public SentencepieceModel.NormalizerSpec buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public SentencepieceModel.NormalizerSpec.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<SentencepieceModel.NormalizerSpec.Builder>
-
setField
public SentencepieceModel.NormalizerSpec.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<SentencepieceModel.NormalizerSpec,SentencepieceModel.NormalizerSpec.Builder>
-
clearField
public SentencepieceModel.NormalizerSpec.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<SentencepieceModel.NormalizerSpec,SentencepieceModel.NormalizerSpec.Builder>
-
clearOneof
public SentencepieceModel.NormalizerSpec.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<SentencepieceModel.NormalizerSpec.Builder>
-
setRepeatedField
public SentencepieceModel.NormalizerSpec.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<SentencepieceModel.NormalizerSpec,SentencepieceModel.NormalizerSpec.Builder>
-
addRepeatedField
public SentencepieceModel.NormalizerSpec.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<SentencepieceModel.NormalizerSpec,SentencepieceModel.NormalizerSpec.Builder>
-
setExtension
public <Type> SentencepieceModel.NormalizerSpec.Builder setExtension(com.google.protobuf.GeneratedMessage.GeneratedExtension<SentencepieceModel.NormalizerSpec,Type> extension, Type value)
- Overrides:
setExtension
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<SentencepieceModel.NormalizerSpec,SentencepieceModel.NormalizerSpec.Builder>
-
setExtension
public <Type> SentencepieceModel.NormalizerSpec.Builder setExtension(com.google.protobuf.GeneratedMessage.GeneratedExtension<SentencepieceModel.NormalizerSpec,java.util.List<Type>> extension, int index, Type value)
- Overrides:
setExtension
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<SentencepieceModel.NormalizerSpec,SentencepieceModel.NormalizerSpec.Builder>
-
addExtension
public <Type> SentencepieceModel.NormalizerSpec.Builder addExtension(com.google.protobuf.GeneratedMessage.GeneratedExtension<SentencepieceModel.NormalizerSpec,java.util.List<Type>> extension, Type value)
- Overrides:
addExtension
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<SentencepieceModel.NormalizerSpec,SentencepieceModel.NormalizerSpec.Builder>
-
clearExtension
public <Type> SentencepieceModel.NormalizerSpec.Builder clearExtension(com.google.protobuf.GeneratedMessage.GeneratedExtension<SentencepieceModel.NormalizerSpec,?> extension)
- Overrides:
clearExtension
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<SentencepieceModel.NormalizerSpec,SentencepieceModel.NormalizerSpec.Builder>
-
mergeFrom
public SentencepieceModel.NormalizerSpec.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<SentencepieceModel.NormalizerSpec.Builder>
-
mergeFrom
public SentencepieceModel.NormalizerSpec.Builder mergeFrom(SentencepieceModel.NormalizerSpec other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<SentencepieceModel.NormalizerSpec,SentencepieceModel.NormalizerSpec.Builder>
-
mergeFrom
public SentencepieceModel.NormalizerSpec.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<SentencepieceModel.NormalizerSpec.Builder>
- Throws:
java.io.IOException
-
hasName
public boolean hasName()
name of normalization rule.
optional string name = 1;
- Specified by:
hasName
in interfaceSentencepieceModel.NormalizerSpecOrBuilder
- Returns:
- Whether the name field is set.
-
getName
public java.lang.String getName()
name of normalization rule.
optional string name = 1;
- Specified by:
getName
in interfaceSentencepieceModel.NormalizerSpecOrBuilder
- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()
name of normalization rule.
optional string name = 1;
- Specified by:
getNameBytes
in interfaceSentencepieceModel.NormalizerSpecOrBuilder
- Returns:
- The bytes for name.
-
setName
public SentencepieceModel.NormalizerSpec.Builder setName(java.lang.String value)
name of normalization rule.
optional string name = 1;
- Parameters:
value
- The name to set.- Returns:
- This builder for chaining.
-
clearName
public SentencepieceModel.NormalizerSpec.Builder clearName()
name of normalization rule.
optional string name = 1;
- Returns:
- This builder for chaining.
-
setNameBytes
public SentencepieceModel.NormalizerSpec.Builder setNameBytes(com.google.protobuf.ByteString value)
name of normalization rule.
optional string name = 1;
- Parameters:
value
- The bytes for name to set.- Returns:
- This builder for chaining.
-
hasPrecompiledCharsmap
public boolean hasPrecompiledCharsmap()
Pre-compiled normalization rule created by Builder::GetPrecompiledCharsMap() or Builder::CompileCharsMap() method. Usually this field is set by Builder::GetNormalizerSpec() method.
optional bytes precompiled_charsmap = 2;
- Specified by:
hasPrecompiledCharsmap
in interfaceSentencepieceModel.NormalizerSpecOrBuilder
- Returns:
- Whether the precompiledCharsmap field is set.
-
getPrecompiledCharsmap
public com.google.protobuf.ByteString getPrecompiledCharsmap()
Pre-compiled normalization rule created by Builder::GetPrecompiledCharsMap() or Builder::CompileCharsMap() method. Usually this field is set by Builder::GetNormalizerSpec() method.
optional bytes precompiled_charsmap = 2;
- Specified by:
getPrecompiledCharsmap
in interfaceSentencepieceModel.NormalizerSpecOrBuilder
- Returns:
- The precompiledCharsmap.
-
setPrecompiledCharsmap
public SentencepieceModel.NormalizerSpec.Builder setPrecompiledCharsmap(com.google.protobuf.ByteString value)
Pre-compiled normalization rule created by Builder::GetPrecompiledCharsMap() or Builder::CompileCharsMap() method. Usually this field is set by Builder::GetNormalizerSpec() method.
optional bytes precompiled_charsmap = 2;
- Parameters:
value
- The precompiledCharsmap to set.- Returns:
- This builder for chaining.
-
clearPrecompiledCharsmap
public SentencepieceModel.NormalizerSpec.Builder clearPrecompiledCharsmap()
Pre-compiled normalization rule created by Builder::GetPrecompiledCharsMap() or Builder::CompileCharsMap() method. Usually this field is set by Builder::GetNormalizerSpec() method.
optional bytes precompiled_charsmap = 2;
- Returns:
- This builder for chaining.
-
hasAddDummyPrefix
public boolean hasAddDummyPrefix()
Adds dummy whitespace at the beginning of text in order to treat "world" in "world" and "hello world" in the same way.
optional bool add_dummy_prefix = 3 [default = true];
- Specified by:
hasAddDummyPrefix
in interfaceSentencepieceModel.NormalizerSpecOrBuilder
- Returns:
- Whether the addDummyPrefix field is set.
-
getAddDummyPrefix
public boolean getAddDummyPrefix()
Adds dummy whitespace at the beginning of text in order to treat "world" in "world" and "hello world" in the same way.
optional bool add_dummy_prefix = 3 [default = true];
- Specified by:
getAddDummyPrefix
in interfaceSentencepieceModel.NormalizerSpecOrBuilder
- Returns:
- The addDummyPrefix.
-
setAddDummyPrefix
public SentencepieceModel.NormalizerSpec.Builder setAddDummyPrefix(boolean value)
Adds dummy whitespace at the beginning of text in order to treat "world" in "world" and "hello world" in the same way.
optional bool add_dummy_prefix = 3 [default = true];
- Parameters:
value
- The addDummyPrefix to set.- Returns:
- This builder for chaining.
-
clearAddDummyPrefix
public SentencepieceModel.NormalizerSpec.Builder clearAddDummyPrefix()
Adds dummy whitespace at the beginning of text in order to treat "world" in "world" and "hello world" in the same way.
optional bool add_dummy_prefix = 3 [default = true];
- Returns:
- This builder for chaining.
-
hasRemoveExtraWhitespaces
public boolean hasRemoveExtraWhitespaces()
Removes leading, trailing, and duplicate internal whitespace.
optional bool remove_extra_whitespaces = 4 [default = true];
- Specified by:
hasRemoveExtraWhitespaces
in interfaceSentencepieceModel.NormalizerSpecOrBuilder
- Returns:
- Whether the removeExtraWhitespaces field is set.
-
getRemoveExtraWhitespaces
public boolean getRemoveExtraWhitespaces()
Removes leading, trailing, and duplicate internal whitespace.
optional bool remove_extra_whitespaces = 4 [default = true];
- Specified by:
getRemoveExtraWhitespaces
in interfaceSentencepieceModel.NormalizerSpecOrBuilder
- Returns:
- The removeExtraWhitespaces.
-
setRemoveExtraWhitespaces
public SentencepieceModel.NormalizerSpec.Builder setRemoveExtraWhitespaces(boolean value)
Removes leading, trailing, and duplicate internal whitespace.
optional bool remove_extra_whitespaces = 4 [default = true];
- Parameters:
value
- The removeExtraWhitespaces to set.- Returns:
- This builder for chaining.
-
clearRemoveExtraWhitespaces
public SentencepieceModel.NormalizerSpec.Builder clearRemoveExtraWhitespaces()
Removes leading, trailing, and duplicate internal whitespace.
optional bool remove_extra_whitespaces = 4 [default = true];
- Returns:
- This builder for chaining.
-
hasEscapeWhitespaces
public boolean hasEscapeWhitespaces()
Replaces whitespace with meta symbol. This field must be true to train sentence piece model.
optional bool escape_whitespaces = 5 [default = true];
- Specified by:
hasEscapeWhitespaces
in interfaceSentencepieceModel.NormalizerSpecOrBuilder
- Returns:
- Whether the escapeWhitespaces field is set.
-
getEscapeWhitespaces
public boolean getEscapeWhitespaces()
Replaces whitespace with meta symbol. This field must be true to train sentence piece model.
optional bool escape_whitespaces = 5 [default = true];
- Specified by:
getEscapeWhitespaces
in interfaceSentencepieceModel.NormalizerSpecOrBuilder
- Returns:
- The escapeWhitespaces.
-
setEscapeWhitespaces
public SentencepieceModel.NormalizerSpec.Builder setEscapeWhitespaces(boolean value)
Replaces whitespace with meta symbol. This field must be true to train sentence piece model.
optional bool escape_whitespaces = 5 [default = true];
- Parameters:
value
- The escapeWhitespaces to set.- Returns:
- This builder for chaining.
-
clearEscapeWhitespaces
public SentencepieceModel.NormalizerSpec.Builder clearEscapeWhitespaces()
Replaces whitespace with meta symbol. This field must be true to train sentence piece model.
optional bool escape_whitespaces = 5 [default = true];
- Returns:
- This builder for chaining.
-
hasNormalizationRuleTsv
public boolean hasNormalizationRuleTsv()
Custom normalization rule file in TSV format. https://github.com/google/sentencepiece/blob/master/doc/normalization.md This field is only used in SentencePieceTrainer::Train() method, which compiles the rule into the binary rule stored in `precompiled_charsmap`.
optional string normalization_rule_tsv = 6;
- Specified by:
hasNormalizationRuleTsv
in interfaceSentencepieceModel.NormalizerSpecOrBuilder
- Returns:
- Whether the normalizationRuleTsv field is set.
-
getNormalizationRuleTsv
public java.lang.String getNormalizationRuleTsv()
Custom normalization rule file in TSV format. https://github.com/google/sentencepiece/blob/master/doc/normalization.md This field is only used in SentencePieceTrainer::Train() method, which compiles the rule into the binary rule stored in `precompiled_charsmap`.
optional string normalization_rule_tsv = 6;
- Specified by:
getNormalizationRuleTsv
in interfaceSentencepieceModel.NormalizerSpecOrBuilder
- Returns:
- The normalizationRuleTsv.
-
getNormalizationRuleTsvBytes
public com.google.protobuf.ByteString getNormalizationRuleTsvBytes()
Custom normalization rule file in TSV format. https://github.com/google/sentencepiece/blob/master/doc/normalization.md This field is only used in SentencePieceTrainer::Train() method, which compiles the rule into the binary rule stored in `precompiled_charsmap`.
optional string normalization_rule_tsv = 6;
- Specified by:
getNormalizationRuleTsvBytes
in interfaceSentencepieceModel.NormalizerSpecOrBuilder
- Returns:
- The bytes for normalizationRuleTsv.
-
setNormalizationRuleTsv
public SentencepieceModel.NormalizerSpec.Builder setNormalizationRuleTsv(java.lang.String value)
Custom normalization rule file in TSV format. https://github.com/google/sentencepiece/blob/master/doc/normalization.md This field is only used in SentencePieceTrainer::Train() method, which compiles the rule into the binary rule stored in `precompiled_charsmap`.
optional string normalization_rule_tsv = 6;
- Parameters:
value
- The normalizationRuleTsv to set.- Returns:
- This builder for chaining.
-
clearNormalizationRuleTsv
public SentencepieceModel.NormalizerSpec.Builder clearNormalizationRuleTsv()
Custom normalization rule file in TSV format. https://github.com/google/sentencepiece/blob/master/doc/normalization.md This field is only used in SentencePieceTrainer::Train() method, which compiles the rule into the binary rule stored in `precompiled_charsmap`.
optional string normalization_rule_tsv = 6;
- Returns:
- This builder for chaining.
-
setNormalizationRuleTsvBytes
public SentencepieceModel.NormalizerSpec.Builder setNormalizationRuleTsvBytes(com.google.protobuf.ByteString value)
Custom normalization rule file in TSV format. https://github.com/google/sentencepiece/blob/master/doc/normalization.md This field is only used in SentencePieceTrainer::Train() method, which compiles the rule into the binary rule stored in `precompiled_charsmap`.
optional string normalization_rule_tsv = 6;
- Parameters:
value
- The bytes for normalizationRuleTsv to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final SentencepieceModel.NormalizerSpec.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<SentencepieceModel.NormalizerSpec.Builder>
-
mergeUnknownFields
public final SentencepieceModel.NormalizerSpec.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<SentencepieceModel.NormalizerSpec.Builder>
-
-