// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: sentencepiece_model.proto
// Protobuf C++ Version: 7.35.1

#include "sentencepiece_model.pb.h"

#include <algorithm>
#include <type_traits>
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/generated_message_tctable_impl.h"
#include "google/protobuf/internal_visibility.h"
#include "google/protobuf/extension_set.h"
#include "google/protobuf/generated_message_util.h"
#include "google/protobuf/wire_format_lite.h"
#include "google/protobuf/io/zero_copy_stream_impl_lite.h"
// @@protoc_insertion_point(includes)

// Must be included last.
#include "google/protobuf/port_def.inc"
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::google::protobuf;
namespace _pbi = ::google::protobuf::internal;
namespace _fl = ::google::protobuf::internal::field_layout;
namespace sentencepiece {
class TrainerSpec::_Internal {
 public:
  using HasBits = decltype(::std::declval<TrainerSpec>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_._has_bits_);
};

constexpr TrainerSpec::ParseTableT_ TrainerSpec::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_._has_bits_),
      PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_._extensions_),
      54, 248,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      469762432,  // skipmap
      offsetof(ParseTableT_, field_entries),
      46,  // num_field_entries
      1,  // num_aux_entries
      offsetof(ParseTableT_, aux_entries),
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::sentencepiece::TrainerSpec>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // repeated string input = 1;
      {::_pbi::TcParser::FastBR1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.input_)}},
      // optional string model_prefix = 2;
      {::_pbi::TcParser::FastBS1,
       {18, 4, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.model_prefix_)}},
      // optional .sentencepiece.TrainerSpec.ModelType model_type = 3 [default = UNIGRAM];
      {::_pbi::TcParser::FastEr1S1,
       {24, 15, 4,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.model_type_)}},
      // optional int32 vocab_size = 4 [default = 8000];
      {::_pbi::TcParser::FastV32S1,
       {32, 16, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.vocab_size_)}},
      // repeated string accept_language = 5;
      {::_pbi::TcParser::FastBR1,
       {42, 1, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.accept_language_)}},
      // optional int32 self_test_sample_size = 6 [default = 0];
      {::_pbi::TcParser::FastV32S1,
       {48, 8, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.self_test_sample_size_)}},
      // optional string input_format = 7;
      {::_pbi::TcParser::FastBS1,
       {58, 5, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.input_format_)}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
      // optional float character_coverage = 10 [default = 0.9995];
      {::_pbi::TcParser::FastF32S1,
       {85, 17, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.character_coverage_)}},
      // optional uint64 input_sentence_size = 11 [default = 0];
      {::_pbi::TcParser::FastV64S1,
       {88, 10, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.input_sentence_size_)}},
      // optional int32 mining_sentence_size = 12 [deprecated = true];
      {::_pbi::TcParser::FastV32S1,
       {96, 9, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.mining_sentence_size_)}},
      // optional int32 training_sentence_size = 13 [deprecated = true];
      {::_pbi::TcParser::FastV32S1,
       {104, 11, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.training_sentence_size_)}},
      // optional int32 seed_sentencepiece_size = 14 [default = 1000000];
      {::_pbi::TcParser::FastV32S1,
       {112, 18, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.seed_sentencepiece_size_)}},
      // optional float shrinking_factor = 15 [default = 0.75];
      {::_pbi::TcParser::FastF32S1,
       {125, 19, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.shrinking_factor_)}},
      // optional int32 num_threads = 16 [default = 16];
      {::_pbi::TcParser::FastV32S2,
       {384, 20, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.num_threads_)}},
      // optional int32 num_sub_iterations = 17 [default = 2];
      {::_pbi::TcParser::FastV32S2,
       {392, 21, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.num_sub_iterations_)}},
      // optional int32 max_sentence_length = 18 [default = 4192];
      {::_pbi::TcParser::FastV32S2,
       {400, 22, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.max_sentence_length_)}},
      // optional bool shuffle_input_sentence = 19 [default = true];
      {::_pbi::TcParser::FastV8S2,
       {408, 24, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.shuffle_input_sentence_)}},
      // optional int32 max_sentencepiece_length = 20 [default = 16];
      {::_pbi::TcParser::FastV32S2,
       {416, 23, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.max_sentencepiece_length_)}},
      // optional bool split_by_unicode_script = 21 [default = true];
      {::_pbi::TcParser::FastV8S2,
       {424, 25, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.split_by_unicode_script_)}},
      // optional bool split_by_whitespace = 22 [default = true];
      {::_pbi::TcParser::FastV8S2,
       {432, 26, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.split_by_whitespace_)}},
      // optional bool split_by_number = 23 [default = true];
      {::_pbi::TcParser::FastV8S2,
       {440, 27, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.split_by_number_)}},
      // optional bool treat_whitespace_as_suffix = 24 [default = false];
      {::_pbi::TcParser::FastV8S2,
       {448, 12, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.treat_whitespace_as_suffix_)}},
      // optional bool split_digits = 25 [default = false];
      {::_pbi::TcParser::FastV8S2,
       {456, 13, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.split_digits_)}},
      // optional bool allow_whitespace_only_pieces = 26 [default = false];
      {::_pbi::TcParser::FastV8S2,
       {464, 14, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.allow_whitespace_only_pieces_)}},
      // optional int32 pad_id = 43 [default = -1];
      {::_pbi::TcParser::FastV32S2,
       {728, 28, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.pad_id_)}},
      // optional string unk_surface = 44 [default = " \342\201\207 "];
      {::_pbi::TcParser::FastBS2,
       {738, 6, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.unk_surface_)}},
      // optional string unk_piece = 45 [default = "<unk>"];
      {::_pbi::TcParser::FastBS2,
       {746, 7, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.unk_piece_)}},
      // repeated string control_symbols = 30;
      {::_pbi::TcParser::FastBR2,
       {498, 2, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.control_symbols_)}},
      // repeated string user_defined_symbols = 31;
      {::_pbi::TcParser::FastBR2,
       {506, 3, 0,
        PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.user_defined_symbols_)}},
    }}, {{
      33, 0, 2,
      112, 27,
      65472, 40,
      65535, 65535
    }}, {{
      // repeated string input = 1;
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.input_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kBytes | ::_fl::kRepSString)},
      // optional string model_prefix = 2;
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.model_prefix_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional .sentencepiece.TrainerSpec.ModelType model_type = 3 [default = UNIGRAM];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.model_type_), _Internal::kHasBitsOffset + 15, 0, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
      // optional int32 vocab_size = 4 [default = 8000];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.vocab_size_), _Internal::kHasBitsOffset + 16, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
      // repeated string accept_language = 5;
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.accept_language_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kBytes | ::_fl::kRepSString)},
      // optional int32 self_test_sample_size = 6 [default = 0];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.self_test_sample_size_), _Internal::kHasBitsOffset + 8, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
      // optional string input_format = 7;
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.input_format_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional float character_coverage = 10 [default = 0.9995];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.character_coverage_), _Internal::kHasBitsOffset + 17, 0, (0 | ::_fl::kFcOptional | ::_fl::kFloat)},
      // optional uint64 input_sentence_size = 11 [default = 0];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.input_sentence_size_), _Internal::kHasBitsOffset + 10, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)},
      // optional int32 mining_sentence_size = 12 [deprecated = true];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.mining_sentence_size_), _Internal::kHasBitsOffset + 9, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
      // optional int32 training_sentence_size = 13 [deprecated = true];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.training_sentence_size_), _Internal::kHasBitsOffset + 11, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
      // optional int32 seed_sentencepiece_size = 14 [default = 1000000];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.seed_sentencepiece_size_), _Internal::kHasBitsOffset + 18, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
      // optional float shrinking_factor = 15 [default = 0.75];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.shrinking_factor_), _Internal::kHasBitsOffset + 19, 0, (0 | ::_fl::kFcOptional | ::_fl::kFloat)},
      // optional int32 num_threads = 16 [default = 16];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.num_threads_), _Internal::kHasBitsOffset + 20, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
      // optional int32 num_sub_iterations = 17 [default = 2];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.num_sub_iterations_), _Internal::kHasBitsOffset + 21, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
      // optional int32 max_sentence_length = 18 [default = 4192];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.max_sentence_length_), _Internal::kHasBitsOffset + 22, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
      // optional bool shuffle_input_sentence = 19 [default = true];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.shuffle_input_sentence_), _Internal::kHasBitsOffset + 24, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional int32 max_sentencepiece_length = 20 [default = 16];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.max_sentencepiece_length_), _Internal::kHasBitsOffset + 23, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
      // optional bool split_by_unicode_script = 21 [default = true];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.split_by_unicode_script_), _Internal::kHasBitsOffset + 25, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional bool split_by_whitespace = 22 [default = true];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.split_by_whitespace_), _Internal::kHasBitsOffset + 26, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional bool split_by_number = 23 [default = true];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.split_by_number_), _Internal::kHasBitsOffset + 27, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional bool treat_whitespace_as_suffix = 24 [default = false];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.treat_whitespace_as_suffix_), _Internal::kHasBitsOffset + 12, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional bool split_digits = 25 [default = false];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.split_digits_), _Internal::kHasBitsOffset + 13, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional bool allow_whitespace_only_pieces = 26 [default = false];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.allow_whitespace_only_pieces_), _Internal::kHasBitsOffset + 14, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // repeated string control_symbols = 30;
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.control_symbols_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcRepeated | ::_fl::kBytes | ::_fl::kRepSString)},
      // repeated string user_defined_symbols = 31;
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.user_defined_symbols_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcRepeated | ::_fl::kBytes | ::_fl::kRepSString)},
      // optional bool vocabulary_output_piece_score = 32 [default = true];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.vocabulary_output_piece_score_), _Internal::kHasBitsOffset + 43, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional bool hard_vocab_limit = 33 [default = true];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.hard_vocab_limit_), _Internal::kHasBitsOffset + 44, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional bool use_all_vocab = 34 [default = false];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.use_all_vocab_), _Internal::kHasBitsOffset + 36, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional bool byte_fallback = 35 [default = false];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.byte_fallback_), _Internal::kHasBitsOffset + 37, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional string required_chars = 36;
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.required_chars_), _Internal::kHasBitsOffset + 29, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional int32 unk_id = 40 [default = 0];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.unk_id_), _Internal::kHasBitsOffset + 35, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
      // optional int32 bos_id = 41 [default = 1];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.bos_id_), _Internal::kHasBitsOffset + 45, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
      // optional int32 eos_id = 42 [default = 2];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.eos_id_), _Internal::kHasBitsOffset + 42, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
      // optional int32 pad_id = 43 [default = -1];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.pad_id_), _Internal::kHasBitsOffset + 28, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
      // optional string unk_surface = 44 [default = " \342\201\207 "];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.unk_surface_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional string unk_piece = 45 [default = "<unk>"];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.unk_piece_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional string bos_piece = 46 [default = "<s>"];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.bos_piece_), _Internal::kHasBitsOffset + 30, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional string eos_piece = 47 [default = "</s>"];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.eos_piece_), _Internal::kHasBitsOffset + 31, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional string pad_piece = 48 [default = "<pad>"];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.pad_piece_), _Internal::kHasBitsOffset + 32, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional bool train_extremely_large_corpus = 49 [default = false];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.train_extremely_large_corpus_), _Internal::kHasBitsOffset + 38, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional bool enable_differential_privacy = 50 [default = false];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.enable_differential_privacy_), _Internal::kHasBitsOffset + 39, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional float differential_privacy_noise_level = 51 [default = 0];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.differential_privacy_noise_level_), _Internal::kHasBitsOffset + 41, 0, (0 | ::_fl::kFcOptional | ::_fl::kFloat)},
      // optional uint64 differential_privacy_clipping_threshold = 52 [default = 0];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.differential_privacy_clipping_threshold_), _Internal::kHasBitsOffset + 40, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)},
      // optional string pretokenization_delimiter = 53 [default = ""];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.pretokenization_delimiter_), _Internal::kHasBitsOffset + 33, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional string seed_sentencepieces_file = 54 [default = ""];
      {PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.seed_sentencepieces_file_), _Internal::kHasBitsOffset + 34, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
    }},
    {{
        {1, 4},
    }},
    {{
    }},
  };
}


