Class: Google::Apis::TranslateV3::ReferenceSentencePair

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 pair of sentences used as reference in source and target languages.

Instance Attribute Summary collapse

Instance Method Summary collapse

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_sentenceString

Source sentence in the sentence pair. Corresponds to the JSON property sourceSentence

Returns:

  • (String)


1844
1845
1846
# File 'lib/google/apis/translate_v3/classes.rb', line 1844

def source_sentence
  @source_sentence
end

#target_sentenceString

Target sentence in the sentence pair. Corresponds to the JSON property targetSentence

Returns:

  • (String)


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