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.



1881
1882
1883
# File 'lib/google/apis/translate_v3/classes.rb', line 1881

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)


1874
1875
1876
# File 'lib/google/apis/translate_v3/classes.rb', line 1874

def source_sentence
  @source_sentence
end

#target_sentenceString

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

Returns:

  • (String)


1879
1880
1881
# File 'lib/google/apis/translate_v3/classes.rb', line 1879

def target_sentence
  @target_sentence
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1886
1887
1888
1889
# File 'lib/google/apis/translate_v3/classes.rb', line 1886

def update!(**args)
  @source_sentence = args[:source_sentence] if args.key?(:source_sentence)
  @target_sentence = args[:target_sentence] if args.key?(:target_sentence)
end