inline constexpr TrainerSpec::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        input_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::sentencepiece::TrainerSpec,
            PROTOBUF_FIELD_OFFSET(::sentencepiece::TrainerSpec, _impl_.input_)>()
         }
        ,
        accept_language_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::sentencepiece::TrainerSpec,
            PROTOBUF_FIELD_OFFSET(::sentencepiece::TrainerSpec, _impl_.accept_language_)>()
         }
        ,
        control_symbols_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::sentencepiece::TrainerSpec,
            PROTOBUF_FIELD_OFFSET(::sentencepiece::TrainerSpec, _impl_.control_symbols_)>()
         }
        ,
        user_defined_symbols_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::sentencepiece::TrainerSpec,
            PROTOBUF_FIELD_OFFSET(::sentencepiece::TrainerSpec, _impl_.user_defined_symbols_)>()
         }
        ,
        model_prefix_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        input_format_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        unk_surface_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        unk_piece_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        self_test_sample_size_{0},
        mining_sentence_size_{0},
        input_sentence_size_{::uint64_t{0u}},
        training_sentence_size_{0},
        treat_whitespace_as_suffix_{false},
        split_digits_{false},
        allow_whitespace_only_pieces_{false},
        model_type_{static_cast< ::sentencepiece::TrainerSpec_ModelType >(1)},
        vocab_size_{8000},
        character_coverage_{0.9995f},
        seed_sentencepiece_size_{1000000},
        shrinking_factor_{0.75f},
        num_threads_{16},
        num_sub_iterations_{2},
        max_sentence_length_{4192},
        max_sentencepiece_length_{16},
        shuffle_input_sentence_{true},
        split_by_unicode_script_{true},
        split_by_whitespace_{true},
        split_by_number_{true},
        pad_id_{-1},
        required_chars_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        bos_piece_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        eos_piece_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        pad_piece_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        pretokenization_delimiter_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        seed_sentencepieces_file_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        unk_id_{0},
        use_all_vocab_{false},
        byte_fallback_{false},
        train_extremely_large_corpus_{false},
        enable_differential_privacy_{false},
        differential_privacy_clipping_threshold_{::uint64_t{0u}},
        differential_privacy_noise_level_{0},
        eos_id_{2},
        vocabulary_output_piece_score_{true},
        hard_vocab_limit_{true},
        bos_id_{1} {}

template <typename>
constexpr TrainerSpec::TrainerSpec(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::MessageLite(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL TrainerSpec::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) TrainerSpec(arena);
}
constexpr auto TrainerSpec::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(TrainerSpec), alignof(TrainerSpec));
}
constexpr auto TrainerSpec::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataLite{
      {
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          TrainerSpec::IsInitializedImpl,
          &TrainerSpec::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<TrainerSpec>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &TrainerSpec::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<TrainerSpec>(), &TrainerSpec::ByteSizeLong,
              &TrainerSpec::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_._cached_size_),
          true,
      },
      "sentencepiece.TrainerSpec",
  };
}
struct TrainerSpecGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr TrainerSpecGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 TrainerSpec_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(TrainerSpec::InternalGenerateClassData_(
            _default, &TrainerSpec_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<TrainerSpec>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~TrainerSpecGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) TrainerSpec _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<TrainerSpec>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(TrainerSpecGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST TrainerSpecGlobalsTypeInternal TrainerSpec_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* TrainerSpec_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return TrainerSpec_globals_.GetClassData();
#else
  return TrainerSpec_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
class SelfTestData_Sample::_Internal {
 public:
  using HasBits = decltype(::std::declval<SelfTestData_Sample>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(SelfTestData_Sample, _impl_._has_bits_);
};

constexpr SelfTestData_Sample::ParseTableT_ SelfTestData_Sample::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(SelfTestData_Sample, _impl_._has_bits_),
      0, // no _extensions_
      2, 8,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967292,  // skipmap
      offsetof(ParseTableT_, field_entries),
      2,  // num_field_entries
      0,  // num_aux_entries
      offsetof(ParseTableT_, field_names),  // no aux_entries
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::sentencepiece::SelfTestData_Sample>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // optional string expected = 2;
      {::_pbi::TcParser::FastBS1,
       {18, 1, 0,
        PROTOBUF_FIELD_OFFSET(SelfTestData_Sample, _impl_.expected_)}},
      // optional string input = 1;
      {::_pbi::TcParser::FastBS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(SelfTestData_Sample, _impl_.input_)}},
    }}, {{
      65535, 65535
    }}, {{
      // optional string input = 1;
      {PROTOBUF_FIELD_OFFSET(SelfTestData_Sample, _impl_.input_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional string expected = 2;
      {PROTOBUF_FIELD_OFFSET(SelfTestData_Sample, _impl_.expected_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
    }},
    // no aux_entries
    {{
    }},
  };
}


inline constexpr SelfTestData_Sample::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        input_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        expected_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()) {}

template <typename>
constexpr SelfTestData_Sample::SelfTestData_Sample(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::MessageLite(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL SelfTestData_Sample::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) SelfTestData_Sample(arena);
}
constexpr auto SelfTestData_Sample::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(SelfTestData_Sample), alignof(SelfTestData_Sample));
}
constexpr auto SelfTestData_Sample::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataLite{
      {
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          nullptr,  // IsInitialized
          &SelfTestData_Sample::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<SelfTestData_Sample>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &SelfTestData_Sample::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<SelfTestData_Sample>(), &SelfTestData_Sample::ByteSizeLong,
              &SelfTestData_Sample::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(SelfTestData_Sample, _impl_._cached_size_),
          true,
      },
      "sentencepiece.SelfTestData.Sample",
  };
}
struct SelfTestData_SampleGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr SelfTestData_SampleGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 SelfTestData_Sample_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(SelfTestData_Sample::InternalGenerateClassData_(
            _default, &SelfTestData_Sample_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<SelfTestData_Sample>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~SelfTestData_SampleGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) SelfTestData_Sample _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<SelfTestData_Sample>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(SelfTestData_SampleGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST SelfTestData_SampleGlobalsTypeInternal SelfTestData_Sample_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* SelfTestData_Sample_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return SelfTestData_Sample_globals_.GetClassData();
#else
  return SelfTestData_Sample_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
class NormalizerSpec::_Internal {
 public:
  using HasBits = decltype(::std::declval<NormalizerSpec>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(NormalizerSpec, _impl_._has_bits_);
};

constexpr NormalizerSpec::ParseTableT_ NormalizerSpec::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(NormalizerSpec, _impl_._has_bits_),
      PROTOBUF_FIELD_OFFSET(NormalizerSpec, _impl_._extensions_),
      6, 56,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967232,  // skipmap
      offsetof(ParseTableT_, field_entries),
      6,  // num_field_entries
      0,  // num_aux_entries
      offsetof(ParseTableT_, field_names),  // no aux_entries
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::sentencepiece::NormalizerSpec>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // optional string name = 1;
      {::_pbi::TcParser::FastBS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(NormalizerSpec, _impl_.name_)}},
      // optional bytes precompiled_charsmap = 2;
      {::_pbi::TcParser::FastBS1,
       {18, 1, 0,
        PROTOBUF_FIELD_OFFSET(NormalizerSpec, _impl_.precompiled_charsmap_)}},
      // optional bool add_dummy_prefix = 3 [default = true];
      {::_pbi::TcParser::FastV8S1,
       {24, 3, 0,
        PROTOBUF_FIELD_OFFSET(NormalizerSpec, _impl_.add_dummy_prefix_)}},
      // optional bool remove_extra_whitespaces = 4 [default = true];
      {::_pbi::TcParser::FastV8S1,
       {32, 4, 0,
        PROTOBUF_FIELD_OFFSET(NormalizerSpec, _impl_.remove_extra_whitespaces_)}},
      // optional bool escape_whitespaces = 5 [default = true];
      {::_pbi::TcParser::FastV8S1,
       {40, 5, 0,
        PROTOBUF_FIELD_OFFSET(NormalizerSpec, _impl_.escape_whitespaces_)}},
      // optional string normalization_rule_tsv = 6;
      {::_pbi::TcParser::FastBS1,
       {50, 2, 0,
        PROTOBUF_FIELD_OFFSET(NormalizerSpec, _impl_.normalization_rule_tsv_)}},
      {::_pbi::TcParser::MiniParse, {}},
    }}, {{
      65535, 65535
    }}, {{
      // optional string name = 1;
      {PROTOBUF_FIELD_OFFSET(NormalizerSpec, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional bytes precompiled_charsmap = 2;
      {PROTOBUF_FIELD_OFFSET(NormalizerSpec, _impl_.precompiled_charsmap_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional bool add_dummy_prefix = 3 [default = true];
      {PROTOBUF_FIELD_OFFSET(NormalizerSpec, _impl_.add_dummy_prefix_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional bool remove_extra_whitespaces = 4 [default = true];
      {PROTOBUF_FIELD_OFFSET(NormalizerSpec, _impl_.remove_extra_whitespaces_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional bool escape_whitespaces = 5 [default = true];
      {PROTOBUF_FIELD_OFFSET(NormalizerSpec, _impl_.escape_whitespaces_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
      // optional string normalization_rule_tsv = 6;
      {PROTOBUF_FIELD_OFFSET(NormalizerSpec, _impl_.normalization_rule_tsv_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
    }},
    // no aux_entries
    {{
    }},
  };
}


inline constexpr NormalizerSpec::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        name_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        precompiled_charsmap_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        normalization_rule_tsv_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        add_dummy_prefix_{true},
        remove_extra_whitespaces_{true},
        escape_whitespaces_{true} {}

template <typename>
constexpr NormalizerSpec::NormalizerSpec(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::MessageLite(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL NormalizerSpec::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) NormalizerSpec(arena);
}
constexpr auto NormalizerSpec::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(NormalizerSpec), alignof(NormalizerSpec));
}
constexpr auto NormalizerSpec::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataLite{
      {
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          NormalizerSpec::IsInitializedImpl,
          &NormalizerSpec::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<NormalizerSpec>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &NormalizerSpec::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<NormalizerSpec>(), &NormalizerSpec::ByteSizeLong,
              &NormalizerSpec::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(NormalizerSpec, _impl_._cached_size_),
          true,
      },
      "sentencepiece.NormalizerSpec",
  };
}
struct NormalizerSpecGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr NormalizerSpecGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 NormalizerSpec_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(NormalizerSpec::InternalGenerateClassData_(
            _default, &NormalizerSpec_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<NormalizerSpec>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~NormalizerSpecGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) NormalizerSpec _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<NormalizerSpec>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(NormalizerSpecGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST NormalizerSpecGlobalsTypeInternal NormalizerSpec_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* NormalizerSpec_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return NormalizerSpec_globals_.GetClassData();
#else
  return NormalizerSpec_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
class ModelProto_SentencePiece::_Internal {
 public:
  using HasBits = decltype(::std::declval<ModelProto_SentencePiece>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(ModelProto_SentencePiece, _impl_._has_bits_);
};

constexpr ModelProto_SentencePiece::ParseTableT_ ModelProto_SentencePiece::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(ModelProto_SentencePiece, _impl_._has_bits_),
      PROTOBUF_FIELD_OFFSET(ModelProto_SentencePiece, _impl_._extensions_),
      3, 24,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967288,  // skipmap
      offsetof(ParseTableT_, field_entries),
      3,  // num_field_entries
      1,  // num_aux_entries
      offsetof(ParseTableT_, aux_entries),
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::sentencepiece::ModelProto_SentencePiece>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // optional string piece = 1;
      {::_pbi::TcParser::FastBS1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(ModelProto_SentencePiece, _impl_.piece_)}},
      // optional float score = 2;
      {::_pbi::TcParser::FastF32S1,
       {21, 1, 0,
        PROTOBUF_FIELD_OFFSET(ModelProto_SentencePiece, _impl_.score_)}},
      // optional .sentencepiece.ModelProto.SentencePiece.Type type = 3 [default = NORMAL];
      {::_pbi::TcParser::FastEr1S1,
       {24, 2, 6,
        PROTOBUF_FIELD_OFFSET(ModelProto_SentencePiece, _impl_.type_)}},
    }}, {{
      65535, 65535
    }}, {{
      // optional string piece = 1;
      {PROTOBUF_FIELD_OFFSET(ModelProto_SentencePiece, _impl_.piece_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
      // optional float score = 2;
      {PROTOBUF_FIELD_OFFSET(ModelProto_SentencePiece, _impl_.score_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kFloat)},
      // optional .sentencepiece.ModelProto.SentencePiece.Type type = 3 [default = NORMAL];
      {PROTOBUF_FIELD_OFFSET(ModelProto_SentencePiece, _impl_.type_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
    }},
    {{
        {1, 6},
    }},
    {{
    }},
  };
}


inline constexpr ModelProto_SentencePiece::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        piece_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        score_{0},
        type_{static_cast< ::sentencepiece::ModelProto_SentencePiece_Type >(1)} {}

template <typename>
constexpr ModelProto_SentencePiece::ModelProto_SentencePiece(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::MessageLite(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL ModelProto_SentencePiece::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) ModelProto_SentencePiece(arena);
}
constexpr auto ModelProto_SentencePiece::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(ModelProto_SentencePiece), alignof(ModelProto_SentencePiece));
}
constexpr auto ModelProto_SentencePiece::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataLite{
      {
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          ModelProto_SentencePiece::IsInitializedImpl,
          &ModelProto_SentencePiece::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<ModelProto_SentencePiece>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &ModelProto_SentencePiece::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<ModelProto_SentencePiece>(), &ModelProto_SentencePiece::ByteSizeLong,
              &ModelProto_SentencePiece::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(ModelProto_SentencePiece, _impl_._cached_size_),
          true,
      },
      "sentencepiece.ModelProto.SentencePiece",
  };
}
struct ModelProto_SentencePieceGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr ModelProto_SentencePieceGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 ModelProto_SentencePiece_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(ModelProto_SentencePiece::InternalGenerateClassData_(
            _default, &ModelProto_SentencePiece_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<ModelProto_SentencePiece>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~ModelProto_SentencePieceGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) ModelProto_SentencePiece _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<ModelProto_SentencePiece>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(ModelProto_SentencePieceGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST ModelProto_SentencePieceGlobalsTypeInternal ModelProto_SentencePiece_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* ModelProto_SentencePiece_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return ModelProto_SentencePiece_globals_.GetClassData();
#else
  return ModelProto_SentencePiece_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
class SelfTestData::_Internal {
 public:
  using HasBits = decltype(::std::declval<SelfTestData>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(SelfTestData, _impl_._has_bits_);
};

constexpr SelfTestData::ParseTableT_ SelfTestData::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(SelfTestData, _impl_._has_bits_),
      PROTOBUF_FIELD_OFFSET(SelfTestData, _impl_._extensions_),
      1, 0,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967294,  // skipmap
      offsetof(ParseTableT_, field_entries),
      1,  // num_field_entries
      1,  // num_aux_entries
      offsetof(ParseTableT_, aux_entries),
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::sentencepiece::SelfTestData>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // repeated .sentencepiece.SelfTestData.Sample samples = 1;
      {::_pbi::TcParser::FastMtR1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(SelfTestData, _impl_.samples_)}},
    }}, {{
      65535, 65535
    }}, {{
      // repeated .sentencepiece.SelfTestData.Sample samples = 1;
      {PROTOBUF_FIELD_OFFSET(SelfTestData, _impl_.samples_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::sentencepiece::SelfTestData_Sample>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::sentencepiece::SelfTestData_Sample_globals_},
        #endif
    }},
    {{
    }},
  };
}


inline constexpr SelfTestData::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        samples_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::sentencepiece::SelfTestData,
            PROTOBUF_FIELD_OFFSET(::sentencepiece::SelfTestData, _impl_.samples_)>()
         }
     {}

template <typename>
constexpr SelfTestData::SelfTestData(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::MessageLite(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL SelfTestData::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) SelfTestData(arena);
}
constexpr auto SelfTestData::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(SelfTestData), alignof(SelfTestData));
}
constexpr auto SelfTestData::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataLite{
      {
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          SelfTestData::IsInitializedImpl,
          &SelfTestData::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<SelfTestData>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &SelfTestData::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<SelfTestData>(), &SelfTestData::ByteSizeLong,
              &SelfTestData::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(SelfTestData, _impl_._cached_size_),
          true,
      },
      "sentencepiece.SelfTestData",
  };
}
struct SelfTestDataGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr SelfTestDataGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 SelfTestData_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(SelfTestData::InternalGenerateClassData_(
            _default, &SelfTestData_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<SelfTestData>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~SelfTestDataGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) SelfTestData _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<SelfTestData>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(SelfTestDataGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST SelfTestDataGlobalsTypeInternal SelfTestData_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* SelfTestData_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return SelfTestData_globals_.GetClassData();
#else
  return SelfTestData_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
class ModelProto::_Internal {
 public:
  using HasBits = decltype(::std::declval<ModelProto>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(ModelProto, _impl_._has_bits_);
};

constexpr ModelProto::ParseTableT_ ModelProto::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(ModelProto, _impl_._has_bits_),
      PROTOBUF_FIELD_OFFSET(ModelProto, _impl_._extensions_),
      5, 56,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967264,  // skipmap
      offsetof(ParseTableT_, field_entries),
      5,  // num_field_entries
      5,  // num_aux_entries
      offsetof(ParseTableT_, aux_entries),
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallbackLite,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::sentencepiece::ModelProto>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // repeated .sentencepiece.ModelProto.SentencePiece pieces = 1;
      {::_pbi::TcParser::FastMtR1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.pieces_)}},
      // optional .sentencepiece.TrainerSpec trainer_spec = 2;
      {::_pbi::TcParser::FastMtS1,
       {18, 1, 1,
        PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.trainer_spec_)}},
      // optional .sentencepiece.NormalizerSpec normalizer_spec = 3;
      {::_pbi::TcParser::FastMtS1,
       {26, 2, 2,
        PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.normalizer_spec_)}},
      // optional .sentencepiece.SelfTestData self_test_data = 4;
      {::_pbi::TcParser::FastMtS1,
       {34, 3, 3,
        PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.self_test_data_)}},
      // optional .sentencepiece.NormalizerSpec denormalizer_spec = 5;
      {::_pbi::TcParser::FastMtS1,
       {42, 4, 4,
        PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.denormalizer_spec_)}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
    }}, {{
      65535, 65535
    }}, {{
      // repeated .sentencepiece.ModelProto.SentencePiece pieces = 1;
      {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.pieces_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
      // optional .sentencepiece.TrainerSpec trainer_spec = 2;
      {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.trainer_spec_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // optional .sentencepiece.NormalizerSpec normalizer_spec = 3;
      {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.normalizer_spec_), _Internal::kHasBitsOffset + 2, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // optional .sentencepiece.SelfTestData self_test_data = 4;
      {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.self_test_data_), _Internal::kHasBitsOffset + 3, 3, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // optional .sentencepiece.NormalizerSpec denormalizer_spec = 5;
      {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.denormalizer_spec_), _Internal::kHasBitsOffset + 4, 4, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::sentencepiece::ModelProto_SentencePiece>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::sentencepiece::ModelProto_SentencePiece_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::sentencepiece::TrainerSpec>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::sentencepiece::TrainerSpec_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::sentencepiece::NormalizerSpec>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::sentencepiece::NormalizerSpec_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::sentencepiece::SelfTestData>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::sentencepiece::SelfTestData_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::sentencepiece::NormalizerSpec>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::sentencepiece::NormalizerSpec_globals_},
        #endif
    }},
    {{
    }},
  };
}


