Class: Google::Apis::TranslateV3::Model

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 trained translation model.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Model

Returns a new instance of Model.



1296
1297
1298
# File 'lib/google/apis/translate_v3/classes.rb', line 1296

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

Instance Attribute Details

#create_timeString

Output only. Timestamp when the model resource was created, which is also when the training started. Corresponds to the JSON property createTime

Returns:

  • (String)


1239
1240
1241
# File 'lib/google/apis/translate_v3/classes.rb', line 1239

def create_time
  @create_time
end

#datasetString

The dataset from which the model is trained, in form of projects/project- number-or-id/locations/location_id/datasets/dataset_id` Corresponds to the JSON propertydataset`

Returns:

  • (String)


1245
1246
1247
# File 'lib/google/apis/translate_v3/classes.rb', line 1245

def dataset
  @dataset
end

#deploy_timeString

Output only. Timestamp when the model training finished and ready to be used for translation. Corresponds to the JSON property deployTime

Returns:

  • (String)


1251
1252
1253
# File 'lib/google/apis/translate_v3/classes.rb', line 1251

def deploy_time
  @deploy_time
end

#display_nameString

The name of the model 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)


1258
1259
1260
# File 'lib/google/apis/translate_v3/classes.rb', line 1258

def display_name
  @display_name
end

#nameString

The resource name of the model, in form of projects/project-number-or-id/ locations/location_id/models/model_id` Corresponds to the JSON propertyname`

Returns:

  • (String)


1264
1265
1266
# File 'lib/google/apis/translate_v3/classes.rb', line 1264

def name
  @name
end

#source_language_codeString

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

Returns:

  • (String)


1269
1270
1271
# File 'lib/google/apis/translate_v3/classes.rb', line 1269

def source_language_code
  @source_language_code
end

#target_language_codeString

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

Returns:

  • (String)


1274
1275
1276
# File 'lib/google/apis/translate_v3/classes.rb', line 1274

def target_language_code
  @target_language_code
end

#test_example_countFixnum

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

Returns:

  • (Fixnum)


1279
1280
1281
# File 'lib/google/apis/translate_v3/classes.rb', line 1279

def test_example_count
  @test_example_count
end

#train_example_countFixnum

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

Returns:

  • (Fixnum)


1284
1285
1286
# File 'lib/google/apis/translate_v3/classes.rb', line 1284

def train_example_count
  @train_example_count
end

#update_timeString

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

Returns:

  • (String)


1289
1290
1291
# File 'lib/google/apis/translate_v3/classes.rb', line 1289

def update_time
  @update_time
end

#validate_example_countFixnum

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

Returns:

  • (Fixnum)


1294
1295
1296
# File 'lib/google/apis/translate_v3/classes.rb', line 1294

def validate_example_count
  @validate_example_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
# File 'lib/google/apis/translate_v3/classes.rb', line 1301

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @dataset = args[:dataset] if args.key?(:dataset)
  @deploy_time = args[:deploy_time] if args.key?(:deploy_time)
  @display_name = args[:display_name] if args.key?(:display_name)
  @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