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.



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

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)


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

def source_sentence
  @source_sentence
end

#target_sentenceString

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

Returns:

  • (String)


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

def target_sentence
  @target_sentence
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1926
1927
1928
1929
# File 'lib/google/apis/translate_v3/classes.rb', line 1926

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