inline constexpr ModelProto::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        pieces_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::sentencepiece::ModelProto,
            PROTOBUF_FIELD_OFFSET(::sentencepiece::ModelProto, _impl_.pieces_)>()
         }
        ,
        trainer_spec_{nullptr},
        normalizer_spec_{nullptr},
        self_test_data_{nullptr},
        denormalizer_spec_{nullptr} {}

template <typename>
constexpr ModelProto::ModelProto(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::MessageLite(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL ModelProto::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) ModelProto(arena);
}
constexpr auto ModelProto::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(ModelProto), alignof(ModelProto));
}
constexpr auto ModelProto::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataLite{
      {
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          ModelProto::IsInitializedImpl,
          &ModelProto::MergeImpl,
          ::google::protobuf::MessageLite::GetNewImpl<ModelProto>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &ModelProto::SharedDtor,
          ::google::protobuf::MessageLite::GetClearImpl<ModelProto>(), &ModelProto::ByteSizeLong,
              &ModelProto::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(ModelProto, _impl_._cached_size_),
          true,
      },
      "sentencepiece.ModelProto",
  };
}
struct ModelProtoGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr ModelProtoGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 ModelProto_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(ModelProto::InternalGenerateClassData_(
            _default, &ModelProto_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<ModelProto>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~ModelProtoGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) ModelProto _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<ModelProto>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(ModelProtoGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST ModelProtoGlobalsTypeInternal ModelProto_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* ModelProto_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return ModelProto_globals_.GetClassData();
#else
  return ModelProto_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
}  // namespace sentencepiece
namespace sentencepiece {
PROTOBUF_CONSTINIT const uint32_t TrainerSpec_ModelType_internal_data_[] = {
    262145u, 0u, };
static const char TrainerSpec_ModelType_names[] = {
    "BPE"
    "CHAR"
    "UNIGRAM"
    "WORD"
};

static const ::google::protobuf::internal::EnumEntry TrainerSpec_ModelType_entries[] = {
    {{&TrainerSpec_ModelType_names[0], 3}, 2},
    {{&TrainerSpec_ModelType_names[3], 4}, 4},
    {{&TrainerSpec_ModelType_names[7], 7}, 1},
    {{&TrainerSpec_ModelType_names[14], 4}, 3},
};

static const int TrainerSpec_ModelType_entries_by_number[] = {
    2,  // 1 -> UNIGRAM
    0,  // 2 -> BPE
    3,  // 3 -> WORD
    1,  // 4 -> CHAR
};

[[nodiscard]] bool TrainerSpec_ModelType_Parse(::absl::string_view name,
                                  TrainerSpec_ModelType* PROTOBUF_NONNULL value) {
  int int_value;
  bool success = ::google::protobuf::internal::LookUpEnumValue(
      TrainerSpec_ModelType_entries, 4, name, &int_value);
  if (success) {
    *value = static_cast<TrainerSpec_ModelType>(int_value);
  }
  return success;
}
static ::google::protobuf::internal::ExplicitlyConstructed<::std::string>
    TrainerSpec_ModelType_strings[4] = {};

[[nodiscard]] const ::std::string& TrainerSpec_ModelType_Name(TrainerSpec_ModelType value) {
  static const bool kDummy = ::google::protobuf::internal::InitializeEnumStrings(
      TrainerSpec_ModelType_entries, TrainerSpec_ModelType_entries_by_number, 4,
      TrainerSpec_ModelType_strings);
  (void)kDummy;

  int idx = ::google::protobuf::internal::LookUpEnumName(TrainerSpec_ModelType_entries,
                                  TrainerSpec_ModelType_entries_by_number,
                                  4, value);
  return idx == -1 ? ::google::protobuf::internal::GetEmptyString() : TrainerSpec_ModelType_strings[idx].get();
}
PROTOBUF_CONSTINIT const uint32_t ModelProto_SentencePiece_Type_internal_data_[] = {
    393217u, 0u, };
static const char ModelProto_SentencePiece_Type_names[] = {
    "BYTE"
    "CONTROL"
    "NORMAL"
    "UNKNOWN"
    "UNUSED"
    "USER_DEFINED"
};

static const ::google::protobuf::internal::EnumEntry ModelProto_SentencePiece_Type_entries[] = {
    {{&ModelProto_SentencePiece_Type_names[0], 4}, 6},
    {{&ModelProto_SentencePiece_Type_names[4], 7}, 3},
    {{&ModelProto_SentencePiece_Type_names[11], 6}, 1},
    {{&ModelProto_SentencePiece_Type_names[17], 7}, 2},
    {{&ModelProto_SentencePiece_Type_names[24], 6}, 5},
    {{&ModelProto_SentencePiece_Type_names[30], 12}, 4},
};

static const int ModelProto_SentencePiece_Type_entries_by_number[] = {
    2,  // 1 -> NORMAL
    3,  // 2 -> UNKNOWN
    1,  // 3 -> CONTROL
    5,  // 4 -> USER_DEFINED
    4,  // 5 -> UNUSED
    0,  // 6 -> BYTE
};

[[nodiscard]] bool ModelProto_SentencePiece_Type_Parse(::absl::string_view name,
                                  ModelProto_SentencePiece_Type* PROTOBUF_NONNULL value) {
  int int_value;
  bool success = ::google::protobuf::internal::LookUpEnumValue(
      ModelProto_SentencePiece_Type_entries, 6, name, &int_value);
  if (success) {
    *value = static_cast<ModelProto_SentencePiece_Type>(int_value);
  }
  return success;
}
static ::google::protobuf::internal::ExplicitlyConstructed<::std::string>
    ModelProto_SentencePiece_Type_strings[6] = {};

[[nodiscard]] const ::std::string& ModelProto_SentencePiece_Type_Name(ModelProto_SentencePiece_Type value) {
  static const bool kDummy = ::google::protobuf::internal::InitializeEnumStrings(
      ModelProto_SentencePiece_Type_entries, ModelProto_SentencePiece_Type_entries_by_number, 6,
      ModelProto_SentencePiece_Type_strings);
  (void)kDummy;

  int idx = ::google::protobuf::internal::LookUpEnumName(ModelProto_SentencePiece_Type_entries,
                                  ModelProto_SentencePiece_Type_entries_by_number,
                                  6, value);
  return idx == -1 ? ::google::protobuf::internal::GetEmptyString() : ModelProto_SentencePiece_Type_strings[idx].get();
}
// ===================================================================

/*static*/ const ::_pbi::LazyString TrainerSpec::Impl_::_i_give_permission_to_break_this_code_default_unk_piece_{
    {{"<unk>", 5}},
    {nullptr},
};
/*static*/ const ::_pbi::LazyString TrainerSpec::Impl_::_i_give_permission_to_break_this_code_default_bos_piece_{
    {{"<s>", 3}},
    {nullptr},
};
/*static*/ const ::_pbi::LazyString TrainerSpec::Impl_::_i_give_permission_to_break_this_code_default_eos_piece_{
    {{"</s>", 4}},
    {nullptr},
};
/*static*/ const ::_pbi::LazyString TrainerSpec::Impl_::_i_give_permission_to_break_this_code_default_pad_piece_{
    {{"<pad>", 5}},
    {nullptr},
};
/*static*/ const ::_pbi::LazyString TrainerSpec::Impl_::_i_give_permission_to_break_this_code_default_unk_surface_{
    {{" \342\201\207 ", 5}},
    {nullptr},
};
TrainerSpec::TrainerSpec(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, TrainerSpec_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:sentencepiece.TrainerSpec)
}
PROTOBUF_NDEBUG_INLINE TrainerSpec::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::sentencepiece::TrainerSpec& from_msg)
      : _extensions_ {}
        ,
        _has_bits_{from._has_bits_},
        _cached_size_{0},
        input_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::sentencepiece::TrainerSpec,
              PROTOBUF_FIELD_OFFSET(::sentencepiece::TrainerSpec, _impl_.input_)>()
          , from.input_
        }
        ,
        accept_language_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::sentencepiece::TrainerSpec,
              PROTOBUF_FIELD_OFFSET(::sentencepiece::TrainerSpec, _impl_.accept_language_)>()
          , from.accept_language_
        }
        ,
        control_symbols_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::sentencepiece::TrainerSpec,
              PROTOBUF_FIELD_OFFSET(::sentencepiece::TrainerSpec, _impl_.control_symbols_)>()
          , from.control_symbols_
        }
        ,
        user_defined_symbols_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::sentencepiece::TrainerSpec,
              PROTOBUF_FIELD_OFFSET(::sentencepiece::TrainerSpec, _impl_.user_defined_symbols_)>()
          , from.user_defined_symbols_
        }
        ,
        model_prefix_(arena, from.model_prefix_),
        input_format_(arena, from.input_format_),
        unk_surface_(arena, from.unk_surface_, _i_give_permission_to_break_this_code_default_unk_surface_),
        unk_piece_(arena, from.unk_piece_, _i_give_permission_to_break_this_code_default_unk_piece_),
        required_chars_(arena, from.required_chars_),
        bos_piece_(arena, from.bos_piece_, _i_give_permission_to_break_this_code_default_bos_piece_),
        eos_piece_(arena, from.eos_piece_, _i_give_permission_to_break_this_code_default_eos_piece_),
        pad_piece_(arena, from.pad_piece_, _i_give_permission_to_break_this_code_default_pad_piece_),
        pretokenization_delimiter_(arena, from.pretokenization_delimiter_),
        seed_sentencepieces_file_(arena, from.seed_sentencepieces_file_) {}

