Class: Google::Apis::TranslateV3::Dataset

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/translate_v3/classes.rb,
lib/google/apis/translate_v3/representations.rb,
lib/google/apis/translate_v3/representations.rb

Overview

A dataset that hosts the examples (sentence pairs) used for translation models.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Dataset

Returns a new instance of Dataset.



288
289
290
# File 'lib/google/apis/translate_v3/classes.rb', line 288

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#create_timeString

Output only. Timestamp when this dataset was created. Corresponds to the JSON property createTime

Returns:

  • (String)


238
239
240
# File 'lib/google/apis/translate_v3/classes.rb', line 238

def create_time
  @create_time
end

#display_nameString

The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9. Corresponds to the JSON property displayName

Returns:

  • (String)


245
246
247
# File 'lib/google/apis/translate_v3/classes.rb', line 245

def display_name
  @display_name
end

#example_countFixnum

Output only. The number of examples in the dataset. Corresponds to the JSON property exampleCount

Returns:

  • (Fixnum)


250
251
252
# File 'lib/google/apis/translate_v3/classes.rb', line 250

def example_count
  @example_count
end

#nameString

The resource name of the dataset, in form of projects/project-number-or-id/ locations/location_id/datasets/dataset_id` Corresponds to the JSON propertyname`

Returns:

  • (String)


256
257
258
# File 'lib/google/apis/translate_v3/classes.rb', line 256

def name
  @name
end

#source_language_codeString

The BCP-47 language code of the source language. Corresponds to the JSON property sourceLanguageCode

Returns:

  • (String)


261
262
263
# File 'lib/google/apis/translate_v3/classes.rb', line 261

def source_language_code
  @source_language_code
end

#target_language_codeString

The BCP-47 language code of the target language. Corresponds to the JSON property targetLanguageCode

Returns:

  • (String)


266
267
268
# File 'lib/google/apis/translate_v3/classes.rb', line 266

def target_language_code
  @target_language_code
end

#test_example_countFixnum

Output only. Number of test examples (sentence pairs). Corresponds to the JSON property testExampleCount

Returns:

  • (Fixnum)


271
272
273
# File 'lib/google/apis/translate_v3/classes.rb', line 271

def test_example_count
  @test_example_count
end

#train_example_countFixnum

Output only. Number of training examples (sentence pairs). Corresponds to the JSON property trainExampleCount

Returns:

  • (Fixnum)


276
277
278
# File 'lib/google/apis/translate_v3/classes.rb', line 276

def train_example_count
  @train_example_count
end

#update_timeString

Output only. Timestamp when this dataset was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


281
282
283
# File 'lib/google/apis/translate_v3/classes.rb', line 281

def update_time
  @update_time
end

#validate_example_countFixnum

Output only. Number of validation examples (sentence pairs). Corresponds to the JSON property validateExampleCount

Returns:

  • (Fixnum)


286
287
288
# File 'lib/google/apis/translate_v3/classes.rb', line 286

def validate_example_count
  @validate_example_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



293
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/google/apis/translate_v3/classes.rb', line 293

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @display_name = args[:display_name] if args.key?(:display_name)
  @example_count = args[:example_count] if args.key?(:example_count)
  @name = args[:name] if args.key?(:name)
  @source_language_code = args[:source_language_code] if args.key?(:source_language_code)
  @target_language_code = args[:target_language_code] if args.key?(:target_language_code)
  @test_example_count = args[:test_example_count] if args.key?(:test_example_count)
  @train_example_count = args[:train_example_count] if args.key?(:train_example_count)
  @update_time = args[:update_time] if args.key?(:update_time)
  @validate_example_count = args[:validate_example_count] if args.key?(:validate_example_count)
end