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.



12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
# File 'lib/v20181119/models.rb', line 12306

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:

    此字段为扩展字段



12304
12305
12306
# File 'lib/v20181119/models.rb', line 12304

def AdvancedInfo
  @AdvancedInfo
end

#ColBrObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

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

  • Confidence:

    置信度 0 ~100

  • Polygon:

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

  • AdvancedInfo:

    此字段为扩展字段



12304
12305
12306
# File 'lib/v20181119/models.rb', line 12304

def ColBr
  @ColBr
end

#ColTlObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

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

  • Confidence:

    置信度 0 ~100

  • Polygon:

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

  • AdvancedInfo:

    此字段为扩展字段



12304
12305
12306
# File 'lib/v20181119/models.rb', line 12304

def ColTl
  @ColTl
end

#ConfidenceObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

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

  • Confidence:

    置信度 0 ~100

  • Polygon:

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

  • AdvancedInfo:

    此字段为扩展字段



12304
12305
12306
# File 'lib/v20181119/models.rb', line 12304

def Confidence
  @Confidence
end

#PolygonObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

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

  • Confidence:

    置信度 0 ~100

  • Polygon:

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

  • AdvancedInfo:

    此字段为扩展字段



12304
12305
12306
# File 'lib/v20181119/models.rb', line 12304

def Polygon
  @Polygon
end

#RowBrObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

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

  • Confidence:

    置信度 0 ~100

  • Polygon:

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

  • AdvancedInfo:

    此字段为扩展字段



12304
12305
12306
# File 'lib/v20181119/models.rb', line 12304

def RowBr
  @RowBr
end

#RowTlObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

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

  • Confidence:

    置信度 0 ~100

  • Polygon:

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

  • AdvancedInfo:

    此字段为扩展字段



12304
12305
12306
# File 'lib/v20181119/models.rb', line 12304

def RowTl
  @RowTl
end

#TextObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

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

  • Confidence:

    置信度 0 ~100

  • Polygon:

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

  • AdvancedInfo:

    此字段为扩展字段



12304
12305
12306
# File 'lib/v20181119/models.rb', line 12304

def Text
  @Text
end

#TypeObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

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

  • Confidence:

    置信度 0 ~100

  • Polygon:

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

  • AdvancedInfo:

    此字段为扩展字段



12304
12305
12306
# File 'lib/v20181119/models.rb', line 12304

def Type
  @Type
end

Instance Method Details

#deserialize(params) ⇒ Object



12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
# File 'lib/v20181119/models.rb', line 12318

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