TrainerSpec::TrainerSpec(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const TrainerSpec& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, TrainerSpec_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  TrainerSpec* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  _impl_._extensions_.MergeFrom(arena, this, from._impl_._extensions_,
                                from.GetArena());
  ::memcpy(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, self_test_sample_size_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, self_test_sample_size_),
           offsetof(Impl_, pad_id_) -
               offsetof(Impl_, self_test_sample_size_) +
               sizeof(Impl_::pad_id_));
  ::memcpy(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, unk_id_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, unk_id_),
           offsetof(Impl_, bos_id_) -
               offsetof(Impl_, unk_id_) +
               sizeof(Impl_::bos_id_));

  // @@protoc_insertion_point(copy_constructor:sentencepiece.TrainerSpec)
}
PROTOBUF_NDEBUG_INLINE TrainerSpec::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _extensions_ {}
        ,
        _cached_size_{0},
        input_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::sentencepiece::TrainerSpec,
            PROTOBUF_FIELD_OFFSET(::sentencepiece::TrainerSpec, _impl_.input_)>()
         }
        ,
        accept_language_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::sentencepiece::TrainerSpec,
            PROTOBUF_FIELD_OFFSET(::sentencepiece::TrainerSpec, _impl_.accept_language_)>()
         }
        ,
        control_symbols_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::sentencepiece::TrainerSpec,
            PROTOBUF_FIELD_OFFSET(::sentencepiece::TrainerSpec, _impl_.control_symbols_)>()
         }
        ,
        user_defined_symbols_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::sentencepiece::TrainerSpec,
            PROTOBUF_FIELD_OFFSET(::sentencepiece::TrainerSpec, _impl_.user_defined_symbols_)>()
         }
        ,
        model_prefix_(arena),
        input_format_(arena),
        unk_surface_(arena, Impl_::_i_give_permission_to_break_this_code_default_unk_surface_),
        unk_piece_(arena, Impl_::_i_give_permission_to_break_this_code_default_unk_piece_),
        model_type_{static_cast< ::sentencepiece::TrainerSpec_ModelType >(1)},
        vocab_size_{8000},
        character_coverage_{0.9995f},
        seed_sentencepiece_size_{1000000},
        shrinking_factor_{0.75f},
        num_threads_{16},
        num_sub_iterations_{2},
        max_sentence_length_{4192},
        max_sentencepiece_length_{16},
        shuffle_input_sentence_{true},
        split_by_unicode_script_{true},
        split_by_whitespace_{true},
        split_by_number_{true},
        pad_id_{-1},
        required_chars_(arena),
        bos_piece_(arena, Impl_::_i_give_permission_to_break_this_code_default_bos_piece_),
        eos_piece_(arena, Impl_::_i_give_permission_to_break_this_code_default_eos_piece_),
        pad_piece_(arena, Impl_::_i_give_permission_to_break_this_code_default_pad_piece_),
        pretokenization_delimiter_(arena),
        seed_sentencepieces_file_(arena),
        eos_id_{2},
        vocabulary_output_piece_score_{true},
        hard_vocab_limit_{true},
        bos_id_{1} {}

