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.



24320
24321
24322
24323
24324
24325
24326
24327
# File 'lib/v20190612/models.rb', line 24320

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:

    字词时间戳信息。



24318
24319
24320
# File 'lib/v20190612/models.rb', line 24318

def Confidence
  @Confidence
end

#EndTimeOffsetObject

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

Parameters:

  • Confidence:

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

  • StartTimeOffset:

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

  • EndTimeOffset:

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

  • Text:

    识别文本。

  • Trans:

    翻译文本。

  • Wordlist:

    字词时间戳信息。



24318
24319
24320
# File 'lib/v20190612/models.rb', line 24318

def EndTimeOffset
  @EndTimeOffset
end

#StartTimeOffsetObject

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

Parameters:

  • Confidence:

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

  • StartTimeOffset:

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

  • EndTimeOffset:

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

  • Text:

    识别文本。

  • Trans:

    翻译文本。

  • Wordlist:

    字词时间戳信息。



24318
24319
24320
# File 'lib/v20190612/models.rb', line 24318

def StartTimeOffset
  @StartTimeOffset
end

#TextObject

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

Parameters:

  • Confidence:

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

  • StartTimeOffset:

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

  • EndTimeOffset:

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

  • Text:

    识别文本。

  • Trans:

    翻译文本。

  • Wordlist:

    字词时间戳信息。



24318
24319
24320
# File 'lib/v20190612/models.rb', line 24318

def Text
  @Text
end

#TransObject

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

Parameters:

  • Confidence:

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

  • StartTimeOffset:

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

  • EndTimeOffset:

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

  • Text:

    识别文本。

  • Trans:

    翻译文本。

  • Wordlist:

    字词时间戳信息。



24318
24319
24320
# File 'lib/v20190612/models.rb', line 24318

def Trans
  @Trans
end

#WordlistObject

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

Parameters:

  • Confidence:

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

  • StartTimeOffset:

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

  • EndTimeOffset:

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

  • Text:

    识别文本。

  • Trans:

    翻译文本。

  • Wordlist:

    字词时间戳信息。



24318
24319
24320
# File 'lib/v20190612/models.rb', line 24318

def Wordlist
  @Wordlist
end

Instance Method Details

#deserialize(params) ⇒ Object



24329
24330
24331
24332
24333
24334
24335
24336
24337
24338
24339
24340
24341
24342
24343
# File 'lib/v20190612/models.rb', line 24329

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