Class: TencentCloud::Ocr::V20181119::TextTable

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

Overview

表格识别结果

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(coltl = nil, rowtl = nil, colbr = nil, rowbr = nil, text = nil, type = nil, confidence = nil, polygon = nil, advancedinfo = nil) ⇒ TextTable

Returns a new instance of TextTable.



11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
# File 'lib/v20181119/models.rb', line 11115

def initialize(coltl=nil, rowtl=nil, colbr=nil, rowbr=nil, text=nil, type=nil, confidence=nil, polygon=nil, advancedinfo=nil)
  @ColTl = coltl
  @RowTl = rowtl
  @ColBr = colbr
  @RowBr = rowbr
  @Text = text
  @Type = type
  @Confidence = confidence
  @Polygon = polygon
  @AdvancedInfo = advancedinfo
end

Instance Attribute Details

#AdvancedInfoObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

    单元格类型,包含body(表格主体)、header(表头)、footer(表尾)三种

  • Confidence:

    置信度 0 ~100

  • Polygon:

    文本行坐标,以四个顶点坐标表示

  • AdvancedInfo:

    此字段为扩展字段



11113
11114
11115
# File 'lib/v20181119/models.rb', line 11113

def AdvancedInfo
  @AdvancedInfo
end

#ColBrObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

    单元格类型,包含body(表格主体)、header(表头)、footer(表尾)三种

  • Confidence:

    置信度 0 ~100

  • Polygon:

    文本行坐标,以四个顶点坐标表示

  • AdvancedInfo:

    此字段为扩展字段



11113
11114
11115
# File 'lib/v20181119/models.rb', line 11113

def ColBr
  @ColBr
end

#ColTlObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

    单元格类型,包含body(表格主体)、header(表头)、footer(表尾)三种

  • Confidence:

    置信度 0 ~100

  • Polygon:

    文本行坐标,以四个顶点坐标表示

  • AdvancedInfo:

    此字段为扩展字段



11113
11114
11115
# File 'lib/v20181119/models.rb', line 11113

def ColTl
  @ColTl
end

#ConfidenceObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

    单元格类型,包含body(表格主体)、header(表头)、footer(表尾)三种

  • Confidence:

    置信度 0 ~100

  • Polygon:

    文本行坐标,以四个顶点坐标表示

  • AdvancedInfo:

    此字段为扩展字段



11113
11114
11115
# File 'lib/v20181119/models.rb', line 11113

def Confidence
  @Confidence
end

#PolygonObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

    单元格类型,包含body(表格主体)、header(表头)、footer(表尾)三种

  • Confidence:

    置信度 0 ~100

  • Polygon:

    文本行坐标,以四个顶点坐标表示

  • AdvancedInfo:

    此字段为扩展字段



11113
11114
11115
# File 'lib/v20181119/models.rb', line 11113

def Polygon
  @Polygon
end

#RowBrObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

    单元格类型,包含body(表格主体)、header(表头)、footer(表尾)三种

  • Confidence:

    置信度 0 ~100

  • Polygon:

    文本行坐标,以四个顶点坐标表示

  • AdvancedInfo:

    此字段为扩展字段



11113
11114
11115
# File 'lib/v20181119/models.rb', line 11113

def RowBr
  @RowBr
end

#RowTlObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

    单元格类型,包含body(表格主体)、header(表头)、footer(表尾)三种

  • Confidence:

    置信度 0 ~100

  • Polygon:

    文本行坐标,以四个顶点坐标表示

  • AdvancedInfo:

    此字段为扩展字段



11113
11114
11115
# File 'lib/v20181119/models.rb', line 11113

def RowTl
  @RowTl
end

#TextObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

    单元格类型,包含body(表格主体)、header(表头)、footer(表尾)三种

  • Confidence:

    置信度 0 ~100

  • Polygon:

    文本行坐标,以四个顶点坐标表示

  • AdvancedInfo:

    此字段为扩展字段



11113
11114
11115
# File 'lib/v20181119/models.rb', line 11113

def Text
  @Text
end

#TypeObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

    单元格类型,包含body(表格主体)、header(表头)、footer(表尾)三种

  • Confidence:

    置信度 0 ~100

  • Polygon:

    文本行坐标,以四个顶点坐标表示

  • AdvancedInfo:

    此字段为扩展字段



11113
11114
11115
# File 'lib/v20181119/models.rb', line 11113

def Type
  @Type
end

Instance Method Details

#deserialize(params) ⇒ Object



11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
# File 'lib/v20181119/models.rb', line 11127

def deserialize(params)
  @ColTl = params['ColTl']
  @RowTl = params['RowTl']
  @ColBr = params['ColBr']
  @RowBr = params['RowBr']
  @Text = params['Text']
  @Type = params['Type']
  @Confidence = params['Confidence']
  unless params['Polygon'].nil?
    @Polygon = []
    params['Polygon'].each do |i|
      coord_tmp = Coord.new
      coord_tmp.deserialize(i)
      @Polygon << coord_tmp
    end
  end
  @AdvancedInfo = params['AdvancedInfo']
end