inline void TrainerSpec::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, self_test_sample_size_),
           0,
           offsetof(Impl_, allow_whitespace_only_pieces_) -
               offsetof(Impl_, self_test_sample_size_) +
               sizeof(Impl_::allow_whitespace_only_pieces_));
  ::memset(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, unk_id_),
           0,
           offsetof(Impl_, differential_privacy_noise_level_) -
               offsetof(Impl_, unk_id_) +
               sizeof(Impl_::differential_privacy_noise_level_));
}
TrainerSpec::~TrainerSpec() {
  // @@protoc_insertion_point(destructor:sentencepiece.TrainerSpec)
  SharedDtor(*this);
}
inline void TrainerSpec::SharedDtor(MessageLite& self) {
  TrainerSpec& this_ = static_cast<TrainerSpec&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.model_prefix_.Destroy();
  this_._impl_.input_format_.Destroy();
  this_._impl_.unk_surface_.Destroy();
  this_._impl_.unk_piece_.Destroy();
  this_._impl_.required_chars_.Destroy();
  this_._impl_.bos_piece_.Destroy();
  this_._impl_.eos_piece_.Destroy();
  this_._impl_.pad_piece_.Destroy();
  this_._impl_.pretokenization_delimiter_.Destroy();
  this_._impl_.seed_sentencepieces_file_.Destroy();
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite TrainerSpec_class_data_ =
    TrainerSpec::InternalGenerateClassData_(TrainerSpec_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
TrainerSpec::GetClassData() const {
  return TrainerSpec_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
TrainerSpec::GetClassData() const {
  return TrainerSpec_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const TrainerSpec::ParseTableT_
    TrainerSpec::_table_ =
        TrainerSpec::InternalGenerateParseTable_(TrainerSpec_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void TrainerSpec::Clear() {
// @@protoc_insertion_point(message_clear_start:sentencepiece.TrainerSpec)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_._extensions_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _impl_.input_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.accept_language_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _impl_.control_symbols_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _impl_.user_defined_symbols_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      _impl_.model_prefix_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      _impl_.input_format_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      _impl_.unk_surface_.ClearToDefault(::sentencepiece::TrainerSpec::Impl_::_i_give_permission_to_break_this_code_default_unk_surface_, GetArena());
    }
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      _impl_.unk_piece_.ClearToDefault(::sentencepiece::TrainerSpec::Impl_::_i_give_permission_to_break_this_code_default_unk_piece_, GetArena());
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) {
    ::memset(&_impl_.self_test_sample_size_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.allow_whitespace_only_pieces_) -
        reinterpret_cast<char*>(&_impl_.self_test_sample_size_)) + sizeof(_impl_.allow_whitespace_only_pieces_));
    _impl_.model_type_ = 1;
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00ff0000U)) {
    _impl_.vocab_size_ = 8000;
    _impl_.character_coverage_ = 0.9995f;
    _impl_.seed_sentencepiece_size_ = 1000000;
    _impl_.shrinking_factor_ = 0.75f;
    _impl_.num_threads_ = 16;
    _impl_.num_sub_iterations_ = 2;
    _impl_.max_sentence_length_ = 4192;
    _impl_.max_sentencepiece_length_ = 16;
  }
  if (BatchCheckHasBit(cached_has_bits, 0xff000000U)) {
    _impl_.shuffle_input_sentence_ = true;
    _impl_.split_by_unicode_script_ = true;
    _impl_.split_by_whitespace_ = true;
    _impl_.split_by_number_ = true;
    _impl_.pad_id_ = -1;
    if (CheckHasBit(cached_has_bits, 0x20000000U)) {
      _impl_.required_chars_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x40000000U)) {
      _impl_.bos_piece_.ClearToDefault(::sentencepiece::TrainerSpec::Impl_::_i_give_permission_to_break_this_code_default_bos_piece_, GetArena());
    }
    if (CheckHasBit(cached_has_bits, 0x80000000U)) {
      _impl_.eos_piece_.ClearToDefault(::sentencepiece::TrainerSpec::Impl_::_i_give_permission_to_break_this_code_default_eos_piece_, GetArena());
    }
  }
  cached_has_bits = _impl_._has_bits_[1];
  if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _impl_.pad_piece_.ClearToDefault(::sentencepiece::TrainerSpec::Impl_::_i_give_permission_to_break_this_code_default_pad_piece_, GetArena());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.pretokenization_delimiter_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _impl_.seed_sentencepieces_file_.ClearNonDefaultToEmpty();
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x000000f8U)) {
    ::memset(&_impl_.unk_id_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.enable_differential_privacy_) -
        reinterpret_cast<char*>(&_impl_.unk_id_)) + sizeof(_impl_.enable_differential_privacy_));
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00003f00U)) {
    ::memset(&_impl_.differential_privacy_clipping_threshold_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.differential_privacy_noise_level_) -
        reinterpret_cast<char*>(&_impl_.differential_privacy_clipping_threshold_)) + sizeof(_impl_.differential_privacy_noise_level_));
    _impl_.eos_id_ = 2;
    _impl_.vocabulary_output_piece_score_ = true;
    _impl_.hard_vocab_limit_ = true;
    _impl_.bos_id_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL TrainerSpec::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const TrainerSpec& this_ = static_cast<const TrainerSpec&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL TrainerSpec::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const TrainerSpec& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:sentencepiece.TrainerSpec)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // repeated string input = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    for (int i = 0, n = this_._internal_input_size(); i < n; ++i) {
      const auto& s = this_._internal_input().Get(i);
      target = stream->WriteString(1, s, target);
    }
  }

  // optional string model_prefix = 2;
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    const ::std::string& _s = this_._internal_model_prefix();
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

  // optional .sentencepiece.TrainerSpec.ModelType model_type = 3 [default = UNIGRAM];
  if (CheckHasBit(cached_has_bits, 0x00008000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        3, this_._internal_model_type(), target);
  }

  // optional int32 vocab_size = 4 [default = 8000];
  if (CheckHasBit(cached_has_bits, 0x00010000U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<4>(
            stream, this_._internal_vocab_size(), target);
  }

  // repeated string accept_language = 5;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    for (int i = 0, n = this_._internal_accept_language_size(); i < n; ++i) {
      const auto& s = this_._internal_accept_language().Get(i);
      target = stream->WriteString(5, s, target);
    }
  }

  // optional int32 self_test_sample_size = 6 [default = 0];
  if (CheckHasBit(cached_has_bits, 0x00000100U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<6>(
            stream, this_._internal_self_test_sample_size(), target);
  }

  // optional string input_format = 7;
  if (CheckHasBit(cached_has_bits, 0x00000020U)) {
    const ::std::string& _s = this_._internal_input_format();
    target = stream->WriteStringMaybeAliased(7, _s, target);
  }

  // optional float character_coverage = 10 [default = 0.9995];
  if (CheckHasBit(cached_has_bits, 0x00020000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(
        10, this_._internal_character_coverage(), target);
  }

  // optional uint64 input_sentence_size = 11 [default = 0];
  if (CheckHasBit(cached_has_bits, 0x00000400U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        11, this_._internal_input_sentence_size(), target);
  }

  // optional int32 mining_sentence_size = 12 [deprecated = true];
  if (CheckHasBit(cached_has_bits, 0x00000200U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<12>(
            stream, this_._internal_mining_sentence_size(), target);
  }

  // optional int32 training_sentence_size = 13 [deprecated = true];
  if (CheckHasBit(cached_has_bits, 0x00000800U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<13>(
            stream, this_._internal_training_sentence_size(), target);
  }

  // optional int32 seed_sentencepiece_size = 14 [default = 1000000];
  if (CheckHasBit(cached_has_bits, 0x00040000U)) {
    target =
        ::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<14>(
            stream, this_._internal_seed_sentencepiece_size(), target);
  }

  // optional float shrinking_factor = 15 [default = 0.75];
  if (CheckHasBit(cached_has_bits, 0x00080000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(
        15, this_._internal_shrinking_factor(), target);
  }

  // optional int32 num_threads = 16 [default = 16];
  if (CheckHasBit(cached_has_bits, 0x00100000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        16, this_._internal_num_threads(), target);
  }

  // optional int32 num_sub_iterations = 17 [default = 2];
  if (CheckHasBit(cached_has_bits, 0x00200000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        17, this_._internal_num_sub_iterations(), target);
  }

  // optional int32 max_sentence_length = 18 [default = 4192];
  if (CheckHasBit(cached_has_bits, 0x00400000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        18, this_._internal_max_sentence_length(), target);
  }

  // optional bool shuffle_input_sentence = 19 [default = true];
  if (CheckHasBit(cached_has_bits, 0x01000000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        19, this_._internal_shuffle_input_sentence(), target);
  }

  // optional int32 max_sentencepiece_length = 20 [default = 16];
  if (CheckHasBit(cached_has_bits, 0x00800000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        20, this_._internal_max_sentencepiece_length(), target);
  }

  // optional bool split_by_unicode_script = 21 [default = true];
  if (CheckHasBit(cached_has_bits, 0x02000000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        21, this_._internal_split_by_unicode_script(), target);
  }

  // optional bool split_by_whitespace = 22 [default = true];
  if (CheckHasBit(cached_has_bits, 0x04000000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        22, this_._internal_split_by_whitespace(), target);
  }

  // optional bool split_by_number = 23 [default = true];
  if (CheckHasBit(cached_has_bits, 0x08000000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        23, this_._internal_split_by_number(), target);
  }

  // optional bool treat_whitespace_as_suffix = 24 [default = false];
  if (CheckHasBit(cached_has_bits, 0x00001000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        24, this_._internal_treat_whitespace_as_suffix(), target);
  }

  // optional bool split_digits = 25 [default = false];
  if (CheckHasBit(cached_has_bits, 0x00002000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        25, this_._internal_split_digits(), target);
  }

  // optional bool allow_whitespace_only_pieces = 26 [default = false];
  if (CheckHasBit(cached_has_bits, 0x00004000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        26, this_._internal_allow_whitespace_only_pieces(), target);
  }

  // repeated string control_symbols = 30;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    for (int i = 0, n = this_._internal_control_symbols_size(); i < n; ++i) {
      const auto& s = this_._internal_control_symbols().Get(i);
      target = stream->WriteString(30, s, target);
    }
  }

  // repeated string user_defined_symbols = 31;
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    for (int i = 0, n = this_._internal_user_defined_symbols_size(); i < n; ++i) {
      const auto& s = this_._internal_user_defined_symbols().Get(i);
      target = stream->WriteString(31, s, target);
    }
  }

  cached_has_bits = this_._impl_._has_bits_[1];
  // optional bool vocabulary_output_piece_score = 32 [default = true];
  if (CheckHasBit(cached_has_bits, 0x00000800U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        32, this_._internal_vocabulary_output_piece_score(), target);
  }

  // optional bool hard_vocab_limit = 33 [default = true];
  if (CheckHasBit(cached_has_bits, 0x00001000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        33, this_._internal_hard_vocab_limit(), target);
  }

  // optional bool use_all_vocab = 34 [default = false];
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        34, this_._internal_use_all_vocab(), target);
  }

  // optional bool byte_fallback = 35 [default = false];
  if (CheckHasBit(cached_has_bits, 0x00000020U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        35, this_._internal_byte_fallback(), target);
  }

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional string required_chars = 36;
  if (CheckHasBit(cached_has_bits, 0x20000000U)) {
    const ::std::string& _s = this_._internal_required_chars();
    target = stream->WriteStringMaybeAliased(36, _s, target);
  }

  cached_has_bits = this_._impl_._has_bits_[1];
  // optional int32 unk_id = 40 [default = 0];
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        40, this_._internal_unk_id(), target);
  }

  // optional int32 bos_id = 41 [default = 1];
  if (CheckHasBit(cached_has_bits, 0x00002000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        41, this_._internal_bos_id(), target);
  }

  // optional int32 eos_id = 42 [default = 2];
  if (CheckHasBit(cached_has_bits, 0x00000400U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        42, this_._internal_eos_id(), target);
  }

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional int32 pad_id = 43 [default = -1];
  if (CheckHasBit(cached_has_bits, 0x10000000U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        43, this_._internal_pad_id(), target);
  }

  // optional string unk_surface = 44 [default = " \342\201\207 "];
  if (CheckHasBit(cached_has_bits, 0x00000040U)) {
    const ::std::string& _s = this_._internal_unk_surface();
    target = stream->WriteStringMaybeAliased(44, _s, target);
  }

  // optional string unk_piece = 45 [default = "<unk>"];
  if (CheckHasBit(cached_has_bits, 0x00000080U)) {
    const ::std::string& _s = this_._internal_unk_piece();
    target = stream->WriteStringMaybeAliased(45, _s, target);
  }

  // optional string bos_piece = 46 [default = "<s>"];
  if (CheckHasBit(cached_has_bits, 0x40000000U)) {
    const ::std::string& _s = this_._internal_bos_piece();
    target = stream->WriteStringMaybeAliased(46, _s, target);
  }

  // optional string eos_piece = 47 [default = "</s>"];
  if (CheckHasBit(cached_has_bits, 0x80000000U)) {
    const ::std::string& _s = this_._internal_eos_piece();
    target = stream->WriteStringMaybeAliased(47, _s, target);
  }

  cached_has_bits = this_._impl_._has_bits_[1];
  // optional string pad_piece = 48 [default = "<pad>"];
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    const ::std::string& _s = this_._internal_pad_piece();
    target = stream->WriteStringMaybeAliased(48, _s, target);
  }

  // optional bool train_extremely_large_corpus = 49 [default = false];
  if (CheckHasBit(cached_has_bits, 0x00000040U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        49, this_._internal_train_extremely_large_corpus(), target);
  }

  // optional bool enable_differential_privacy = 50 [default = false];
  if (CheckHasBit(cached_has_bits, 0x00000080U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        50, this_._internal_enable_differential_privacy(), target);
  }

  // optional float differential_privacy_noise_level = 51 [default = 0];
  if (CheckHasBit(cached_has_bits, 0x00000200U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(
        51, this_._internal_differential_privacy_noise_level(), target);
  }

  // optional uint64 differential_privacy_clipping_threshold = 52 [default = 0];
  if (CheckHasBit(cached_has_bits, 0x00000100U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
        52, this_._internal_differential_privacy_clipping_threshold(), target);
  }

  // optional string pretokenization_delimiter = 53 [default = ""];
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    const ::std::string& _s = this_._internal_pretokenization_delimiter();
    target = stream->WriteStringMaybeAliased(53, _s, target);
  }

  // optional string seed_sentencepieces_file = 54 [default = ""];
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    const ::std::string& _s = this_._internal_seed_sentencepieces_file();
    target = stream->WriteStringMaybeAliased(54, _s, target);
  }

  // All extensions.
  target = this_._impl_._extensions_._InternalSerializeAll(&default_instance(),
                                                    target, stream);
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:sentencepiece.TrainerSpec)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t TrainerSpec::ByteSizeLong(const MessageLite& base) {
  const TrainerSpec& this_ = static_cast<const TrainerSpec&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t TrainerSpec::ByteSizeLong() const {
  const TrainerSpec& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:sentencepiece.TrainerSpec)
  ::size_t total_size = 0;
  total_size += this_._impl_._extensions_.ByteSize();

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  total_size += ::absl::popcount(0x000a0000U & cached_has_bits) * 5;
  total_size += ::absl::popcount(0x0f007000U & cached_has_bits) * 3;
  if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) {
    // repeated string input = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size +=
          1 * ::google::protobuf::internal::FromIntSize(this_._internal_input().size());
      for (int i = 0, n = this_._internal_input().size(); i < n; ++i) {
        total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
            this_._internal_input().Get(i));
      }
    }
    // repeated string accept_language = 5;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size +=
          1 * ::google::protobuf::internal::FromIntSize(this_._internal_accept_language().size());
      for (int i = 0, n = this_._internal_accept_language().size(); i < n; ++i) {
        total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
            this_._internal_accept_language().Get(i));
      }
    }
    // repeated string control_symbols = 30;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size +=
          2 * ::google::protobuf::internal::FromIntSize(this_._internal_control_symbols().size());
      for (int i = 0, n = this_._internal_control_symbols().size(); i < n; ++i) {
        total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
            this_._internal_control_symbols().Get(i));
      }
    }
    // repeated string user_defined_symbols = 31;
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size +=
          2 * ::google::protobuf::internal::FromIntSize(this_._internal_user_defined_symbols().size());
      for (int i = 0, n = this_._internal_user_defined_symbols().size(); i < n; ++i) {
        total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
            this_._internal_user_defined_symbols().Get(i));
      }
    }
    // optional string model_prefix = 2;
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_model_prefix());
    }
    // optional string input_format = 7;
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_input_format());
    }
    // optional string unk_surface = 44 [default = " \342\201\207 "];
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_unk_surface());
    }
    // optional string unk_piece = 45 [default = "<unk>"];
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_unk_piece());
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00008f00U)) {
    // optional int32 self_test_sample_size = 6 [default = 0];
    if (CheckHasBit(cached_has_bits, 0x00000100U)) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
          this_._internal_self_test_sample_size());
    }
    // optional int32 mining_sentence_size = 12 [deprecated = true];
    if (CheckHasBit(cached_has_bits, 0x00000200U)) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
          this_._internal_mining_sentence_size());
    }
    // optional uint64 input_sentence_size = 11 [default = 0];
    if (CheckHasBit(cached_has_bits, 0x00000400U)) {
      total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
          this_._internal_input_sentence_size());
    }
    // optional int32 training_sentence_size = 13 [deprecated = true];
    if (CheckHasBit(cached_has_bits, 0x00000800U)) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
          this_._internal_training_sentence_size());
    }
    // optional .sentencepiece.TrainerSpec.ModelType model_type = 3 [default = UNIGRAM];
    if (CheckHasBit(cached_has_bits, 0x00008000U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_model_type());
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00f50000U)) {
    // optional int32 vocab_size = 4 [default = 8000];
    if (CheckHasBit(cached_has_bits, 0x00010000U)) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
          this_._internal_vocab_size());
    }
    // optional int32 seed_sentencepiece_size = 14 [default = 1000000];
    if (CheckHasBit(cached_has_bits, 0x00040000U)) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
          this_._internal_seed_sentencepiece_size());
    }
    // optional int32 num_threads = 16 [default = 16];
    if (CheckHasBit(cached_has_bits, 0x00100000U)) {
      total_size += 2 + ::_pbi::WireFormatLite::Int32Size(
                                      this_._internal_num_threads());
    }
    // optional int32 num_sub_iterations = 17 [default = 2];
    if (CheckHasBit(cached_has_bits, 0x00200000U)) {
      total_size += 2 + ::_pbi::WireFormatLite::Int32Size(
                                      this_._internal_num_sub_iterations());
    }
    // optional int32 max_sentence_length = 18 [default = 4192];
    if (CheckHasBit(cached_has_bits, 0x00400000U)) {
      total_size += 2 + ::_pbi::WireFormatLite::Int32Size(
                                      this_._internal_max_sentence_length());
    }
    // optional int32 max_sentencepiece_length = 20 [default = 16];
    if (CheckHasBit(cached_has_bits, 0x00800000U)) {
      total_size += 2 + ::_pbi::WireFormatLite::Int32Size(
                                      this_._internal_max_sentencepiece_length());
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0xf0000000U)) {
    // optional int32 pad_id = 43 [default = -1];
    if (CheckHasBit(cached_has_bits, 0x10000000U)) {
      total_size += 2 + ::_pbi::WireFormatLite::Int32Size(
                                      this_._internal_pad_id());
    }
    // optional string required_chars = 36;
    if (CheckHasBit(cached_has_bits, 0x20000000U)) {
      total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_required_chars());
    }
    // optional string bos_piece = 46 [default = "<s>"];
    if (CheckHasBit(cached_has_bits, 0x40000000U)) {
      total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_bos_piece());
    }
    // optional string eos_piece = 47 [default = "</s>"];
    if (CheckHasBit(cached_has_bits, 0x80000000U)) {
      total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_eos_piece());
    }
  }
  cached_has_bits = this_._impl_._has_bits_[1];
  total_size += static_cast<bool>(0x00000200U & cached_has_bits) * 6;
  total_size += ::absl::popcount(0x000018f0U & cached_has_bits) * 3;
  if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) {
    // optional string pad_piece = 48 [default = "<pad>"];
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_pad_piece());
    }
    // optional string pretokenization_delimiter = 53 [default = ""];
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_pretokenization_delimiter());
    }
    // optional string seed_sentencepieces_file = 54 [default = ""];
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_seed_sentencepieces_file());
    }
    // optional int32 unk_id = 40 [default = 0];
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size += 2 + ::_pbi::WireFormatLite::Int32Size(
                                      this_._internal_unk_id());
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00002500U)) {
    // optional uint64 differential_privacy_clipping_threshold = 52 [default = 0];
    if (CheckHasBit(cached_has_bits, 0x00000100U)) {
      total_size += 2 + ::_pbi::WireFormatLite::UInt64Size(
                                      this_._internal_differential_privacy_clipping_threshold());
    }
    // optional int32 eos_id = 42 [default = 2];
    if (CheckHasBit(cached_has_bits, 0x00000400U)) {
      total_size += 2 + ::_pbi::WireFormatLite::Int32Size(
                                      this_._internal_eos_id());
    }
    // optional int32 bos_id = 41 [default = 1];
    if (CheckHasBit(cached_has_bits, 0x00002000U)) {
      total_size += 2 + ::_pbi::WireFormatLite::Int32Size(
                                      this_._internal_bos_id());
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void TrainerSpec::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<TrainerSpec*>(&to_msg);
  auto& from = static_cast<const TrainerSpec&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:sentencepiece.TrainerSpec)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_mutable_input()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_input());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_internal_mutable_accept_language()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_accept_language());
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_internal_mutable_control_symbols()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_control_symbols());
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _this->_internal_mutable_user_defined_symbols()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_user_defined_symbols());
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      _this->_internal_set_model_prefix(from._internal_model_prefix());
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      _this->_internal_set_input_format(from._internal_input_format());
    }
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      _this->_internal_set_unk_surface(from._internal_unk_surface());
    }
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      _this->_internal_set_unk_piece(from._internal_unk_piece());
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) {
    if (CheckHasBit(cached_has_bits, 0x00000100U)) {
      _this->_impl_.self_test_sample_size_ = from._impl_.self_test_sample_size_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000200U)) {
      _this->_impl_.mining_sentence_size_ = from._impl_.mining_sentence_size_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000400U)) {
      _this->_impl_.input_sentence_size_ = from._impl_.input_sentence_size_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000800U)) {
      _this->_impl_.training_sentence_size_ = from._impl_.training_sentence_size_;
    }
    if (CheckHasBit(cached_has_bits, 0x00001000U)) {
      _this->_impl_.treat_whitespace_as_suffix_ = from._impl_.treat_whitespace_as_suffix_;
    }
    if (CheckHasBit(cached_has_bits, 0x00002000U)) {
      _this->_impl_.split_digits_ = from._impl_.split_digits_;
    }
    if (CheckHasBit(cached_has_bits, 0x00004000U)) {
      _this->_impl_.allow_whitespace_only_pieces_ = from._impl_.allow_whitespace_only_pieces_;
    }
    if (CheckHasBit(cached_has_bits, 0x00008000U)) {
      _this->_impl_.model_type_ = from._impl_.model_type_;
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00ff0000U)) {
    if (CheckHasBit(cached_has_bits, 0x00010000U)) {
      _this->_impl_.vocab_size_ = from._impl_.vocab_size_;
    }
    if (CheckHasBit(cached_has_bits, 0x00020000U)) {
      _this->_impl_.character_coverage_ = from._impl_.character_coverage_;
    }
    if (CheckHasBit(cached_has_bits, 0x00040000U)) {
      _this->_impl_.seed_sentencepiece_size_ = from._impl_.seed_sentencepiece_size_;
    }
    if (CheckHasBit(cached_has_bits, 0x00080000U)) {
      _this->_impl_.shrinking_factor_ = from._impl_.shrinking_factor_;
    }
    if (CheckHasBit(cached_has_bits, 0x00100000U)) {
      _this->_impl_.num_threads_ = from._impl_.num_threads_;
    }
    if (CheckHasBit(cached_has_bits, 0x00200000U)) {
      _this->_impl_.num_sub_iterations_ = from._impl_.num_sub_iterations_;
    }
    if (CheckHasBit(cached_has_bits, 0x00400000U)) {
      _this->_impl_.max_sentence_length_ = from._impl_.max_sentence_length_;
    }
    if (CheckHasBit(cached_has_bits, 0x00800000U)) {
      _this->_impl_.max_sentencepiece_length_ = from._impl_.max_sentencepiece_length_;
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0xff000000U)) {
    if (CheckHasBit(cached_has_bits, 0x01000000U)) {
      _this->_impl_.shuffle_input_sentence_ = from._impl_.shuffle_input_sentence_;
    }
    if (CheckHasBit(cached_has_bits, 0x02000000U)) {
      _this->_impl_.split_by_unicode_script_ = from._impl_.split_by_unicode_script_;
    }
    if (CheckHasBit(cached_has_bits, 0x04000000U)) {
      _this->_impl_.split_by_whitespace_ = from._impl_.split_by_whitespace_;
    }
    if (CheckHasBit(cached_has_bits, 0x08000000U)) {
      _this->_impl_.split_by_number_ = from._impl_.split_by_number_;
    }
    if (CheckHasBit(cached_has_bits, 0x10000000U)) {
      _this->_impl_.pad_id_ = from._impl_.pad_id_;
    }
    if (CheckHasBit(cached_has_bits, 0x20000000U)) {
      _this->_internal_set_required_chars(from._internal_required_chars());
    }
    if (CheckHasBit(cached_has_bits, 0x40000000U)) {
      _this->_internal_set_bos_piece(from._internal_bos_piece());
    }
    if (CheckHasBit(cached_has_bits, 0x80000000U)) {
      _this->_internal_set_eos_piece(from._internal_eos_piece());
    }
  }
  cached_has_bits = from._impl_._has_bits_[1];
  if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_set_pad_piece(from._internal_pad_piece());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_internal_set_pretokenization_delimiter(from._internal_pretokenization_delimiter());
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_internal_set_seed_sentencepieces_file(from._internal_seed_sentencepieces_file());
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _this->_impl_.unk_id_ = from._impl_.unk_id_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      _this->_impl_.use_all_vocab_ = from._impl_.use_all_vocab_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      _this->_impl_.byte_fallback_ = from._impl_.byte_fallback_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000040U)) {
      _this->_impl_.train_extremely_large_corpus_ = from._impl_.train_extremely_large_corpus_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000080U)) {
      _this->_impl_.enable_differential_privacy_ = from._impl_.enable_differential_privacy_;
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00003f00U)) {
    if (CheckHasBit(cached_has_bits, 0x00000100U)) {
      _this->_impl_.differential_privacy_clipping_threshold_ = from._impl_.differential_privacy_clipping_threshold_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000200U)) {
      _this->_impl_.differential_privacy_noise_level_ = from._impl_.differential_privacy_noise_level_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000400U)) {
      _this->_impl_.eos_id_ = from._impl_.eos_id_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000800U)) {
      _this->_impl_.vocabulary_output_piece_score_ = from._impl_.vocabulary_output_piece_score_;
    }
    if (CheckHasBit(cached_has_bits, 0x00001000U)) {
      _this->_impl_.hard_vocab_limit_ = from._impl_.hard_vocab_limit_;
    }
    if (CheckHasBit(cached_has_bits, 0x00002000U)) {
      _this->_impl_.bos_id_ = from._impl_.bos_id_;
    }
  }
  _this->_impl_._has_bits_.Or(from._impl_._has_bits_);
  _this->_impl_._extensions_.MergeFrom(arena, &default_instance(),
                                from._impl_._extensions_, from.GetArena());
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

