Class: TencentCloud::Ocr::V20181119::Element

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

Overview

试题识别结果-元素内容

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text = nil, coord = nil, grouptype = nil, resultlist = nil, index = nil) ⇒ Element

Returns a new instance of Element.



2574
2575
2576
2577
2578
2579
2580
# File 'lib/v20181119/models.rb', line 2574

def initialize(text=nil, coord=nil, grouptype=nil, resultlist=nil, index=nil)
  @Text = text
  @Coord = coord
  @GroupType = grouptype
  @ResultList = resultlist
  @Index = index
end

Instance Attribute Details

#CoordObject

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

Parameters:

  • Text:

    元素内容,当type为figure时该字段内容为图片的位置

  • Coord:

    元素坐标

  • GroupType:

    元素group类型,包括multiple-choice(选择题)、fill-in-the-blank(填空题)、problem-solving(解答题)、arithmetic(算术题)

  • ResultList:

    结果列表

  • Index:

    元素索引



2572
2573
2574
# File 'lib/v20181119/models.rb', line 2572

def Coord
  @Coord
end

#GroupTypeObject

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

Parameters:

  • Text:

    元素内容,当type为figure时该字段内容为图片的位置

  • Coord:

    元素坐标

  • GroupType:

    元素group类型,包括multiple-choice(选择题)、fill-in-the-blank(填空题)、problem-solving(解答题)、arithmetic(算术题)

  • ResultList:

    结果列表

  • Index:

    元素索引



2572
2573
2574
# File 'lib/v20181119/models.rb', line 2572

def GroupType
  @GroupType
end

#IndexObject

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

Parameters:

  • Text:

    元素内容,当type为figure时该字段内容为图片的位置

  • Coord:

    元素坐标

  • GroupType:

    元素group类型,包括multiple-choice(选择题)、fill-in-the-blank(填空题)、problem-solving(解答题)、arithmetic(算术题)

  • ResultList:

    结果列表

  • Index:

    元素索引



2572
2573
2574
# File 'lib/v20181119/models.rb', line 2572

def Index
  @Index
end

#ResultListObject

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

Parameters:

  • Text:

    元素内容,当type为figure时该字段内容为图片的位置

  • Coord:

    元素坐标

  • GroupType:

    元素group类型,包括multiple-choice(选择题)、fill-in-the-blank(填空题)、problem-solving(解答题)、arithmetic(算术题)

  • ResultList:

    结果列表

  • Index:

    元素索引



2572
2573
2574
# File 'lib/v20181119/models.rb', line 2572

def ResultList
  @ResultList
end

#TextObject

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

Parameters:

  • Text:

    元素内容,当type为figure时该字段内容为图片的位置

  • Coord:

    元素坐标

  • GroupType:

    元素group类型,包括multiple-choice(选择题)、fill-in-the-blank(填空题)、problem-solving(解答题)、arithmetic(算术题)

  • ResultList:

    结果列表

  • Index:

    元素索引



2572
2573
2574
# File 'lib/v20181119/models.rb', line 2572

def Text
  @Text
end

Instance Method Details

#deserialize(params) ⇒ Object



2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
# File 'lib/v20181119/models.rb', line 2582

def deserialize(params)
  @Text = params['Text']
  unless params['Coord'].nil?
    @Coord = Polygon.new
    @Coord.deserialize(params['Coord'])
  end
  @GroupType = params['GroupType']
  unless params['ResultList'].nil?
    @ResultList = []
    params['ResultList'].each do |i|
      resultlist_tmp = ResultList.new
      resultlist_tmp.deserialize(i)
      @ResultList << resultlist_tmp
    end
  end
  @Index = params['Index']
end