Class: Google::Apis::TranslateV3::Example
- Inherits:
-
Object
- Object
- Google::Apis::TranslateV3::Example
- 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 sentence pair.
Instance Attribute Summary collapse
-
#name ⇒ String
Output only.
-
#source_text ⇒ String
Sentence in source language.
-
#target_text ⇒ String
Sentence in target language.
-
#usage ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Example
constructor
A new instance of Example.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Example
Returns a new instance of Example.
835 836 837 |
# File 'lib/google/apis/translate_v3/classes.rb', line 835 def initialize(**args) update!(**args) end |
Instance Attribute Details
#name ⇒ String
Output only. The resource name of the example, in form of projects/
project-
number-or-id/locations/
location_id/datasets/
dataset_id/examples/
example_id`
Corresponds to the JSON property
name`
818 819 820 |
# File 'lib/google/apis/translate_v3/classes.rb', line 818 def name @name end |
#source_text ⇒ String
Sentence in source language.
Corresponds to the JSON property sourceText
823 824 825 |
# File 'lib/google/apis/translate_v3/classes.rb', line 823 def source_text @source_text end |
#target_text ⇒ String
Sentence in target language.
Corresponds to the JSON property targetText
828 829 830 |
# File 'lib/google/apis/translate_v3/classes.rb', line 828 def target_text @target_text end |
#usage ⇒ String
Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST.
Corresponds to the JSON property usage
833 834 835 |
# File 'lib/google/apis/translate_v3/classes.rb', line 833 def usage @usage end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
840 841 842 843 844 845 |
# File 'lib/google/apis/translate_v3/classes.rb', line 840 def update!(**args) @name = args[:name] if args.key?(:name) @source_text = args[:source_text] if args.key?(:source_text) @target_text = args[:target_text] if args.key?(:target_text) @usage = args[:usage] if args.key?(:usage) end |