void TrainerSpec::CopyFrom(const TrainerSpec& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:sentencepiece.TrainerSpec)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

PROTOBUF_NOINLINE bool TrainerSpec::IsInitializedImpl(
    const MessageLite& msg) {
  auto& this_ = static_cast<const TrainerSpec&>(msg);
  if (!this_._impl_._extensions_.IsInitialized(this_.GetArena(),
                                        &default_instance())) {
    return false;
  }
  return true;
}

void TrainerSpec::InternalSwap(TrainerSpec* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _impl_._extensions_.InternalSwap(&other->_impl_._extensions_);
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_._has_bits_[1], other->_impl_._has_bits_[1]);
  _impl_.input_.InternalSwap(&other->_impl_.input_);
  _impl_.accept_language_.InternalSwap(&other->_impl_.accept_language_);
  _impl_.control_symbols_.InternalSwap(&other->_impl_.control_symbols_);
  _impl_.user_defined_symbols_.InternalSwap(&other->_impl_.user_defined_symbols_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.model_prefix_, &other->_impl_.model_prefix_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.input_format_, &other->_impl_.input_format_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.unk_surface_, &other->_impl_.unk_surface_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.unk_piece_, &other->_impl_.unk_piece_, arena);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.pad_id_)
      + sizeof(TrainerSpec::_impl_.pad_id_)
      - PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.self_test_sample_size_)>(
          reinterpret_cast<char*>(&_impl_.self_test_sample_size_),
          reinterpret_cast<char*>(&other->_impl_.self_test_sample_size_));
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.required_chars_, &other->_impl_.required_chars_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.bos_piece_, &other->_impl_.bos_piece_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.eos_piece_, &other->_impl_.eos_piece_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.pad_piece_, &other->_impl_.pad_piece_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.pretokenization_delimiter_, &other->_impl_.pretokenization_delimiter_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.seed_sentencepieces_file_, &other->_impl_.seed_sentencepieces_file_, arena);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.bos_id_)
      + sizeof(TrainerSpec::_impl_.bos_id_)
      - PROTOBUF_FIELD_OFFSET(TrainerSpec, _impl_.unk_id_)>(
          reinterpret_cast<char*>(&_impl_.unk_id_),
          reinterpret_cast<char*>(&other->_impl_.unk_id_));
}

// ===================================================================

NormalizerSpec::NormalizerSpec(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, NormalizerSpec_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:sentencepiece.NormalizerSpec)
}
PROTOBUF_NDEBUG_INLINE NormalizerSpec::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::sentencepiece::NormalizerSpec& from_msg)
      : _extensions_ {}
        ,
        _has_bits_{from._has_bits_},
        _cached_size_{0},
        name_(arena, from.name_),
        precompiled_charsmap_(arena, from.precompiled_charsmap_),
        normalization_rule_tsv_(arena, from.normalization_rule_tsv_) {}

NormalizerSpec::NormalizerSpec(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const NormalizerSpec& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, NormalizerSpec_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  NormalizerSpec* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  _impl_._extensions_.MergeFrom(arena, this, from._impl_._extensions_,
                                from.GetArena());
  ::memcpy(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, add_dummy_prefix_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, add_dummy_prefix_),
           offsetof(Impl_, escape_whitespaces_) -
               offsetof(Impl_, add_dummy_prefix_) +
               sizeof(Impl_::escape_whitespaces_));

  // @@protoc_insertion_point(copy_constructor:sentencepiece.NormalizerSpec)
}
PROTOBUF_NDEBUG_INLINE NormalizerSpec::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _extensions_ {}
        ,
        _cached_size_{0},
        name_(arena),
        precompiled_charsmap_(arena),
        normalization_rule_tsv_(arena),
        add_dummy_prefix_{true},
        remove_extra_whitespaces_{true},
        escape_whitespaces_{true} {}

inline void NormalizerSpec::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
}
NormalizerSpec::~NormalizerSpec() {
  // @@protoc_insertion_point(destructor:sentencepiece.NormalizerSpec)
  SharedDtor(*this);
}
inline void NormalizerSpec::SharedDtor(MessageLite& self) {
  NormalizerSpec& this_ = static_cast<NormalizerSpec&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.name_.Destroy();
  this_._impl_.precompiled_charsmap_.Destroy();
  this_._impl_.normalization_rule_tsv_.Destroy();
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite NormalizerSpec_class_data_ =
    NormalizerSpec::InternalGenerateClassData_(NormalizerSpec_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
NormalizerSpec::GetClassData() const {
  return NormalizerSpec_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
NormalizerSpec::GetClassData() const {
  return NormalizerSpec_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const NormalizerSpec::ParseTableT_
    NormalizerSpec::_table_ =
        NormalizerSpec::InternalGenerateParseTable_(NormalizerSpec_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void NormalizerSpec::Clear() {
// @@protoc_insertion_point(message_clear_start:sentencepiece.NormalizerSpec)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_._extensions_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000003fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _impl_.name_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.precompiled_charsmap_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _impl_.normalization_rule_tsv_.ClearNonDefaultToEmpty();
    }
    _impl_.add_dummy_prefix_ = true;
    _impl_.remove_extra_whitespaces_ = true;
    _impl_.escape_whitespaces_ = true;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL NormalizerSpec::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const NormalizerSpec& this_ = static_cast<const NormalizerSpec&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL NormalizerSpec::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const NormalizerSpec& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:sentencepiece.NormalizerSpec)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional string name = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    const ::std::string& _s = this_._internal_name();
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // optional bytes precompiled_charsmap = 2;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    const ::std::string& _s = this_._internal_precompiled_charsmap();
    target = stream->WriteBytesMaybeAliased(2, _s, target);
  }

  // optional bool add_dummy_prefix = 3 [default = true];
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        3, this_._internal_add_dummy_prefix(), target);
  }

  // optional bool remove_extra_whitespaces = 4 [default = true];
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        4, this_._internal_remove_extra_whitespaces(), target);
  }

  // optional bool escape_whitespaces = 5 [default = true];
  if (CheckHasBit(cached_has_bits, 0x00000020U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        5, this_._internal_escape_whitespaces(), target);
  }

  // optional string normalization_rule_tsv = 6;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    const ::std::string& _s = this_._internal_normalization_rule_tsv();
    target = stream->WriteStringMaybeAliased(6, _s, target);
  }

  // All extensions.
  target = this_._impl_._extensions_._InternalSerializeAll(&default_instance(),
                                                    target, stream);
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:sentencepiece.NormalizerSpec)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t NormalizerSpec::ByteSizeLong(const MessageLite& base) {
  const NormalizerSpec& this_ = static_cast<const NormalizerSpec&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t NormalizerSpec::ByteSizeLong() const {
  const NormalizerSpec& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:sentencepiece.NormalizerSpec)
  ::size_t total_size = 0;
  total_size += this_._impl_._extensions_.ByteSize();

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  total_size += ::absl::popcount(0x00000038U & cached_has_bits) * 2;
  if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
    // optional string name = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_name());
    }
    // optional bytes precompiled_charsmap = 2;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
                                      this_._internal_precompiled_charsmap());
    }
    // optional string normalization_rule_tsv = 6;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_normalization_rule_tsv());
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void NormalizerSpec::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<NormalizerSpec*>(&to_msg);
  auto& from = static_cast<const NormalizerSpec&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:sentencepiece.NormalizerSpec)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000003fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_set_name(from._internal_name());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_internal_set_precompiled_charsmap(from._internal_precompiled_charsmap());
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_internal_set_normalization_rule_tsv(from._internal_normalization_rule_tsv());
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _this->_impl_.add_dummy_prefix_ = from._impl_.add_dummy_prefix_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      _this->_impl_.remove_extra_whitespaces_ = from._impl_.remove_extra_whitespaces_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      _this->_impl_.escape_whitespaces_ = from._impl_.escape_whitespaces_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_impl_._extensions_.MergeFrom(arena, &default_instance(),
                                from._impl_._extensions_, from.GetArena());
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

