Class: TencentCloud::Mps::V20190612::SmartSubtitleTaskTransTextSegmentItem

Inherits:
Common::AbstractModel
  • Object
show all
Defined in:
lib/v20190612/models.rb

Overview

翻译片段。

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(confidence = nil, starttimeoffset = nil, endtimeoffset = nil, text = nil, trans = nil, wordlist = nil) ⇒ SmartSubtitleTaskTransTextSegmentItem

Returns a new instance of SmartSubtitleTaskTransTextSegmentItem.



28682
28683
28684
28685
28686
28687
28688
28689
# File 'lib/v20190612/models.rb', line 28682

def initialize(confidence=nil, starttimeoffset=nil, endtimeoffset=nil, text=nil, trans=nil, wordlist=nil)
  @Confidence = confidence
  @StartTimeOffset = starttimeoffset
  @EndTimeOffset = endtimeoffset
  @Text = text
  @Trans = trans
  @Wordlist = wordlist
end

Instance Attribute Details

#ConfidenceObject

注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Confidence:

    识别片段置信度。取值:0~100。

  • StartTimeOffset:

    识别片段起始的偏移时间,单位:秒。

  • EndTimeOffset:

    识别片段终止的偏移时间,单位:秒。

  • Text:

    识别文本。

  • Trans:

    翻译文本。

  • Wordlist:

    字词时间戳信息。



28680
28681
28682
# File 'lib/v20190612/models.rb', line 28680

def Confidence
  @Confidence
end

#EndTimeOffsetObject

注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Confidence:

    识别片段置信度。取值:0~100。

  • StartTimeOffset:

    识别片段起始的偏移时间,单位:秒。

  • EndTimeOffset:

    识别片段终止的偏移时间,单位:秒。

  • Text:

    识别文本。

  • Trans:

    翻译文本。

  • Wordlist:

    字词时间戳信息。



28680
28681
28682
# File 'lib/v20190612/models.rb', line 28680

def EndTimeOffset
  @EndTimeOffset
end

#StartTimeOffsetObject

注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Confidence:

    识别片段置信度。取值:0~100。

  • StartTimeOffset:

    识别片段起始的偏移时间,单位:秒。

  • EndTimeOffset:

    识别片段终止的偏移时间,单位:秒。

  • Text:

    识别文本。

  • Trans:

    翻译文本。

  • Wordlist:

    字词时间戳信息。



28680
28681
28682
# File 'lib/v20190612/models.rb', line 28680

def StartTimeOffset
  @StartTimeOffset
end

#TextObject

注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Confidence:

    识别片段置信度。取值:0~100。

  • StartTimeOffset:

    识别片段起始的偏移时间,单位:秒。

  • EndTimeOffset:

    识别片段终止的偏移时间,单位:秒。

  • Text:

    识别文本。

  • Trans:

    翻译文本。

  • Wordlist:

    字词时间戳信息。



28680
28681
28682
# File 'lib/v20190612/models.rb', line 28680

def Text
  @Text
end

#TransObject

注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Confidence:

    识别片段置信度。取值:0~100。

  • StartTimeOffset:

    识别片段起始的偏移时间,单位:秒。

  • EndTimeOffset:

    识别片段终止的偏移时间,单位:秒。

  • Text:

    识别文本。

  • Trans:

    翻译文本。

  • Wordlist:

    字词时间戳信息。



28680
28681
28682
# File 'lib/v20190612/models.rb', line 28680

def Trans
  @Trans
end

#WordlistObject

注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Confidence:

    识别片段置信度。取值:0~100。

  • StartTimeOffset:

    识别片段起始的偏移时间,单位:秒。

  • EndTimeOffset:

    识别片段终止的偏移时间,单位:秒。

  • Text:

    识别文本。

  • Trans:

    翻译文本。

  • Wordlist:

    字词时间戳信息。



28680
28681
28682
# File 'lib/v20190612/models.rb', line 28680

def Wordlist
  @Wordlist
end

Instance Method Details

#deserialize(params) ⇒ Object



28691
28692
28693
28694
28695
28696
28697
28698
28699
28700
28701
28702
28703
28704
28705
# File 'lib/v20190612/models.rb', line 28691

def deserialize(params)
  @Confidence = params['Confidence']
  @StartTimeOffset = params['StartTimeOffset']
  @EndTimeOffset = params['EndTimeOffset']
  @Text = params['Text']
  @Trans = params['Trans']
  unless params['Wordlist'].nil?
    @Wordlist = []
    params['Wordlist'].each do |i|
      wordresult_tmp = WordResult.new
      wordresult_tmp.deserialize(i)
      @Wordlist << wordresult_tmp
    end
  end
end