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.



1915
1916
1917
# File 'lib/google/apis/translate_v3/classes.rb', line 1915

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)


1908
1909
1910
# File 'lib/google/apis/translate_v3/classes.rb', line 1908

def source_sentence
  @source_sentence
end

#target_sentenceString

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

Returns:

  • (String)


1913
1914
1915
# File 'lib/google/apis/translate_v3/classes.rb', line 1913

def target_sentence
  @target_sentence
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1920
1921
1922
1923
# File 'lib/google/apis/translate_v3/classes.rb', line 1920

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