void NormalizerSpec::CopyFrom(const NormalizerSpec& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:sentencepiece.NormalizerSpec)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

PROTOBUF_NOINLINE bool NormalizerSpec::IsInitializedImpl(
    const MessageLite& msg) {
  auto& this_ = static_cast<const NormalizerSpec&>(msg);
  if (!this_._impl_._extensions_.IsInitialized(this_.GetArena(),
                                        &default_instance())) {
    return false;
  }
  return true;
}

void NormalizerSpec::InternalSwap(NormalizerSpec* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _impl_._extensions_.InternalSwap(&other->_impl_._extensions_);
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.precompiled_charsmap_, &other->_impl_.precompiled_charsmap_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.normalization_rule_tsv_, &other->_impl_.normalization_rule_tsv_, arena);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(NormalizerSpec, _impl_.escape_whitespaces_)
      + sizeof(NormalizerSpec::_impl_.escape_whitespaces_)
      - PROTOBUF_FIELD_OFFSET(NormalizerSpec, _impl_.add_dummy_prefix_)>(
          reinterpret_cast<char*>(&_impl_.add_dummy_prefix_),
          reinterpret_cast<char*>(&other->_impl_.add_dummy_prefix_));
}

// ===================================================================

SelfTestData_Sample::SelfTestData_Sample(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, SelfTestData_Sample_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:sentencepiece.SelfTestData.Sample)
}
PROTOBUF_NDEBUG_INLINE SelfTestData_Sample::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::sentencepiece::SelfTestData_Sample& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        input_(arena, from.input_),
        expected_(arena, from.expected_) {}

SelfTestData_Sample::SelfTestData_Sample(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const SelfTestData_Sample& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, SelfTestData_Sample_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SelfTestData_Sample* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);

  // @@protoc_insertion_point(copy_constructor:sentencepiece.SelfTestData.Sample)
}
PROTOBUF_NDEBUG_INLINE SelfTestData_Sample::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        input_(arena),
        expected_(arena) {}

inline void SelfTestData_Sample::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
}
SelfTestData_Sample::~SelfTestData_Sample() {
  // @@protoc_insertion_point(destructor:sentencepiece.SelfTestData.Sample)
  SharedDtor(*this);
}
inline void SelfTestData_Sample::SharedDtor(MessageLite& self) {
  SelfTestData_Sample& this_ = static_cast<SelfTestData_Sample&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.input_.Destroy();
  this_._impl_.expected_.Destroy();
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite SelfTestData_Sample_class_data_ =
    SelfTestData_Sample::InternalGenerateClassData_(SelfTestData_Sample_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
SelfTestData_Sample::GetClassData() const {
  return SelfTestData_Sample_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
SelfTestData_Sample::GetClassData() const {
  return SelfTestData_Sample_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const SelfTestData_Sample::ParseTableT_
    SelfTestData_Sample::_table_ =
        SelfTestData_Sample::InternalGenerateParseTable_(SelfTestData_Sample_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void SelfTestData_Sample::Clear() {
// @@protoc_insertion_point(message_clear_start:sentencepiece.SelfTestData.Sample)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _impl_.input_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.expected_.ClearNonDefaultToEmpty();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL SelfTestData_Sample::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const SelfTestData_Sample& this_ = static_cast<const SelfTestData_Sample&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL SelfTestData_Sample::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const SelfTestData_Sample& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:sentencepiece.SelfTestData.Sample)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional string input = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    const ::std::string& _s = this_._internal_input();
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // optional string expected = 2;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    const ::std::string& _s = this_._internal_expected();
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:sentencepiece.SelfTestData.Sample)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t SelfTestData_Sample::ByteSizeLong(const MessageLite& base) {
  const SelfTestData_Sample& this_ = static_cast<const SelfTestData_Sample&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t SelfTestData_Sample::ByteSizeLong() const {
  const SelfTestData_Sample& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:sentencepiece.SelfTestData.Sample)
  ::size_t total_size = 0;

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
    // optional string input = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_input());
    }
    // optional string expected = 2;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_expected());
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void SelfTestData_Sample::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<SelfTestData_Sample*>(&to_msg);
  auto& from = static_cast<const SelfTestData_Sample&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:sentencepiece.SelfTestData.Sample)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_set_input(from._internal_input());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_internal_set_expected(from._internal_expected());
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

void SelfTestData_Sample::CopyFrom(const SelfTestData_Sample& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:sentencepiece.SelfTestData.Sample)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}


void SelfTestData_Sample::InternalSwap(SelfTestData_Sample* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.input_, &other->_impl_.input_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.expected_, &other->_impl_.expected_, arena);
}

// ===================================================================

SelfTestData::SelfTestData(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, SelfTestData_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:sentencepiece.SelfTestData)
}
PROTOBUF_NDEBUG_INLINE SelfTestData::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::sentencepiece::SelfTestData& from_msg)
      : _extensions_ {}
        ,
        _has_bits_{from._has_bits_},
        _cached_size_{0},
        samples_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::sentencepiece::SelfTestData,
              PROTOBUF_FIELD_OFFSET(::sentencepiece::SelfTestData, _impl_.samples_)>()
          , from.samples_
        }
     {}

SelfTestData::SelfTestData(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const SelfTestData& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, SelfTestData_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SelfTestData* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  _impl_._extensions_.MergeFrom(arena, this, from._impl_._extensions_,
                                from.GetArena());

  // @@protoc_insertion_point(copy_constructor:sentencepiece.SelfTestData)
}
PROTOBUF_NDEBUG_INLINE SelfTestData::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _extensions_ {}
        ,
        _cached_size_{0},
        samples_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::sentencepiece::SelfTestData,
            PROTOBUF_FIELD_OFFSET(::sentencepiece::SelfTestData, _impl_.samples_)>()
         }
     {}

inline void SelfTestData::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
}
SelfTestData::~SelfTestData() {
  // @@protoc_insertion_point(destructor:sentencepiece.SelfTestData)
  SharedDtor(*this);
}
inline void SelfTestData::SharedDtor(MessageLite& self) {
  SelfTestData& this_ = static_cast<SelfTestData&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite SelfTestData_class_data_ =
    SelfTestData::InternalGenerateClassData_(SelfTestData_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
SelfTestData::GetClassData() const {
  return SelfTestData_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
SelfTestData::GetClassData() const {
  return SelfTestData_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const SelfTestData::ParseTableT_
    SelfTestData::_table_ =
        SelfTestData::InternalGenerateParseTable_(SelfTestData_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void SelfTestData::Clear() {
// @@protoc_insertion_point(message_clear_start:sentencepiece.SelfTestData)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_._extensions_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    _impl_.samples_.Clear();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL SelfTestData::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const SelfTestData& this_ = static_cast<const SelfTestData&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL SelfTestData::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const SelfTestData& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:sentencepiece.SelfTestData)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // repeated .sentencepiece.SelfTestData.Sample samples = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_samples_size());
         i < n; i++) {
      const auto& repfield = this_._internal_samples().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              1, repfield, repfield.GetCachedSize(),
              target, stream);
    }
  }

  // All extensions.
  target = this_._impl_._extensions_._InternalSerializeAll(&default_instance(),
                                                    target, stream);
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:sentencepiece.SelfTestData)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t SelfTestData::ByteSizeLong(const MessageLite& base) {
  const SelfTestData& this_ = static_cast<const SelfTestData&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t SelfTestData::ByteSizeLong() const {
  const SelfTestData& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:sentencepiece.SelfTestData)
  ::size_t total_size = 0;
  total_size += this_._impl_._extensions_.ByteSize();

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
   {
    // repeated .sentencepiece.SelfTestData.Sample samples = 1;
    cached_has_bits = this_._impl_._has_bits_[0];
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1UL * this_._internal_samples_size();
      for (const auto& msg : this_._internal_samples()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void SelfTestData::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<SelfTestData*>(&to_msg);
  auto& from = static_cast<const SelfTestData&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:sentencepiece.SelfTestData)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    _this->_internal_mutable_samples()->InternalMergeFromWithArena(
        ::google::protobuf::MessageLite::internal_visibility(), arena,
        from._internal_samples());
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_impl_._extensions_.MergeFrom(arena, &default_instance(),
                                from._impl_._extensions_, from.GetArena());
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

void SelfTestData::CopyFrom(const SelfTestData& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:sentencepiece.SelfTestData)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

PROTOBUF_NOINLINE bool SelfTestData::IsInitializedImpl(
    const MessageLite& msg) {
  auto& this_ = static_cast<const SelfTestData&>(msg);
  if (!this_._impl_._extensions_.IsInitialized(this_.GetArena(),
                                        &default_instance())) {
    return false;
  }
  return true;
}

void SelfTestData::InternalSwap(SelfTestData* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _impl_._extensions_.InternalSwap(&other->_impl_._extensions_);
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.samples_.InternalSwap(&other->_impl_.samples_);
}

// ===================================================================

ModelProto_SentencePiece::ModelProto_SentencePiece(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, ModelProto_SentencePiece_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:sentencepiece.ModelProto.SentencePiece)
}
PROTOBUF_NDEBUG_INLINE ModelProto_SentencePiece::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::sentencepiece::ModelProto_SentencePiece& from_msg)
      : _extensions_ {}
        ,
        _has_bits_{from._has_bits_},
        _cached_size_{0},
        piece_(arena, from.piece_) {}

ModelProto_SentencePiece::ModelProto_SentencePiece(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const ModelProto_SentencePiece& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, ModelProto_SentencePiece_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  ModelProto_SentencePiece* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  _impl_._extensions_.MergeFrom(arena, this, from._impl_._extensions_,
                                from.GetArena());
  ::memcpy(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, score_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, score_),
           offsetof(Impl_, type_) -
               offsetof(Impl_, score_) +
               sizeof(Impl_::type_));

  // @@protoc_insertion_point(copy_constructor:sentencepiece.ModelProto.SentencePiece)
}
PROTOBUF_NDEBUG_INLINE ModelProto_SentencePiece::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _extensions_ {}
        ,
        _cached_size_{0},
        piece_(arena),
        type_{static_cast< ::sentencepiece::ModelProto_SentencePiece_Type >(1)} {}

inline void ModelProto_SentencePiece::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  _impl_.score_ = {};
}
ModelProto_SentencePiece::~ModelProto_SentencePiece() {
  // @@protoc_insertion_point(destructor:sentencepiece.ModelProto.SentencePiece)
  SharedDtor(*this);
}
inline void ModelProto_SentencePiece::SharedDtor(MessageLite& self) {
  ModelProto_SentencePiece& this_ = static_cast<ModelProto_SentencePiece&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.piece_.Destroy();
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite ModelProto_SentencePiece_class_data_ =
    ModelProto_SentencePiece::InternalGenerateClassData_(ModelProto_SentencePiece_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
ModelProto_SentencePiece::GetClassData() const {
  return ModelProto_SentencePiece_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
ModelProto_SentencePiece::GetClassData() const {
  return ModelProto_SentencePiece_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ModelProto_SentencePiece::ParseTableT_
    ModelProto_SentencePiece::_table_ =
        ModelProto_SentencePiece::InternalGenerateParseTable_(ModelProto_SentencePiece_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void ModelProto_SentencePiece::Clear() {
// @@protoc_insertion_point(message_clear_start:sentencepiece.ModelProto.SentencePiece)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_._extensions_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    _impl_.piece_.ClearNonDefaultToEmpty();
  }
  if (BatchCheckHasBit(cached_has_bits, 0x00000006U)) {
    _impl_.score_ = 0;
    _impl_.type_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL ModelProto_SentencePiece::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const ModelProto_SentencePiece& this_ = static_cast<const ModelProto_SentencePiece&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL ModelProto_SentencePiece::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const ModelProto_SentencePiece& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:sentencepiece.ModelProto.SentencePiece)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // optional string piece = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    const ::std::string& _s = this_._internal_piece();
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // optional float score = 2;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(
        2, this_._internal_score(), target);
  }

  // optional .sentencepiece.ModelProto.SentencePiece.Type type = 3 [default = NORMAL];
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        3, this_._internal_type(), target);
  }

  // All extensions.
  target = this_._impl_._extensions_._InternalSerializeAll(&default_instance(),
                                                    target, stream);
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:sentencepiece.ModelProto.SentencePiece)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t ModelProto_SentencePiece::ByteSizeLong(const MessageLite& base) {
  const ModelProto_SentencePiece& this_ = static_cast<const ModelProto_SentencePiece&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t ModelProto_SentencePiece::ByteSizeLong() const {
  const ModelProto_SentencePiece& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:sentencepiece.ModelProto.SentencePiece)
  ::size_t total_size = 0;
  total_size += this_._impl_._extensions_.ByteSize();

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  total_size += static_cast<bool>(0x00000002U & cached_has_bits) * 5;
  if (BatchCheckHasBit(cached_has_bits, 0x00000005U)) {
    // optional string piece = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                      this_._internal_piece());
    }
    // optional .sentencepiece.ModelProto.SentencePiece.Type type = 3 [default = NORMAL];
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += 1 +
                    ::_pbi::WireFormatLite::EnumSize(this_._internal_type());
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void ModelProto_SentencePiece::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<ModelProto_SentencePiece*>(&to_msg);
  auto& from = static_cast<const ModelProto_SentencePiece&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:sentencepiece.ModelProto.SentencePiece)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_set_piece(from._internal_piece());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_impl_.score_ = from._impl_.score_;
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_impl_.type_ = from._impl_.type_;
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_impl_._extensions_.MergeFrom(arena, &default_instance(),
                                from._impl_._extensions_, from.GetArena());
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

