Class: TencentCloud::Ocr::V20181119::QuestionObj

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

Overview

试题识别结构化信息

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(questiontextno = nil, questiontexttype = nil, questiontext = nil, questionoptions = nil, questionsubquestion = nil, questionimagecoords = nil) ⇒ QuestionObj

Returns a new instance of QuestionObj.



7326
7327
7328
7329
7330
7331
7332
7333
# File 'lib/v20181119/models.rb', line 7326

def initialize(questiontextno=nil, questiontexttype=nil, questiontext=nil, questionoptions=nil, questionsubquestion=nil, questionimagecoords=nil)
  @QuestionTextNo = questiontextno
  @QuestionTextType = questiontexttype
  @QuestionText = questiontext
  @QuestionOptions = questionoptions
  @QuestionSubquestion = questionsubquestion
  @QuestionImageCoords = questionimagecoords
end

Instance Attribute Details

#QuestionImageCoordsObject

1: “选择题” 2: “填空题” 3: “解答题”

Parameters:

  • QuestionTextNo:

    题号

  • QuestionTextType:

    题型:

  • QuestionText:

    题干

  • QuestionOptions:

    选择题选项,包含1个或多个option

  • QuestionSubquestion:

    所有子题的question属性

  • QuestionImageCoords:

    示意图检测框在的图片中的像素坐标



7324
7325
7326
# File 'lib/v20181119/models.rb', line 7324

def QuestionImageCoords
  @QuestionImageCoords
end

#QuestionOptionsObject

1: “选择题” 2: “填空题” 3: “解答题”

Parameters:

  • QuestionTextNo:

    题号

  • QuestionTextType:

    题型:

  • QuestionText:

    题干

  • QuestionOptions:

    选择题选项,包含1个或多个option

  • QuestionSubquestion:

    所有子题的question属性

  • QuestionImageCoords:

    示意图检测框在的图片中的像素坐标



7324
7325
7326
# File 'lib/v20181119/models.rb', line 7324

def QuestionOptions
  @QuestionOptions
end

#QuestionSubquestionObject

1: “选择题” 2: “填空题” 3: “解答题”

Parameters:

  • QuestionTextNo:

    题号

  • QuestionTextType:

    题型:

  • QuestionText:

    题干

  • QuestionOptions:

    选择题选项,包含1个或多个option

  • QuestionSubquestion:

    所有子题的question属性

  • QuestionImageCoords:

    示意图检测框在的图片中的像素坐标



7324
7325
7326
# File 'lib/v20181119/models.rb', line 7324

def QuestionSubquestion
  @QuestionSubquestion
end

#QuestionTextObject

1: “选择题” 2: “填空题” 3: “解答题”

Parameters:

  • QuestionTextNo:

    题号

  • QuestionTextType:

    题型:

  • QuestionText:

    题干

  • QuestionOptions:

    选择题选项,包含1个或多个option

  • QuestionSubquestion:

    所有子题的question属性

  • QuestionImageCoords:

    示意图检测框在的图片中的像素坐标



7324
7325
7326
# File 'lib/v20181119/models.rb', line 7324

def QuestionText
  @QuestionText
end

#QuestionTextNoObject

1: “选择题” 2: “填空题” 3: “解答题”

Parameters:

  • QuestionTextNo:

    题号

  • QuestionTextType:

    题型:

  • QuestionText:

    题干

  • QuestionOptions:

    选择题选项,包含1个或多个option

  • QuestionSubquestion:

    所有子题的question属性

  • QuestionImageCoords:

    示意图检测框在的图片中的像素坐标



7324
7325
7326
# File 'lib/v20181119/models.rb', line 7324

def QuestionTextNo
  @QuestionTextNo
end

#QuestionTextTypeObject

1: “选择题” 2: “填空题” 3: “解答题”

Parameters:

  • QuestionTextNo:

    题号

  • QuestionTextType:

    题型:

  • QuestionText:

    题干

  • QuestionOptions:

    选择题选项,包含1个或多个option

  • QuestionSubquestion:

    所有子题的question属性

  • QuestionImageCoords:

    示意图检测框在的图片中的像素坐标



7324
7325
7326
# File 'lib/v20181119/models.rb', line 7324

def QuestionTextType
  @QuestionTextType
end

Instance Method Details

#deserialize(params) ⇒ Object



7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
# File 'lib/v20181119/models.rb', line 7335

def deserialize(params)
  @QuestionTextNo = params['QuestionTextNo']
  @QuestionTextType = params['QuestionTextType']
  @QuestionText = params['QuestionText']
  @QuestionOptions = params['QuestionOptions']
  @QuestionSubquestion = params['QuestionSubquestion']
  unless params['QuestionImageCoords'].nil?
    @QuestionImageCoords = []
    params['QuestionImageCoords'].each do |i|
      rect_tmp = Rect.new
      rect_tmp.deserialize(i)
      @QuestionImageCoords << rect_tmp
    end
  end
end