Class: Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/translate/v3/adaptive_mt.rb

Overview

The request for sending an AdaptiveMt translation query.

Defined Under Namespace

Classes: GlossaryConfig, ReferenceSentenceConfig, ReferenceSentencePair, ReferenceSentencePairList

Instance Attribute Summary collapse

Instance Attribute Details

#content::Array<::String>

Returns Required. The content of the input in string format.

Returns:

  • (::Array<::String>)

    Required. The content of the input in string format.



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'proto_docs/google/cloud/translate/v3/adaptive_mt.rb', line 148

class AdaptiveMtTranslateRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A pair of sentences used as reference in source and target languages.
  # @!attribute [rw] source_sentence
  #   @return [::String]
  #     Source sentence in the sentence pair.
  # @!attribute [rw] target_sentence
  #   @return [::String]
  #     Target sentence in the sentence pair.
  class ReferenceSentencePair
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A list of reference sentence pairs.
  # @!attribute [rw] reference_sentence_pairs
  #   @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentencePair>]
  #     Reference sentence pairs.
  class ReferenceSentencePairList
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Message of caller-provided reference configuration.
  # @!attribute [rw] reference_sentence_pair_lists
  #   @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentencePairList>]
  #     Reference sentences pair lists. Each list will be used as the references
  #     to translate the sentence under "content" field at the corresponding
  #     index. Length of the list is required to be equal to the length of
  #     "content" field.
  # @!attribute [rw] source_language_code
  #   @return [::String]
  #     Source language code.
  # @!attribute [rw] target_language_code
  #   @return [::String]
  #     Target language code.
  class ReferenceSentenceConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Configures which glossary is used for a specific target language and
  # defines
  # options for applying that glossary.
  # @!attribute [rw] glossary
  #   @return [::String]
  #     Required. The `glossary` to be applied for this translation.
  #
  #     The format depends on the glossary:
  #
  #     - User-provided custom glossary:
  #       `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
  # @!attribute [rw] ignore_case
  #   @return [::Boolean]
  #     Optional. Indicates match is case insensitive. The default value is
  #     `false` if missing.
  # @!attribute [rw] contextual_translation_enabled
  #   @return [::Boolean]
  #     Optional. If set to true, the glossary will be used for contextual
  #     translation.
  class GlossaryConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#dataset::String

Returns Required. The resource name for the dataset to use for adaptive MT. projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}.

Returns:

  • (::String)

    Required. The resource name for the dataset to use for adaptive MT. projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'proto_docs/google/cloud/translate/v3/adaptive_mt.rb', line 148

class AdaptiveMtTranslateRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A pair of sentences used as reference in source and target languages.
  # @!attribute [rw] source_sentence
  #   @return [::String]
  #     Source sentence in the sentence pair.
  # @!attribute [rw] target_sentence
  #   @return [::String]
  #     Target sentence in the sentence pair.
  class ReferenceSentencePair
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A list of reference sentence pairs.
  # @!attribute [rw] reference_sentence_pairs
  #   @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentencePair>]
  #     Reference sentence pairs.
  class ReferenceSentencePairList
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Message of caller-provided reference configuration.
  # @!attribute [rw] reference_sentence_pair_lists
  #   @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentencePairList>]
  #     Reference sentences pair lists. Each list will be used as the references
  #     to translate the sentence under "content" field at the corresponding
  #     index. Length of the list is required to be equal to the length of
  #     "content" field.
  # @!attribute [rw] source_language_code
  #   @return [::String]
  #     Source language code.
  # @!attribute [rw] target_language_code
  #   @return [::String]
  #     Target language code.
  class ReferenceSentenceConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Configures which glossary is used for a specific target language and
  # defines
  # options for applying that glossary.
  # @!attribute [rw] glossary
  #   @return [::String]
  #     Required. The `glossary` to be applied for this translation.
  #
  #     The format depends on the glossary:
  #
  #     - User-provided custom glossary:
  #       `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
  # @!attribute [rw] ignore_case
  #   @return [::Boolean]
  #     Optional. Indicates match is case insensitive. The default value is
  #     `false` if missing.
  # @!attribute [rw] contextual_translation_enabled
  #   @return [::Boolean]
  #     Optional. If set to true, the glossary will be used for contextual
  #     translation.
  class GlossaryConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#glossary_config::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::GlossaryConfig

Returns Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.

Returns:



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'proto_docs/google/cloud/translate/v3/adaptive_mt.rb', line 148

class AdaptiveMtTranslateRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A pair of sentences used as reference in source and target languages.
  # @!attribute [rw] source_sentence
  #   @return [::String]
  #     Source sentence in the sentence pair.
  # @!attribute [rw] target_sentence
  #   @return [::String]
  #     Target sentence in the sentence pair.
  class ReferenceSentencePair
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A list of reference sentence pairs.
  # @!attribute [rw] reference_sentence_pairs
  #   @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentencePair>]
  #     Reference sentence pairs.
  class ReferenceSentencePairList
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Message of caller-provided reference configuration.
  # @!attribute [rw] reference_sentence_pair_lists
  #   @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentencePairList>]
  #     Reference sentences pair lists. Each list will be used as the references
  #     to translate the sentence under "content" field at the corresponding
  #     index. Length of the list is required to be equal to the length of
  #     "content" field.
  # @!attribute [rw] source_language_code
  #   @return [::String]
  #     Source language code.
  # @!attribute [rw] target_language_code
  #   @return [::String]
  #     Target language code.
  class ReferenceSentenceConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Configures which glossary is used for a specific target language and
  # defines
  # options for applying that glossary.
  # @!attribute [rw] glossary
  #   @return [::String]
  #     Required. The `glossary` to be applied for this translation.
  #
  #     The format depends on the glossary:
  #
  #     - User-provided custom glossary:
  #       `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
  # @!attribute [rw] ignore_case
  #   @return [::Boolean]
  #     Optional. Indicates match is case insensitive. The default value is
  #     `false` if missing.
  # @!attribute [rw] contextual_translation_enabled
  #   @return [::Boolean]
  #     Optional. If set to true, the glossary will be used for contextual
  #     translation.
  class GlossaryConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#parent::String

Returns Required. Location to make a regional call.

Format: projects/{project-number-or-id}/locations/{location-id}.

Returns:

  • (::String)

    Required. Location to make a regional call.

    Format: projects/{project-number-or-id}/locations/{location-id}.



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'proto_docs/google/cloud/translate/v3/adaptive_mt.rb', line 148

class AdaptiveMtTranslateRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A pair of sentences used as reference in source and target languages.
  # @!attribute [rw] source_sentence
  #   @return [::String]
  #     Source sentence in the sentence pair.
  # @!attribute [rw] target_sentence
  #   @return [::String]
  #     Target sentence in the sentence pair.
  class ReferenceSentencePair
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A list of reference sentence pairs.
  # @!attribute [rw] reference_sentence_pairs
  #   @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentencePair>]
  #     Reference sentence pairs.
  class ReferenceSentencePairList
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Message of caller-provided reference configuration.
  # @!attribute [rw] reference_sentence_pair_lists
  #   @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentencePairList>]
  #     Reference sentences pair lists. Each list will be used as the references
  #     to translate the sentence under "content" field at the corresponding
  #     index. Length of the list is required to be equal to the length of
  #     "content" field.
  # @!attribute [rw] source_language_code
  #   @return [::String]
  #     Source language code.
  # @!attribute [rw] target_language_code
  #   @return [::String]
  #     Target language code.
  class ReferenceSentenceConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Configures which glossary is used for a specific target language and
  # defines
  # options for applying that glossary.
  # @!attribute [rw] glossary
  #   @return [::String]
  #     Required. The `glossary` to be applied for this translation.
  #
  #     The format depends on the glossary:
  #
  #     - User-provided custom glossary:
  #       `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
  # @!attribute [rw] ignore_case
  #   @return [::Boolean]
  #     Optional. Indicates match is case insensitive. The default value is
  #     `false` if missing.
  # @!attribute [rw] contextual_translation_enabled
  #   @return [::Boolean]
  #     Optional. If set to true, the glossary will be used for contextual
  #     translation.
  class GlossaryConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#reference_sentence_config::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentenceConfig

Returns Configuration for caller provided reference sentences.

Returns:



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'proto_docs/google/cloud/translate/v3/adaptive_mt.rb', line 148

class AdaptiveMtTranslateRequest
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A pair of sentences used as reference in source and target languages.
  # @!attribute [rw] source_sentence
  #   @return [::String]
  #     Source sentence in the sentence pair.
  # @!attribute [rw] target_sentence
  #   @return [::String]
  #     Target sentence in the sentence pair.
  class ReferenceSentencePair
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # A list of reference sentence pairs.
  # @!attribute [rw] reference_sentence_pairs
  #   @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentencePair>]
  #     Reference sentence pairs.
  class ReferenceSentencePairList
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Message of caller-provided reference configuration.
  # @!attribute [rw] reference_sentence_pair_lists
  #   @return [::Array<::Google::Cloud::Translate::V3::AdaptiveMtTranslateRequest::ReferenceSentencePairList>]
  #     Reference sentences pair lists. Each list will be used as the references
  #     to translate the sentence under "content" field at the corresponding
  #     index. Length of the list is required to be equal to the length of
  #     "content" field.
  # @!attribute [rw] source_language_code
  #   @return [::String]
  #     Source language code.
  # @!attribute [rw] target_language_code
  #   @return [::String]
  #     Target language code.
  class ReferenceSentenceConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Configures which glossary is used for a specific target language and
  # defines
  # options for applying that glossary.
  # @!attribute [rw] glossary
  #   @return [::String]
  #     Required. The `glossary` to be applied for this translation.
  #
  #     The format depends on the glossary:
  #
  #     - User-provided custom glossary:
  #       `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`
  # @!attribute [rw] ignore_case
  #   @return [::Boolean]
  #     Optional. Indicates match is case insensitive. The default value is
  #     `false` if missing.
  # @!attribute [rw] contextual_translation_enabled
  #   @return [::Boolean]
  #     Optional. If set to true, the glossary will be used for contextual
  #     translation.
  class GlossaryConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end