/src/sentencepiece/src/builtin_pb/sentencepiece.pb.h
Line | Count | Source |
1 | | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | | // source: sentencepiece.proto |
3 | | |
4 | | #ifndef GOOGLE_PROTOBUF_INCLUDED_sentencepiece_2eproto |
5 | | #define GOOGLE_PROTOBUF_INCLUDED_sentencepiece_2eproto |
6 | | |
7 | | #include <limits> |
8 | | #include <string> |
9 | | |
10 | | #include <google/protobuf/port_def.inc> |
11 | | #if PROTOBUF_VERSION < 3014000 |
12 | | #error This file was generated by a newer version of protoc which is |
13 | | #error incompatible with your Protocol Buffer headers. Please update |
14 | | #error your headers. |
15 | | #endif |
16 | | #if 3014000 < PROTOBUF_MIN_PROTOC_VERSION |
17 | | #error This file was generated by an older version of protoc which is |
18 | | #error incompatible with your Protocol Buffer headers. Please |
19 | | #error regenerate this file with a newer version of protoc. |
20 | | #endif |
21 | | |
22 | | #include <google/protobuf/port_undef.inc> |
23 | | #include <google/protobuf/io/coded_stream.h> |
24 | | #include <google/protobuf/arena.h> |
25 | | #include <google/protobuf/arenastring.h> |
26 | | #include <google/protobuf/generated_message_table_driven.h> |
27 | | #include <google/protobuf/generated_message_util.h> |
28 | | #include <google/protobuf/metadata_lite.h> |
29 | | #include <google/protobuf/message_lite.h> |
30 | | #include <google/protobuf/repeated_field.h> // IWYU pragma: export |
31 | | #include <google/protobuf/extension_set.h> // IWYU pragma: export |
32 | | // @@protoc_insertion_point(includes) |
33 | | #include <google/protobuf/port_def.inc> |
34 | | #define PROTOBUF_INTERNAL_EXPORT_sentencepiece_2eproto |
35 | | PROTOBUF_NAMESPACE_OPEN |
36 | | namespace internal { |
37 | | class AnyMetadata; |
38 | | } // namespace internal |
39 | | PROTOBUF_NAMESPACE_CLOSE |
40 | | |
41 | | // Internal implementation detail -- do not use these members. |
42 | | struct TableStruct_sentencepiece_2eproto { |
43 | | static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] |
44 | | PROTOBUF_SECTION_VARIABLE(protodesc_cold); |
45 | | static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] |
46 | | PROTOBUF_SECTION_VARIABLE(protodesc_cold); |
47 | | static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[3] |
48 | | PROTOBUF_SECTION_VARIABLE(protodesc_cold); |
49 | | static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; |
50 | | static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; |
51 | | static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; |
52 | | }; |
53 | | namespace sentencepiece { |
54 | | class NBestSentencePieceText; |
55 | | class NBestSentencePieceTextDefaultTypeInternal; |
56 | | extern NBestSentencePieceTextDefaultTypeInternal _NBestSentencePieceText_default_instance_; |
57 | | class SentencePieceText; |
58 | | class SentencePieceTextDefaultTypeInternal; |
59 | | extern SentencePieceTextDefaultTypeInternal _SentencePieceText_default_instance_; |
60 | | class SentencePieceText_SentencePiece; |
61 | | class SentencePieceText_SentencePieceDefaultTypeInternal; |
62 | | extern SentencePieceText_SentencePieceDefaultTypeInternal _SentencePieceText_SentencePiece_default_instance_; |
63 | | } // namespace sentencepiece |
64 | | PROTOBUF_NAMESPACE_OPEN |
65 | | template<> ::sentencepiece::NBestSentencePieceText* Arena::CreateMaybeMessage<::sentencepiece::NBestSentencePieceText>(Arena*); |
66 | | template<> ::sentencepiece::SentencePieceText* Arena::CreateMaybeMessage<::sentencepiece::SentencePieceText>(Arena*); |
67 | | template<> ::sentencepiece::SentencePieceText_SentencePiece* Arena::CreateMaybeMessage<::sentencepiece::SentencePieceText_SentencePiece>(Arena*); |
68 | | PROTOBUF_NAMESPACE_CLOSE |
69 | | namespace sentencepiece { |
70 | | |
71 | | // =================================================================== |
72 | | |
73 | | class SentencePieceText_SentencePiece PROTOBUF_FINAL : |
74 | | public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:sentencepiece.SentencePieceText.SentencePiece) */ { |
75 | | public: |
76 | 1 | inline SentencePieceText_SentencePiece() : SentencePieceText_SentencePiece(nullptr) {} |
77 | | virtual ~SentencePieceText_SentencePiece(); |
78 | | |
79 | | SentencePieceText_SentencePiece(const SentencePieceText_SentencePiece& from); |
80 | | SentencePieceText_SentencePiece(SentencePieceText_SentencePiece&& from) noexcept |
81 | 0 | : SentencePieceText_SentencePiece() { |
82 | 0 | *this = ::std::move(from); |
83 | 0 | } |
84 | | |
85 | 0 | inline SentencePieceText_SentencePiece& operator=(const SentencePieceText_SentencePiece& from) { |
86 | 0 | CopyFrom(from); |
87 | 0 | return *this; |
88 | 0 | } |
89 | 0 | inline SentencePieceText_SentencePiece& operator=(SentencePieceText_SentencePiece&& from) noexcept { |
90 | 0 | if (GetArena() == from.GetArena()) { |
91 | 0 | if (this != &from) InternalSwap(&from); |
92 | 0 | } else { |
93 | 0 | CopyFrom(from); |
94 | 0 | } |
95 | 0 | return *this; |
96 | 0 | } |
97 | | |
98 | 0 | inline const std::string& unknown_fields() const { |
99 | 0 | return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); |
100 | 0 | } |
101 | 0 | inline std::string* mutable_unknown_fields() { |
102 | 0 | return _internal_metadata_.mutable_unknown_fields<std::string>(); |
103 | 0 | } |
104 | | |
105 | | static const SentencePieceText_SentencePiece& default_instance(); |
106 | | |
107 | 0 | static inline const SentencePieceText_SentencePiece* internal_default_instance() { |
108 | 0 | return reinterpret_cast<const SentencePieceText_SentencePiece*>( |
109 | 0 | &_SentencePieceText_SentencePiece_default_instance_); |
110 | 0 | } |
111 | | static constexpr int kIndexInFileMessages = |
112 | | 0; |
113 | | |
114 | 0 | friend void swap(SentencePieceText_SentencePiece& a, SentencePieceText_SentencePiece& b) { |
115 | 0 | a.Swap(&b); |
116 | 0 | } |
117 | 0 | inline void Swap(SentencePieceText_SentencePiece* other) { |
118 | 0 | if (other == this) return; |
119 | 0 | if (GetArena() == other->GetArena()) { |
120 | 0 | InternalSwap(other); |
121 | 0 | } else { |
122 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); |
123 | 0 | } |
124 | 0 | } |
125 | 0 | void UnsafeArenaSwap(SentencePieceText_SentencePiece* other) { |
126 | 0 | if (other == this) return; |
127 | 0 | GOOGLE_DCHECK(GetArena() == other->GetArena()); |
128 | 0 | InternalSwap(other); |
129 | 0 | } |
130 | | |
131 | | // implements Message ---------------------------------------------- |
132 | | |
133 | 0 | inline SentencePieceText_SentencePiece* New() const final { |
134 | 0 | return CreateMaybeMessage<SentencePieceText_SentencePiece>(nullptr); |
135 | 0 | } |
136 | | |
137 | 0 | SentencePieceText_SentencePiece* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { |
138 | 0 | return CreateMaybeMessage<SentencePieceText_SentencePiece>(arena); |
139 | 0 | } |
140 | | void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) |
141 | | final; |
142 | | void CopyFrom(const SentencePieceText_SentencePiece& from); |
143 | | void MergeFrom(const SentencePieceText_SentencePiece& from); |
144 | | PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; |
145 | | bool IsInitialized() const final; |
146 | | |
147 | | size_t ByteSizeLong() const final; |
148 | | const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; |
149 | | ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( |
150 | | ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; |
151 | | void DiscardUnknownFields(); |
152 | 0 | int GetCachedSize() const final { return _cached_size_.Get(); } |
153 | | |
154 | | private: |
155 | | inline void SharedCtor(); |
156 | | inline void SharedDtor(); |
157 | | void SetCachedSize(int size) const; |
158 | | void InternalSwap(SentencePieceText_SentencePiece* other); |
159 | | friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; |
160 | 0 | static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { |
161 | 0 | return "sentencepiece.SentencePieceText.SentencePiece"; |
162 | 0 | } |
163 | | protected: |
164 | | explicit SentencePieceText_SentencePiece(::PROTOBUF_NAMESPACE_ID::Arena* arena); |
165 | | private: |
166 | | static void ArenaDtor(void* object); |
167 | | inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); |
168 | | public: |
169 | | |
170 | | std::string GetTypeName() const final; |
171 | | |
172 | | // nested types ---------------------------------------------------- |
173 | | |
174 | | // accessors ------------------------------------------------------- |
175 | | |
176 | | enum : int { |
177 | | kPieceFieldNumber = 1, |
178 | | kSurfaceFieldNumber = 3, |
179 | | kIdFieldNumber = 2, |
180 | | kBeginFieldNumber = 4, |
181 | | kEndFieldNumber = 5, |
182 | | }; |
183 | | // optional string piece = 1; |
184 | | bool has_piece() const; |
185 | | private: |
186 | | bool _internal_has_piece() const; |
187 | | public: |
188 | | void clear_piece(); |
189 | | const std::string& piece() const; |
190 | | void set_piece(const std::string& value); |
191 | | void set_piece(std::string&& value); |
192 | | void set_piece(const char* value); |
193 | | void set_piece(const char* value, size_t size); |
194 | | std::string* mutable_piece(); |
195 | | std::string* release_piece(); |
196 | | void set_allocated_piece(std::string* piece); |
197 | | private: |
198 | | const std::string& _internal_piece() const; |
199 | | void _internal_set_piece(const std::string& value); |
200 | | std::string* _internal_mutable_piece(); |
201 | | public: |
202 | | |
203 | | // optional string surface = 3; |
204 | | bool has_surface() const; |
205 | | private: |
206 | | bool _internal_has_surface() const; |
207 | | public: |
208 | | void clear_surface(); |
209 | | const std::string& surface() const; |
210 | | void set_surface(const std::string& value); |
211 | | void set_surface(std::string&& value); |
212 | | void set_surface(const char* value); |
213 | | void set_surface(const char* value, size_t size); |
214 | | std::string* mutable_surface(); |
215 | | std::string* release_surface(); |
216 | | void set_allocated_surface(std::string* surface); |
217 | | private: |
218 | | const std::string& _internal_surface() const; |
219 | | void _internal_set_surface(const std::string& value); |
220 | | std::string* _internal_mutable_surface(); |
221 | | public: |
222 | | |
223 | | // optional uint32 id = 2; |
224 | | bool has_id() const; |
225 | | private: |
226 | | bool _internal_has_id() const; |
227 | | public: |
228 | | void clear_id(); |
229 | | ::PROTOBUF_NAMESPACE_ID::uint32 id() const; |
230 | | void set_id(::PROTOBUF_NAMESPACE_ID::uint32 value); |
231 | | private: |
232 | | ::PROTOBUF_NAMESPACE_ID::uint32 _internal_id() const; |
233 | | void _internal_set_id(::PROTOBUF_NAMESPACE_ID::uint32 value); |
234 | | public: |
235 | | |
236 | | // optional uint32 begin = 4; |
237 | | bool has_begin() const; |
238 | | private: |
239 | | bool _internal_has_begin() const; |
240 | | public: |
241 | | void clear_begin(); |
242 | | ::PROTOBUF_NAMESPACE_ID::uint32 begin() const; |
243 | | void set_begin(::PROTOBUF_NAMESPACE_ID::uint32 value); |
244 | | private: |
245 | | ::PROTOBUF_NAMESPACE_ID::uint32 _internal_begin() const; |
246 | | void _internal_set_begin(::PROTOBUF_NAMESPACE_ID::uint32 value); |
247 | | public: |
248 | | |
249 | | // optional uint32 end = 5; |
250 | | bool has_end() const; |
251 | | private: |
252 | | bool _internal_has_end() const; |
253 | | public: |
254 | | void clear_end(); |
255 | | ::PROTOBUF_NAMESPACE_ID::uint32 end() const; |
256 | | void set_end(::PROTOBUF_NAMESPACE_ID::uint32 value); |
257 | | private: |
258 | | ::PROTOBUF_NAMESPACE_ID::uint32 _internal_end() const; |
259 | | void _internal_set_end(::PROTOBUF_NAMESPACE_ID::uint32 value); |
260 | | public: |
261 | | |
262 | | GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(SentencePieceText_SentencePiece) |
263 | | // @@protoc_insertion_point(class_scope:sentencepiece.SentencePieceText.SentencePiece) |
264 | | private: |
265 | | class _Internal; |
266 | | |
267 | | ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; |
268 | | |
269 | | template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; |
270 | | typedef void InternalArenaConstructable_; |
271 | | typedef void DestructorSkippable_; |
272 | | ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; |
273 | | mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; |
274 | | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr piece_; |
275 | | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr surface_; |
276 | | ::PROTOBUF_NAMESPACE_ID::uint32 id_; |
277 | | ::PROTOBUF_NAMESPACE_ID::uint32 begin_; |
278 | | ::PROTOBUF_NAMESPACE_ID::uint32 end_; |
279 | | friend struct ::TableStruct_sentencepiece_2eproto; |
280 | | }; |
281 | | // ------------------------------------------------------------------- |
282 | | |
283 | | class SentencePieceText PROTOBUF_FINAL : |
284 | | public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:sentencepiece.SentencePieceText) */ { |
285 | | public: |
286 | 114 | inline SentencePieceText() : SentencePieceText(nullptr) {} |
287 | | virtual ~SentencePieceText(); |
288 | | |
289 | | SentencePieceText(const SentencePieceText& from); |
290 | | SentencePieceText(SentencePieceText&& from) noexcept |
291 | 0 | : SentencePieceText() { |
292 | 0 | *this = ::std::move(from); |
293 | 0 | } |
294 | | |
295 | 0 | inline SentencePieceText& operator=(const SentencePieceText& from) { |
296 | 0 | CopyFrom(from); |
297 | 0 | return *this; |
298 | 0 | } |
299 | 0 | inline SentencePieceText& operator=(SentencePieceText&& from) noexcept { |
300 | 0 | if (GetArena() == from.GetArena()) { |
301 | 0 | if (this != &from) InternalSwap(&from); |
302 | 0 | } else { |
303 | 0 | CopyFrom(from); |
304 | 0 | } |
305 | 0 | return *this; |
306 | 0 | } |
307 | | |
308 | 0 | inline const std::string& unknown_fields() const { |
309 | 0 | return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); |
310 | 0 | } |
311 | 0 | inline std::string* mutable_unknown_fields() { |
312 | 0 | return _internal_metadata_.mutable_unknown_fields<std::string>(); |
313 | 0 | } |
314 | | |
315 | | static const SentencePieceText& default_instance(); |
316 | | |
317 | 113 | static inline const SentencePieceText* internal_default_instance() { |
318 | 113 | return reinterpret_cast<const SentencePieceText*>( |
319 | 113 | &_SentencePieceText_default_instance_); |
320 | 113 | } |
321 | | static constexpr int kIndexInFileMessages = |
322 | | 1; |
323 | | |
324 | 0 | friend void swap(SentencePieceText& a, SentencePieceText& b) { |
325 | 0 | a.Swap(&b); |
326 | 0 | } |
327 | 0 | inline void Swap(SentencePieceText* other) { |
328 | 0 | if (other == this) return; |
329 | 0 | if (GetArena() == other->GetArena()) { |
330 | 0 | InternalSwap(other); |
331 | 0 | } else { |
332 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); |
333 | 0 | } |
334 | 0 | } |
335 | 0 | void UnsafeArenaSwap(SentencePieceText* other) { |
336 | 0 | if (other == this) return; |
337 | 0 | GOOGLE_DCHECK(GetArena() == other->GetArena()); |
338 | 0 | InternalSwap(other); |
339 | 0 | } |
340 | | |
341 | | // implements Message ---------------------------------------------- |
342 | | |
343 | 0 | inline SentencePieceText* New() const final { |
344 | 0 | return CreateMaybeMessage<SentencePieceText>(nullptr); |
345 | 0 | } |
346 | | |
347 | 0 | SentencePieceText* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { |
348 | 0 | return CreateMaybeMessage<SentencePieceText>(arena); |
349 | 0 | } |
350 | | void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) |
351 | | final; |
352 | | void CopyFrom(const SentencePieceText& from); |
353 | | void MergeFrom(const SentencePieceText& from); |
354 | | PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; |
355 | | bool IsInitialized() const final; |
356 | | |
357 | | size_t ByteSizeLong() const final; |
358 | | const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; |
359 | | ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( |
360 | | ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; |
361 | | void DiscardUnknownFields(); |
362 | 0 | int GetCachedSize() const final { return _cached_size_.Get(); } |
363 | | |
364 | | private: |
365 | | inline void SharedCtor(); |
366 | | inline void SharedDtor(); |
367 | | void SetCachedSize(int size) const; |
368 | | void InternalSwap(SentencePieceText* other); |
369 | | friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; |
370 | 0 | static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { |
371 | 0 | return "sentencepiece.SentencePieceText"; |
372 | 0 | } |
373 | | protected: |
374 | | explicit SentencePieceText(::PROTOBUF_NAMESPACE_ID::Arena* arena); |
375 | | private: |
376 | | static void ArenaDtor(void* object); |
377 | | inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); |
378 | | public: |
379 | | |
380 | | std::string GetTypeName() const final; |
381 | | |
382 | | // nested types ---------------------------------------------------- |
383 | | |
384 | | typedef SentencePieceText_SentencePiece SentencePiece; |
385 | | |
386 | | // accessors ------------------------------------------------------- |
387 | | |
388 | | enum : int { |
389 | | kPiecesFieldNumber = 2, |
390 | | kTextFieldNumber = 1, |
391 | | kScoreFieldNumber = 3, |
392 | | }; |
393 | | // repeated .sentencepiece.SentencePieceText.SentencePiece pieces = 2; |
394 | | int pieces_size() const; |
395 | | private: |
396 | | int _internal_pieces_size() const; |
397 | | public: |
398 | | void clear_pieces(); |
399 | | ::sentencepiece::SentencePieceText_SentencePiece* mutable_pieces(int index); |
400 | | ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::sentencepiece::SentencePieceText_SentencePiece >* |
401 | | mutable_pieces(); |
402 | | private: |
403 | | const ::sentencepiece::SentencePieceText_SentencePiece& _internal_pieces(int index) const; |
404 | | ::sentencepiece::SentencePieceText_SentencePiece* _internal_add_pieces(); |
405 | | public: |
406 | | const ::sentencepiece::SentencePieceText_SentencePiece& pieces(int index) const; |
407 | | ::sentencepiece::SentencePieceText_SentencePiece* add_pieces(); |
408 | | const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::sentencepiece::SentencePieceText_SentencePiece >& |
409 | | pieces() const; |
410 | | |
411 | | // optional string text = 1; |
412 | | bool has_text() const; |
413 | | private: |
414 | | bool _internal_has_text() const; |
415 | | public: |
416 | | void clear_text(); |
417 | | const std::string& text() const; |
418 | | void set_text(const std::string& value); |
419 | | void set_text(std::string&& value); |
420 | | void set_text(const char* value); |
421 | | void set_text(const char* value, size_t size); |
422 | | std::string* mutable_text(); |
423 | | std::string* release_text(); |
424 | | void set_allocated_text(std::string* text); |
425 | | private: |
426 | | const std::string& _internal_text() const; |
427 | | void _internal_set_text(const std::string& value); |
428 | | std::string* _internal_mutable_text(); |
429 | | public: |
430 | | |
431 | | // optional float score = 3; |
432 | | bool has_score() const; |
433 | | private: |
434 | | bool _internal_has_score() const; |
435 | | public: |
436 | | void clear_score(); |
437 | | float score() const; |
438 | | void set_score(float value); |
439 | | private: |
440 | | float _internal_score() const; |
441 | | void _internal_set_score(float value); |
442 | | public: |
443 | | |
444 | | GOOGLE_PROTOBUF_EXTENSION_ACCESSORS(SentencePieceText) |
445 | | // @@protoc_insertion_point(class_scope:sentencepiece.SentencePieceText) |
446 | | private: |
447 | | class _Internal; |
448 | | |
449 | | ::PROTOBUF_NAMESPACE_ID::internal::ExtensionSet _extensions_; |
450 | | |
451 | | template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; |
452 | | typedef void InternalArenaConstructable_; |
453 | | typedef void DestructorSkippable_; |
454 | | ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; |
455 | | mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; |
456 | | ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::sentencepiece::SentencePieceText_SentencePiece > pieces_; |
457 | | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr text_; |
458 | | float score_; |
459 | | friend struct ::TableStruct_sentencepiece_2eproto; |
460 | | }; |
461 | | // ------------------------------------------------------------------- |
462 | | |
463 | | class NBestSentencePieceText PROTOBUF_FINAL : |
464 | | public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:sentencepiece.NBestSentencePieceText) */ { |
465 | | public: |
466 | 0 | inline NBestSentencePieceText() : NBestSentencePieceText(nullptr) {} |
467 | | virtual ~NBestSentencePieceText(); |
468 | | |
469 | | NBestSentencePieceText(const NBestSentencePieceText& from); |
470 | | NBestSentencePieceText(NBestSentencePieceText&& from) noexcept |
471 | 0 | : NBestSentencePieceText() { |
472 | 0 | *this = ::std::move(from); |
473 | 0 | } |
474 | | |
475 | 0 | inline NBestSentencePieceText& operator=(const NBestSentencePieceText& from) { |
476 | 0 | CopyFrom(from); |
477 | 0 | return *this; |
478 | 0 | } |
479 | 0 | inline NBestSentencePieceText& operator=(NBestSentencePieceText&& from) noexcept { |
480 | 0 | if (GetArena() == from.GetArena()) { |
481 | 0 | if (this != &from) InternalSwap(&from); |
482 | 0 | } else { |
483 | 0 | CopyFrom(from); |
484 | 0 | } |
485 | 0 | return *this; |
486 | 0 | } |
487 | | |
488 | 0 | inline const std::string& unknown_fields() const { |
489 | 0 | return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); |
490 | 0 | } |
491 | 0 | inline std::string* mutable_unknown_fields() { |
492 | 0 | return _internal_metadata_.mutable_unknown_fields<std::string>(); |
493 | 0 | } |
494 | | |
495 | | static const NBestSentencePieceText& default_instance(); |
496 | | |
497 | 0 | static inline const NBestSentencePieceText* internal_default_instance() { |
498 | 0 | return reinterpret_cast<const NBestSentencePieceText*>( |
499 | 0 | &_NBestSentencePieceText_default_instance_); |
500 | 0 | } |
501 | | static constexpr int kIndexInFileMessages = |
502 | | 2; |
503 | | |
504 | 0 | friend void swap(NBestSentencePieceText& a, NBestSentencePieceText& b) { |
505 | 0 | a.Swap(&b); |
506 | 0 | } |
507 | 0 | inline void Swap(NBestSentencePieceText* other) { |
508 | 0 | if (other == this) return; |
509 | 0 | if (GetArena() == other->GetArena()) { |
510 | 0 | InternalSwap(other); |
511 | 0 | } else { |
512 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); |
513 | 0 | } |
514 | 0 | } |
515 | 0 | void UnsafeArenaSwap(NBestSentencePieceText* other) { |
516 | 0 | if (other == this) return; |
517 | 0 | GOOGLE_DCHECK(GetArena() == other->GetArena()); |
518 | 0 | InternalSwap(other); |
519 | 0 | } |
520 | | |
521 | | // implements Message ---------------------------------------------- |
522 | | |
523 | 0 | inline NBestSentencePieceText* New() const final { |
524 | 0 | return CreateMaybeMessage<NBestSentencePieceText>(nullptr); |
525 | 0 | } |
526 | | |
527 | 0 | NBestSentencePieceText* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { |
528 | 0 | return CreateMaybeMessage<NBestSentencePieceText>(arena); |
529 | 0 | } |
530 | | void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) |
531 | | final; |
532 | | void CopyFrom(const NBestSentencePieceText& from); |
533 | | void MergeFrom(const NBestSentencePieceText& from); |
534 | | PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; |
535 | | bool IsInitialized() const final; |
536 | | |
537 | | size_t ByteSizeLong() const final; |
538 | | const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; |
539 | | ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( |
540 | | ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; |
541 | | void DiscardUnknownFields(); |
542 | 0 | int GetCachedSize() const final { return _cached_size_.Get(); } |
543 | | |
544 | | private: |
545 | | inline void SharedCtor(); |
546 | | inline void SharedDtor(); |
547 | | void SetCachedSize(int size) const; |
548 | | void InternalSwap(NBestSentencePieceText* other); |
549 | | friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; |
550 | 0 | static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { |
551 | 0 | return "sentencepiece.NBestSentencePieceText"; |
552 | 0 | } |
553 | | protected: |
554 | | explicit NBestSentencePieceText(::PROTOBUF_NAMESPACE_ID::Arena* arena); |
555 | | private: |
556 | | static void ArenaDtor(void* object); |
557 | | inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); |
558 | | public: |
559 | | |
560 | | std::string GetTypeName() const final; |
561 | | |
562 | | // nested types ---------------------------------------------------- |
563 | | |
564 | | // accessors ------------------------------------------------------- |
565 | | |
566 | | enum : int { |
567 | | kNbestsFieldNumber = 1, |
568 | | }; |
569 | | // repeated .sentencepiece.SentencePieceText nbests = 1; |
570 | | int nbests_size() const; |
571 | | private: |
572 | | int _internal_nbests_size() const; |
573 | | public: |
574 | | void clear_nbests(); |
575 | | ::sentencepiece::SentencePieceText* mutable_nbests(int index); |
576 | | ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::sentencepiece::SentencePieceText >* |
577 | | mutable_nbests(); |
578 | | private: |
579 | | const ::sentencepiece::SentencePieceText& _internal_nbests(int index) const; |
580 | | ::sentencepiece::SentencePieceText* _internal_add_nbests(); |
581 | | public: |
582 | | const ::sentencepiece::SentencePieceText& nbests(int index) const; |
583 | | ::sentencepiece::SentencePieceText* add_nbests(); |
584 | | const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::sentencepiece::SentencePieceText >& |
585 | | nbests() const; |
586 | | |
587 | | // @@protoc_insertion_point(class_scope:sentencepiece.NBestSentencePieceText) |
588 | | private: |
589 | | class _Internal; |
590 | | |
591 | | template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; |
592 | | typedef void InternalArenaConstructable_; |
593 | | typedef void DestructorSkippable_; |
594 | | ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::sentencepiece::SentencePieceText > nbests_; |
595 | | mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; |
596 | | friend struct ::TableStruct_sentencepiece_2eproto; |
597 | | }; |
598 | | // =================================================================== |
599 | | |
600 | | |
601 | | // =================================================================== |
602 | | |
603 | | #ifdef __GNUC__ |
604 | | #pragma GCC diagnostic push |
605 | | #pragma GCC diagnostic ignored "-Wstrict-aliasing" |
606 | | #endif // __GNUC__ |
607 | | // SentencePieceText_SentencePiece |
608 | | |
609 | | // optional string piece = 1; |
610 | 0 | inline bool SentencePieceText_SentencePiece::_internal_has_piece() const { |
611 | 0 | bool value = (_has_bits_[0] & 0x00000001u) != 0; |
612 | 0 | return value; |
613 | 0 | } |
614 | 0 | inline bool SentencePieceText_SentencePiece::has_piece() const { |
615 | 0 | return _internal_has_piece(); |
616 | 0 | } |
617 | 0 | inline void SentencePieceText_SentencePiece::clear_piece() { |
618 | 0 | piece_.ClearToEmpty(); |
619 | 0 | _has_bits_[0] &= ~0x00000001u; |
620 | 0 | } |
621 | 0 | inline const std::string& SentencePieceText_SentencePiece::piece() const { |
622 | | // @@protoc_insertion_point(field_get:sentencepiece.SentencePieceText.SentencePiece.piece) |
623 | 0 | return _internal_piece(); |
624 | 0 | } |
625 | 0 | inline void SentencePieceText_SentencePiece::set_piece(const std::string& value) { |
626 | 0 | _internal_set_piece(value); |
627 | 0 | // @@protoc_insertion_point(field_set:sentencepiece.SentencePieceText.SentencePiece.piece) |
628 | 0 | } |
629 | 0 | inline std::string* SentencePieceText_SentencePiece::mutable_piece() { |
630 | | // @@protoc_insertion_point(field_mutable:sentencepiece.SentencePieceText.SentencePiece.piece) |
631 | 0 | return _internal_mutable_piece(); |
632 | 0 | } |
633 | 0 | inline const std::string& SentencePieceText_SentencePiece::_internal_piece() const { |
634 | 0 | return piece_.Get(); |
635 | 0 | } |
636 | 0 | inline void SentencePieceText_SentencePiece::_internal_set_piece(const std::string& value) { |
637 | 0 | _has_bits_[0] |= 0x00000001u; |
638 | 0 | piece_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); |
639 | 0 | } |
640 | 0 | inline void SentencePieceText_SentencePiece::set_piece(std::string&& value) { |
641 | 0 | _has_bits_[0] |= 0x00000001u; |
642 | 0 | piece_.Set( |
643 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); |
644 | | // @@protoc_insertion_point(field_set_rvalue:sentencepiece.SentencePieceText.SentencePiece.piece) |
645 | 0 | } |
646 | 0 | inline void SentencePieceText_SentencePiece::set_piece(const char* value) { |
647 | 0 | GOOGLE_DCHECK(value != nullptr); |
648 | 0 | _has_bits_[0] |= 0x00000001u; |
649 | 0 | piece_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); |
650 | 0 | // @@protoc_insertion_point(field_set_char:sentencepiece.SentencePieceText.SentencePiece.piece) |
651 | 0 | } |
652 | | inline void SentencePieceText_SentencePiece::set_piece(const char* value, |
653 | 0 | size_t size) { |
654 | 0 | _has_bits_[0] |= 0x00000001u; |
655 | 0 | piece_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( |
656 | 0 | reinterpret_cast<const char*>(value), size), GetArena()); |
657 | | // @@protoc_insertion_point(field_set_pointer:sentencepiece.SentencePieceText.SentencePiece.piece) |
658 | 0 | } |
659 | 0 | inline std::string* SentencePieceText_SentencePiece::_internal_mutable_piece() { |
660 | 0 | _has_bits_[0] |= 0x00000001u; |
661 | 0 | return piece_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); |
662 | 0 | } |
663 | 0 | inline std::string* SentencePieceText_SentencePiece::release_piece() { |
664 | 0 | // @@protoc_insertion_point(field_release:sentencepiece.SentencePieceText.SentencePiece.piece) |
665 | 0 | if (!_internal_has_piece()) { |
666 | 0 | return nullptr; |
667 | 0 | } |
668 | 0 | _has_bits_[0] &= ~0x00000001u; |
669 | 0 | return piece_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); |
670 | 0 | } |
671 | 0 | inline void SentencePieceText_SentencePiece::set_allocated_piece(std::string* piece) { |
672 | 0 | if (piece != nullptr) { |
673 | 0 | _has_bits_[0] |= 0x00000001u; |
674 | 0 | } else { |
675 | 0 | _has_bits_[0] &= ~0x00000001u; |
676 | 0 | } |
677 | 0 | piece_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), piece, |
678 | 0 | GetArena()); |
679 | 0 | // @@protoc_insertion_point(field_set_allocated:sentencepiece.SentencePieceText.SentencePiece.piece) |
680 | 0 | } |
681 | | |
682 | | // optional uint32 id = 2; |
683 | 0 | inline bool SentencePieceText_SentencePiece::_internal_has_id() const { |
684 | 0 | bool value = (_has_bits_[0] & 0x00000004u) != 0; |
685 | 0 | return value; |
686 | 0 | } |
687 | 0 | inline bool SentencePieceText_SentencePiece::has_id() const { |
688 | 0 | return _internal_has_id(); |
689 | 0 | } |
690 | 0 | inline void SentencePieceText_SentencePiece::clear_id() { |
691 | 0 | id_ = 0u; |
692 | 0 | _has_bits_[0] &= ~0x00000004u; |
693 | 0 | } |
694 | 0 | inline ::PROTOBUF_NAMESPACE_ID::uint32 SentencePieceText_SentencePiece::_internal_id() const { |
695 | 0 | return id_; |
696 | 0 | } |
697 | 0 | inline ::PROTOBUF_NAMESPACE_ID::uint32 SentencePieceText_SentencePiece::id() const { |
698 | | // @@protoc_insertion_point(field_get:sentencepiece.SentencePieceText.SentencePiece.id) |
699 | 0 | return _internal_id(); |
700 | 0 | } |
701 | 0 | inline void SentencePieceText_SentencePiece::_internal_set_id(::PROTOBUF_NAMESPACE_ID::uint32 value) { |
702 | 0 | _has_bits_[0] |= 0x00000004u; |
703 | 0 | id_ = value; |
704 | 0 | } |
705 | 0 | inline void SentencePieceText_SentencePiece::set_id(::PROTOBUF_NAMESPACE_ID::uint32 value) { |
706 | 0 | _internal_set_id(value); |
707 | | // @@protoc_insertion_point(field_set:sentencepiece.SentencePieceText.SentencePiece.id) |
708 | 0 | } |
709 | | |
710 | | // optional string surface = 3; |
711 | 0 | inline bool SentencePieceText_SentencePiece::_internal_has_surface() const { |
712 | 0 | bool value = (_has_bits_[0] & 0x00000002u) != 0; |
713 | 0 | return value; |
714 | 0 | } |
715 | 0 | inline bool SentencePieceText_SentencePiece::has_surface() const { |
716 | 0 | return _internal_has_surface(); |
717 | 0 | } |
718 | 0 | inline void SentencePieceText_SentencePiece::clear_surface() { |
719 | 0 | surface_.ClearToEmpty(); |
720 | 0 | _has_bits_[0] &= ~0x00000002u; |
721 | 0 | } |
722 | 0 | inline const std::string& SentencePieceText_SentencePiece::surface() const { |
723 | | // @@protoc_insertion_point(field_get:sentencepiece.SentencePieceText.SentencePiece.surface) |
724 | 0 | return _internal_surface(); |
725 | 0 | } |
726 | 0 | inline void SentencePieceText_SentencePiece::set_surface(const std::string& value) { |
727 | 0 | _internal_set_surface(value); |
728 | 0 | // @@protoc_insertion_point(field_set:sentencepiece.SentencePieceText.SentencePiece.surface) |
729 | 0 | } |
730 | 0 | inline std::string* SentencePieceText_SentencePiece::mutable_surface() { |
731 | 0 | // @@protoc_insertion_point(field_mutable:sentencepiece.SentencePieceText.SentencePiece.surface) |
732 | 0 | return _internal_mutable_surface(); |
733 | 0 | } |
734 | 0 | inline const std::string& SentencePieceText_SentencePiece::_internal_surface() const { |
735 | 0 | return surface_.Get(); |
736 | 0 | } |
737 | 0 | inline void SentencePieceText_SentencePiece::_internal_set_surface(const std::string& value) { |
738 | 0 | _has_bits_[0] |= 0x00000002u; |
739 | 0 | surface_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); |
740 | 0 | } |
741 | 0 | inline void SentencePieceText_SentencePiece::set_surface(std::string&& value) { |
742 | 0 | _has_bits_[0] |= 0x00000002u; |
743 | 0 | surface_.Set( |
744 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); |
745 | | // @@protoc_insertion_point(field_set_rvalue:sentencepiece.SentencePieceText.SentencePiece.surface) |
746 | 0 | } |
747 | 0 | inline void SentencePieceText_SentencePiece::set_surface(const char* value) { |
748 | 0 | GOOGLE_DCHECK(value != nullptr); |
749 | 0 | _has_bits_[0] |= 0x00000002u; |
750 | 0 | surface_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); |
751 | 0 | // @@protoc_insertion_point(field_set_char:sentencepiece.SentencePieceText.SentencePiece.surface) |
752 | 0 | } |
753 | | inline void SentencePieceText_SentencePiece::set_surface(const char* value, |
754 | 0 | size_t size) { |
755 | 0 | _has_bits_[0] |= 0x00000002u; |
756 | 0 | surface_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( |
757 | 0 | reinterpret_cast<const char*>(value), size), GetArena()); |
758 | | // @@protoc_insertion_point(field_set_pointer:sentencepiece.SentencePieceText.SentencePiece.surface) |
759 | 0 | } |
760 | 0 | inline std::string* SentencePieceText_SentencePiece::_internal_mutable_surface() { |
761 | 0 | _has_bits_[0] |= 0x00000002u; |
762 | 0 | return surface_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); |
763 | 0 | } |
764 | 0 | inline std::string* SentencePieceText_SentencePiece::release_surface() { |
765 | 0 | // @@protoc_insertion_point(field_release:sentencepiece.SentencePieceText.SentencePiece.surface) |
766 | 0 | if (!_internal_has_surface()) { |
767 | 0 | return nullptr; |
768 | 0 | } |
769 | 0 | _has_bits_[0] &= ~0x00000002u; |
770 | 0 | return surface_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); |
771 | 0 | } |
772 | 0 | inline void SentencePieceText_SentencePiece::set_allocated_surface(std::string* surface) { |
773 | 0 | if (surface != nullptr) { |
774 | 0 | _has_bits_[0] |= 0x00000002u; |
775 | 0 | } else { |
776 | 0 | _has_bits_[0] &= ~0x00000002u; |
777 | 0 | } |
778 | 0 | surface_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), surface, |
779 | 0 | GetArena()); |
780 | 0 | // @@protoc_insertion_point(field_set_allocated:sentencepiece.SentencePieceText.SentencePiece.surface) |
781 | 0 | } |
782 | | |
783 | | // optional uint32 begin = 4; |
784 | 0 | inline bool SentencePieceText_SentencePiece::_internal_has_begin() const { |
785 | 0 | bool value = (_has_bits_[0] & 0x00000008u) != 0; |
786 | 0 | return value; |
787 | 0 | } |
788 | 0 | inline bool SentencePieceText_SentencePiece::has_begin() const { |
789 | 0 | return _internal_has_begin(); |
790 | 0 | } |
791 | 0 | inline void SentencePieceText_SentencePiece::clear_begin() { |
792 | 0 | begin_ = 0u; |
793 | 0 | _has_bits_[0] &= ~0x00000008u; |
794 | 0 | } |
795 | 0 | inline ::PROTOBUF_NAMESPACE_ID::uint32 SentencePieceText_SentencePiece::_internal_begin() const { |
796 | 0 | return begin_; |
797 | 0 | } |
798 | 0 | inline ::PROTOBUF_NAMESPACE_ID::uint32 SentencePieceText_SentencePiece::begin() const { |
799 | | // @@protoc_insertion_point(field_get:sentencepiece.SentencePieceText.SentencePiece.begin) |
800 | 0 | return _internal_begin(); |
801 | 0 | } |
802 | 0 | inline void SentencePieceText_SentencePiece::_internal_set_begin(::PROTOBUF_NAMESPACE_ID::uint32 value) { |
803 | 0 | _has_bits_[0] |= 0x00000008u; |
804 | 0 | begin_ = value; |
805 | 0 | } |
806 | 0 | inline void SentencePieceText_SentencePiece::set_begin(::PROTOBUF_NAMESPACE_ID::uint32 value) { |
807 | 0 | _internal_set_begin(value); |
808 | | // @@protoc_insertion_point(field_set:sentencepiece.SentencePieceText.SentencePiece.begin) |
809 | 0 | } |
810 | | |
811 | | // optional uint32 end = 5; |
812 | 0 | inline bool SentencePieceText_SentencePiece::_internal_has_end() const { |
813 | 0 | bool value = (_has_bits_[0] & 0x00000010u) != 0; |
814 | 0 | return value; |
815 | 0 | } |
816 | 0 | inline bool SentencePieceText_SentencePiece::has_end() const { |
817 | 0 | return _internal_has_end(); |
818 | 0 | } |
819 | 0 | inline void SentencePieceText_SentencePiece::clear_end() { |
820 | 0 | end_ = 0u; |
821 | 0 | _has_bits_[0] &= ~0x00000010u; |
822 | 0 | } |
823 | 0 | inline ::PROTOBUF_NAMESPACE_ID::uint32 SentencePieceText_SentencePiece::_internal_end() const { |
824 | 0 | return end_; |
825 | 0 | } |
826 | 0 | inline ::PROTOBUF_NAMESPACE_ID::uint32 SentencePieceText_SentencePiece::end() const { |
827 | | // @@protoc_insertion_point(field_get:sentencepiece.SentencePieceText.SentencePiece.end) |
828 | 0 | return _internal_end(); |
829 | 0 | } |
830 | 0 | inline void SentencePieceText_SentencePiece::_internal_set_end(::PROTOBUF_NAMESPACE_ID::uint32 value) { |
831 | 0 | _has_bits_[0] |= 0x00000010u; |
832 | 0 | end_ = value; |
833 | 0 | } |
834 | 0 | inline void SentencePieceText_SentencePiece::set_end(::PROTOBUF_NAMESPACE_ID::uint32 value) { |
835 | 0 | _internal_set_end(value); |
836 | | // @@protoc_insertion_point(field_set:sentencepiece.SentencePieceText.SentencePiece.end) |
837 | 0 | } |
838 | | |
839 | | // ------------------------------------------------------------------- |
840 | | |
841 | | // SentencePieceText |
842 | | |
843 | | // optional string text = 1; |
844 | 0 | inline bool SentencePieceText::_internal_has_text() const { |
845 | 0 | bool value = (_has_bits_[0] & 0x00000001u) != 0; |
846 | 0 | return value; |
847 | 0 | } |
848 | 0 | inline bool SentencePieceText::has_text() const { |
849 | 0 | return _internal_has_text(); |
850 | 0 | } |
851 | 0 | inline void SentencePieceText::clear_text() { |
852 | 0 | text_.ClearToEmpty(); |
853 | 0 | _has_bits_[0] &= ~0x00000001u; |
854 | 0 | } |
855 | 0 | inline const std::string& SentencePieceText::text() const { |
856 | | // @@protoc_insertion_point(field_get:sentencepiece.SentencePieceText.text) |
857 | 0 | return _internal_text(); |
858 | 0 | } |
859 | 0 | inline void SentencePieceText::set_text(const std::string& value) { |
860 | 0 | _internal_set_text(value); |
861 | 0 | // @@protoc_insertion_point(field_set:sentencepiece.SentencePieceText.text) |
862 | 0 | } |
863 | 0 | inline std::string* SentencePieceText::mutable_text() { |
864 | | // @@protoc_insertion_point(field_mutable:sentencepiece.SentencePieceText.text) |
865 | 0 | return _internal_mutable_text(); |
866 | 0 | } |
867 | 0 | inline const std::string& SentencePieceText::_internal_text() const { |
868 | 0 | return text_.Get(); |
869 | 0 | } |
870 | 0 | inline void SentencePieceText::_internal_set_text(const std::string& value) { |
871 | 0 | _has_bits_[0] |= 0x00000001u; |
872 | 0 | text_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena()); |
873 | 0 | } |
874 | 0 | inline void SentencePieceText::set_text(std::string&& value) { |
875 | 0 | _has_bits_[0] |= 0x00000001u; |
876 | 0 | text_.Set( |
877 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena()); |
878 | 0 | // @@protoc_insertion_point(field_set_rvalue:sentencepiece.SentencePieceText.text) |
879 | 0 | } |
880 | 0 | inline void SentencePieceText::set_text(const char* value) { |
881 | 0 | GOOGLE_DCHECK(value != nullptr); |
882 | 0 | _has_bits_[0] |= 0x00000001u; |
883 | 0 | text_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(value), GetArena()); |
884 | 0 | // @@protoc_insertion_point(field_set_char:sentencepiece.SentencePieceText.text) |
885 | 0 | } |
886 | | inline void SentencePieceText::set_text(const char* value, |
887 | 0 | size_t size) { |
888 | 0 | _has_bits_[0] |= 0x00000001u; |
889 | 0 | text_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string( |
890 | 0 | reinterpret_cast<const char*>(value), size), GetArena()); |
891 | | // @@protoc_insertion_point(field_set_pointer:sentencepiece.SentencePieceText.text) |
892 | 0 | } |
893 | 0 | inline std::string* SentencePieceText::_internal_mutable_text() { |
894 | 0 | _has_bits_[0] |= 0x00000001u; |
895 | 0 | return text_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena()); |
896 | 0 | } |
897 | 0 | inline std::string* SentencePieceText::release_text() { |
898 | 0 | // @@protoc_insertion_point(field_release:sentencepiece.SentencePieceText.text) |
899 | 0 | if (!_internal_has_text()) { |
900 | 0 | return nullptr; |
901 | 0 | } |
902 | 0 | _has_bits_[0] &= ~0x00000001u; |
903 | 0 | return text_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); |
904 | 0 | } |
905 | 0 | inline void SentencePieceText::set_allocated_text(std::string* text) { |
906 | 0 | if (text != nullptr) { |
907 | 0 | _has_bits_[0] |= 0x00000001u; |
908 | 0 | } else { |
909 | 0 | _has_bits_[0] &= ~0x00000001u; |
910 | 0 | } |
911 | 0 | text_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), text, |
912 | 0 | GetArena()); |
913 | 0 | // @@protoc_insertion_point(field_set_allocated:sentencepiece.SentencePieceText.text) |
914 | 0 | } |
915 | | |
916 | | // repeated .sentencepiece.SentencePieceText.SentencePiece pieces = 2; |
917 | 226 | inline int SentencePieceText::_internal_pieces_size() const { |
918 | 226 | return pieces_.size(); |
919 | 226 | } |
920 | 0 | inline int SentencePieceText::pieces_size() const { |
921 | 0 | return _internal_pieces_size(); |
922 | 0 | } |
923 | 0 | inline void SentencePieceText::clear_pieces() { |
924 | 0 | pieces_.Clear(); |
925 | 0 | } |
926 | 0 | inline ::sentencepiece::SentencePieceText_SentencePiece* SentencePieceText::mutable_pieces(int index) { |
927 | | // @@protoc_insertion_point(field_mutable:sentencepiece.SentencePieceText.pieces) |
928 | 0 | return pieces_.Mutable(index); |
929 | 0 | } |
930 | | inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::sentencepiece::SentencePieceText_SentencePiece >* |
931 | 0 | SentencePieceText::mutable_pieces() { |
932 | | // @@protoc_insertion_point(field_mutable_list:sentencepiece.SentencePieceText.pieces) |
933 | 0 | return &pieces_; |
934 | 0 | } |
935 | 0 | inline const ::sentencepiece::SentencePieceText_SentencePiece& SentencePieceText::_internal_pieces(int index) const { |
936 | 0 | return pieces_.Get(index); |
937 | 0 | } |
938 | 0 | inline const ::sentencepiece::SentencePieceText_SentencePiece& SentencePieceText::pieces(int index) const { |
939 | | // @@protoc_insertion_point(field_get:sentencepiece.SentencePieceText.pieces) |
940 | 0 | return _internal_pieces(index); |
941 | 0 | } |
942 | 0 | inline ::sentencepiece::SentencePieceText_SentencePiece* SentencePieceText::_internal_add_pieces() { |
943 | 0 | return pieces_.Add(); |
944 | 0 | } |
945 | 0 | inline ::sentencepiece::SentencePieceText_SentencePiece* SentencePieceText::add_pieces() { |
946 | | // @@protoc_insertion_point(field_add:sentencepiece.SentencePieceText.pieces) |
947 | 0 | return _internal_add_pieces(); |
948 | 0 | } |
949 | | inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::sentencepiece::SentencePieceText_SentencePiece >& |
950 | 0 | SentencePieceText::pieces() const { |
951 | | // @@protoc_insertion_point(field_list:sentencepiece.SentencePieceText.pieces) |
952 | 0 | return pieces_; |
953 | 0 | } |
954 | | |
955 | | // optional float score = 3; |
956 | 0 | inline bool SentencePieceText::_internal_has_score() const { |
957 | 0 | bool value = (_has_bits_[0] & 0x00000002u) != 0; |
958 | 0 | return value; |
959 | 0 | } |
960 | 0 | inline bool SentencePieceText::has_score() const { |
961 | 0 | return _internal_has_score(); |
962 | 0 | } |
963 | 0 | inline void SentencePieceText::clear_score() { |
964 | 0 | score_ = 0; |
965 | 0 | _has_bits_[0] &= ~0x00000002u; |
966 | 0 | } |
967 | 0 | inline float SentencePieceText::_internal_score() const { |
968 | 0 | return score_; |
969 | 0 | } |
970 | 0 | inline float SentencePieceText::score() const { |
971 | | // @@protoc_insertion_point(field_get:sentencepiece.SentencePieceText.score) |
972 | 0 | return _internal_score(); |
973 | 0 | } |
974 | 0 | inline void SentencePieceText::_internal_set_score(float value) { |
975 | 0 | _has_bits_[0] |= 0x00000002u; |
976 | 0 | score_ = value; |
977 | 0 | } |
978 | 0 | inline void SentencePieceText::set_score(float value) { |
979 | 0 | _internal_set_score(value); |
980 | | // @@protoc_insertion_point(field_set:sentencepiece.SentencePieceText.score) |
981 | 0 | } |
982 | | |
983 | | // ------------------------------------------------------------------- |
984 | | |
985 | | // NBestSentencePieceText |
986 | | |
987 | | // repeated .sentencepiece.SentencePieceText nbests = 1; |
988 | 0 | inline int NBestSentencePieceText::_internal_nbests_size() const { |
989 | 0 | return nbests_.size(); |
990 | 0 | } |
991 | 0 | inline int NBestSentencePieceText::nbests_size() const { |
992 | 0 | return _internal_nbests_size(); |
993 | 0 | } |
994 | 0 | inline void NBestSentencePieceText::clear_nbests() { |
995 | 0 | nbests_.Clear(); |
996 | 0 | } |
997 | 0 | inline ::sentencepiece::SentencePieceText* NBestSentencePieceText::mutable_nbests(int index) { |
998 | 0 | // @@protoc_insertion_point(field_mutable:sentencepiece.NBestSentencePieceText.nbests) |
999 | 0 | return nbests_.Mutable(index); |
1000 | 0 | } |
1001 | | inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::sentencepiece::SentencePieceText >* |
1002 | 0 | NBestSentencePieceText::mutable_nbests() { |
1003 | | // @@protoc_insertion_point(field_mutable_list:sentencepiece.NBestSentencePieceText.nbests) |
1004 | 0 | return &nbests_; |
1005 | 0 | } |
1006 | 0 | inline const ::sentencepiece::SentencePieceText& NBestSentencePieceText::_internal_nbests(int index) const { |
1007 | 0 | return nbests_.Get(index); |
1008 | 0 | } |
1009 | 0 | inline const ::sentencepiece::SentencePieceText& NBestSentencePieceText::nbests(int index) const { |
1010 | | // @@protoc_insertion_point(field_get:sentencepiece.NBestSentencePieceText.nbests) |
1011 | 0 | return _internal_nbests(index); |
1012 | 0 | } |
1013 | 0 | inline ::sentencepiece::SentencePieceText* NBestSentencePieceText::_internal_add_nbests() { |
1014 | 0 | return nbests_.Add(); |
1015 | 0 | } |
1016 | 0 | inline ::sentencepiece::SentencePieceText* NBestSentencePieceText::add_nbests() { |
1017 | | // @@protoc_insertion_point(field_add:sentencepiece.NBestSentencePieceText.nbests) |
1018 | 0 | return _internal_add_nbests(); |
1019 | 0 | } |
1020 | | inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::sentencepiece::SentencePieceText >& |
1021 | 0 | NBestSentencePieceText::nbests() const { |
1022 | | // @@protoc_insertion_point(field_list:sentencepiece.NBestSentencePieceText.nbests) |
1023 | 0 | return nbests_; |
1024 | 0 | } |
1025 | | |
1026 | | #ifdef __GNUC__ |
1027 | | #pragma GCC diagnostic pop |
1028 | | #endif // __GNUC__ |
1029 | | // ------------------------------------------------------------------- |
1030 | | |
1031 | | // ------------------------------------------------------------------- |
1032 | | |
1033 | | |
1034 | | // @@protoc_insertion_point(namespace_scope) |
1035 | | |
1036 | | } // namespace sentencepiece |
1037 | | |
1038 | | // @@protoc_insertion_point(global_scope) |
1039 | | |
1040 | | #include <google/protobuf/port_undef.inc> |
1041 | | #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_sentencepiece_2eproto |