void ModelProto_SentencePiece::CopyFrom(const ModelProto_SentencePiece& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:sentencepiece.ModelProto.SentencePiece)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

PROTOBUF_NOINLINE bool ModelProto_SentencePiece::IsInitializedImpl(
    const MessageLite& msg) {
  auto& this_ = static_cast<const ModelProto_SentencePiece&>(msg);
  if (!this_._impl_._extensions_.IsInitialized(this_.GetArena(),
                                        &default_instance())) {
    return false;
  }
  return true;
}

void ModelProto_SentencePiece::InternalSwap(ModelProto_SentencePiece* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _impl_._extensions_.InternalSwap(&other->_impl_._extensions_);
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.piece_, &other->_impl_.piece_, arena);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ModelProto_SentencePiece, _impl_.type_)
      + sizeof(ModelProto_SentencePiece::_impl_.type_)
      - PROTOBUF_FIELD_OFFSET(ModelProto_SentencePiece, _impl_.score_)>(
          reinterpret_cast<char*>(&_impl_.score_),
          reinterpret_cast<char*>(&other->_impl_.score_));
}

// ===================================================================

ModelProto::ModelProto(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, ModelProto_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:sentencepiece.ModelProto)
}
PROTOBUF_NDEBUG_INLINE ModelProto::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::sentencepiece::ModelProto& from_msg)
      : _extensions_ {}
        ,
        _has_bits_{from._has_bits_},
        _cached_size_{0},
        pieces_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::sentencepiece::ModelProto,
              PROTOBUF_FIELD_OFFSET(::sentencepiece::ModelProto, _impl_.pieces_)>()
          , from.pieces_
        }
     {}

ModelProto::ModelProto(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const ModelProto& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::MessageLite(arena, ModelProto_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::MessageLite(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  ModelProto* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  _impl_._extensions_.MergeFrom(arena, this, from._impl_._extensions_,
                                from.GetArena());
  ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  _impl_.trainer_spec_ = (CheckHasBit(cached_has_bits, 0x00000002U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.trainer_spec_)
                : nullptr;
  _impl_.normalizer_spec_ = (CheckHasBit(cached_has_bits, 0x00000004U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.normalizer_spec_)
                : nullptr;
  _impl_.self_test_data_ = (CheckHasBit(cached_has_bits, 0x00000008U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.self_test_data_)
                : nullptr;
  _impl_.denormalizer_spec_ = (CheckHasBit(cached_has_bits, 0x00000010U))
                ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.denormalizer_spec_)
                : nullptr;

  // @@protoc_insertion_point(copy_constructor:sentencepiece.ModelProto)
}
PROTOBUF_NDEBUG_INLINE ModelProto::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _extensions_ {}
        ,
        _cached_size_{0},
        pieces_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::sentencepiece::ModelProto,
            PROTOBUF_FIELD_OFFSET(::sentencepiece::ModelProto, _impl_.pieces_)>()
         }
     {}

inline void ModelProto::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, trainer_spec_),
           0,
           offsetof(Impl_, denormalizer_spec_) -
               offsetof(Impl_, trainer_spec_) +
               sizeof(Impl_::denormalizer_spec_));
}
ModelProto::~ModelProto() {
  // @@protoc_insertion_point(destructor:sentencepiece.ModelProto)
  SharedDtor(*this);
}
inline void ModelProto::SharedDtor(MessageLite& self) {
  ModelProto& this_ = static_cast<ModelProto&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::std::string>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  delete this_._impl_.trainer_spec_;
  delete this_._impl_.normalizer_spec_;
  delete this_._impl_.self_test_data_;
  delete this_._impl_.denormalizer_spec_;
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite ModelProto_class_data_ =
    ModelProto::InternalGenerateClassData_(ModelProto_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
ModelProto::GetClassData() const {
  return ModelProto_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
ModelProto::GetClassData() const {
  return ModelProto_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ModelProto::ParseTableT_
    ModelProto::_table_ =
        ModelProto::InternalGenerateParseTable_(ModelProto_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void ModelProto::Clear() {
// @@protoc_insertion_point(message_clear_start:sentencepiece.ModelProto)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_._extensions_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _impl_.pieces_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ABSL_DCHECK(_impl_.trainer_spec_ != nullptr);
      _impl_.trainer_spec_->Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      ABSL_DCHECK(_impl_.normalizer_spec_ != nullptr);
      _impl_.normalizer_spec_->Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      ABSL_DCHECK(_impl_.self_test_data_ != nullptr);
      _impl_.self_test_data_->Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      ABSL_DCHECK(_impl_.denormalizer_spec_ != nullptr);
      _impl_.denormalizer_spec_->Clear();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::std::string>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL ModelProto::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const ModelProto& this_ = static_cast<const ModelProto&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL ModelProto::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const ModelProto& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:sentencepiece.ModelProto)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // repeated .sentencepiece.ModelProto.SentencePiece pieces = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_pieces_size());
         i < n; i++) {
      const auto& repfield = this_._internal_pieces().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              1, repfield, repfield.GetCachedSize(),
              target, stream);
    }
  }

  // optional .sentencepiece.TrainerSpec trainer_spec = 2;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        2, *this_._impl_.trainer_spec_, this_._impl_.trainer_spec_->GetCachedSize(), target,
        stream);
  }

  // optional .sentencepiece.NormalizerSpec normalizer_spec = 3;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        3, *this_._impl_.normalizer_spec_, this_._impl_.normalizer_spec_->GetCachedSize(), target,
        stream);
  }

  // optional .sentencepiece.SelfTestData self_test_data = 4;
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        4, *this_._impl_.self_test_data_, this_._impl_.self_test_data_->GetCachedSize(), target,
        stream);
  }

  // optional .sentencepiece.NormalizerSpec denormalizer_spec = 5;
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        5, *this_._impl_.denormalizer_spec_, this_._impl_.denormalizer_spec_->GetCachedSize(), target,
        stream);
  }

  // All extensions.
  target = this_._impl_._extensions_._InternalSerializeAll(&default_instance(),
                                                    target, stream);
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(
        this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:sentencepiece.ModelProto)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t ModelProto::ByteSizeLong(const MessageLite& base) {
  const ModelProto& this_ = static_cast<const ModelProto&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t ModelProto::ByteSizeLong() const {
  const ModelProto& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:sentencepiece.ModelProto)
  ::size_t total_size = 0;
  total_size += this_._impl_._extensions_.ByteSize();

  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void)cached_has_bits;

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) {
    // repeated .sentencepiece.ModelProto.SentencePiece pieces = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1UL * this_._internal_pieces_size();
      for (const auto& msg : this_._internal_pieces()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // optional .sentencepiece.TrainerSpec trainer_spec = 2;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.trainer_spec_);
    }
    // optional .sentencepiece.NormalizerSpec normalizer_spec = 3;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.normalizer_spec_);
    }
    // optional .sentencepiece.SelfTestData self_test_data = 4;
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.self_test_data_);
    }
    // optional .sentencepiece.NormalizerSpec denormalizer_spec = 5;
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.denormalizer_spec_);
    }
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
  }
  this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
  return total_size;
}

void ModelProto::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<ModelProto*>(&to_msg);
  auto& from = static_cast<const ModelProto&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:sentencepiece.ModelProto)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_mutable_pieces()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_pieces());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      ABSL_DCHECK(from._impl_.trainer_spec_ != nullptr);
      if (_this->_impl_.trainer_spec_ == nullptr) {
        _this->_impl_.trainer_spec_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.trainer_spec_);
      } else {
        _this->_impl_.trainer_spec_->MergeFrom(*from._impl_.trainer_spec_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      ABSL_DCHECK(from._impl_.normalizer_spec_ != nullptr);
      if (_this->_impl_.normalizer_spec_ == nullptr) {
        _this->_impl_.normalizer_spec_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.normalizer_spec_);
      } else {
        _this->_impl_.normalizer_spec_->MergeFrom(*from._impl_.normalizer_spec_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      ABSL_DCHECK(from._impl_.self_test_data_ != nullptr);
      if (_this->_impl_.self_test_data_ == nullptr) {
        _this->_impl_.self_test_data_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.self_test_data_);
      } else {
        _this->_impl_.self_test_data_->MergeFrom(*from._impl_.self_test_data_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      ABSL_DCHECK(from._impl_.denormalizer_spec_ != nullptr);
      if (_this->_impl_.denormalizer_spec_ == nullptr) {
        _this->_impl_.denormalizer_spec_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.denormalizer_spec_);
      } else {
        _this->_impl_.denormalizer_spec_->MergeFrom(*from._impl_.denormalizer_spec_);
      }
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_impl_._extensions_.MergeFrom(arena, &default_instance(),
                                from._impl_._extensions_, from.GetArena());
  _this->_internal_metadata_.MergeFrom<::std::string>(
      from._internal_metadata_);
}

void ModelProto::CopyFrom(const ModelProto& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:sentencepiece.ModelProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

PROTOBUF_NOINLINE bool ModelProto::IsInitializedImpl(
    const MessageLite& msg) {
  auto& this_ = static_cast<const ModelProto&>(msg);
  if (!this_._impl_._extensions_.IsInitialized(this_.GetArena(),
                                        &default_instance())) {
    return false;
  }
  if (!::google::protobuf::internal::AllAreInitialized(this_._internal_pieces()))
    return false;
  if (CheckHasBit(this_._impl_._has_bits_[0], 0x00000002U)) {
    if (!this_._impl_.trainer_spec_->IsInitialized()) return false;
  }
  if (CheckHasBit(this_._impl_._has_bits_[0], 0x00000004U)) {
    if (!this_._impl_.normalizer_spec_->IsInitialized()) return false;
  }
  if (CheckHasBit(this_._impl_._has_bits_[0], 0x00000008U)) {
    if (!this_._impl_.self_test_data_->IsInitialized()) return false;
  }
  if (CheckHasBit(this_._impl_._has_bits_[0], 0x00000010U)) {
    if (!this_._impl_.denormalizer_spec_->IsInitialized()) return false;
  }
  return true;
}

void ModelProto::InternalSwap(ModelProto* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _impl_._extensions_.InternalSwap(&other->_impl_._extensions_);
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.pieces_.InternalSwap(&other->_impl_.pieces_);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.denormalizer_spec_)
      + sizeof(ModelProto::_impl_.denormalizer_spec_)
      - PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.trainer_spec_)>(
          reinterpret_cast<char*>(&_impl_.trainer_spec_),
          reinterpret_cast<char*>(&other->_impl_.trainer_spec_));
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace sentencepiece
namespace google {
namespace protobuf {
}  // namespace protobuf
}  // namespace google
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
