Class: Google::Apis::TranslateV3::ReferenceSentencePair
- Inherits:
-
Object
- Object
- Google::Apis::TranslateV3::ReferenceSentencePair
- 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 pair of sentences used as reference in source and target languages.
Instance Attribute Summary collapse
-
#source_sentence ⇒ String
Source sentence in the sentence pair.
-
#target_sentence ⇒ String
Target sentence in the sentence pair.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ReferenceSentencePair
constructor
A new instance of ReferenceSentencePair.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ReferenceSentencePair
Returns a new instance of ReferenceSentencePair.
1851 1852 1853 |
# File 'lib/google/apis/translate_v3/classes.rb', line 1851 def initialize(**args) update!(**args) end |
Instance Attribute Details
#source_sentence ⇒ String
Source sentence in the sentence pair.
Corresponds to the JSON property sourceSentence
1844 1845 1846 |
# File 'lib/google/apis/translate_v3/classes.rb', line 1844 def source_sentence @source_sentence end |
#target_sentence ⇒ String
Target sentence in the sentence pair.
Corresponds to the JSON property targetSentence
1849 1850 1851 |
# File 'lib/google/apis/translate_v3/classes.rb', line 1849 def target_sentence @target_sentence end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1856 1857 1858 1859 |
# File 'lib/google/apis/translate_v3/classes.rb', line 1856 def update!(**args) @source_sentence = args[:source_sentence] if args.key?(:source_sentence) @target_sentence = args[:target_sentence] if args.key?(:target_sentence) end |