Class: TencentCloud::Nlp::V20190408::SentenceCorrectionResponse

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

Overview

SentenceCorrection返回参数结构体

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(correctionlist = nil, requestid = nil) ⇒ SentenceCorrectionResponse

Returns a new instance of SentenceCorrectionResponse.



486
487
488
489
# File 'lib/v20190408/models.rb', line 486

def initialize(correctionlist=nil, requestid=nil)
  @CorrectionList = correctionlist
  @RequestId = requestid
end

Instance Attribute Details

#CorrectionListObject

(注意仅展示错误句子的纠错结果,若句子无错则不展示,若全部待纠错句子都被认为无错,则可能返回数组为空)

Parameters:

  • CorrectionList:

    纠错结果列表。

  • RequestId:

    唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。



484
485
486
# File 'lib/v20190408/models.rb', line 484

def CorrectionList
  @CorrectionList
end

#RequestIdObject

(注意仅展示错误句子的纠错结果,若句子无错则不展示,若全部待纠错句子都被认为无错,则可能返回数组为空)

Parameters:

  • CorrectionList:

    纠错结果列表。

  • RequestId:

    唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。



484
485
486
# File 'lib/v20190408/models.rb', line 484

def RequestId
  @RequestId
end

Instance Method Details

#deserialize(params) ⇒ Object



491
492
493
494
495
496
497
498
499
500
501
# File 'lib/v20190408/models.rb', line 491

def deserialize(params)
  unless params['CorrectionList'].nil?
    @CorrectionList = []
    params['CorrectionList'].each do |i|
      correctionitem_tmp = CorrectionItem.new
      correctionitem_tmp.deserialize(i)
      @CorrectionList << correctionitem_tmp
    end
  end
  @RequestId = params['RequestId']
end