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.



538
539
540
# File 'lib/google/apis/translate_v3/classes.rb', line 538

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)


488
489
490
# File 'lib/google/apis/translate_v3/classes.rb', line 488

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)


495
496
497
# File 'lib/google/apis/translate_v3/classes.rb', line 495

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)


500
501
502
# File 'lib/google/apis/translate_v3/classes.rb', line 500

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)


506
507
508
# File 'lib/google/apis/translate_v3/classes.rb', line 506

def name
  @name
end

#source_language_codeString

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

Returns:

  • (String)


511
512
513
# File 'lib/google/apis/translate_v3/classes.rb', line 511

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)


516
517
518
# File 'lib/google/apis/translate_v3/classes.rb', line 516

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)


521
522
523
# File 'lib/google/apis/translate_v3/classes.rb', line 521

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)


526
527
528
# File 'lib/google/apis/translate_v3/classes.rb', line 526

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)


531
532
533
# File 'lib/google/apis/translate_v3/classes.rb', line 531

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)


536
537
538
# File 'lib/google/apis/translate_v3/classes.rb', line 536

def validate_example_count
  @validate_example_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



543
544
545
546
547
548
549
550
551
552
553
554
# File 'lib/google/apis/translate_v3/classes.rb', line 543

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