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.



12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
# File 'lib/v20181119/models.rb', line 12195

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:

    此字段为扩展字段



12193
12194
12195
# File 'lib/v20181119/models.rb', line 12193

def AdvancedInfo
  @AdvancedInfo
end

#ColBrObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

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

  • Confidence:

    置信度 0 ~100

  • Polygon:

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

  • AdvancedInfo:

    此字段为扩展字段



12193
12194
12195
# File 'lib/v20181119/models.rb', line 12193

def ColBr
  @ColBr
end

#ColTlObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

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

  • Confidence:

    置信度 0 ~100

  • Polygon:

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

  • AdvancedInfo:

    此字段为扩展字段



12193
12194
12195
# File 'lib/v20181119/models.rb', line 12193

def ColTl
  @ColTl
end

#ConfidenceObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

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

  • Confidence:

    置信度 0 ~100

  • Polygon:

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

  • AdvancedInfo:

    此字段为扩展字段



12193
12194
12195
# File 'lib/v20181119/models.rb', line 12193

def Confidence
  @Confidence
end

#PolygonObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

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

  • Confidence:

    置信度 0 ~100

  • Polygon:

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

  • AdvancedInfo:

    此字段为扩展字段



12193
12194
12195
# File 'lib/v20181119/models.rb', line 12193

def Polygon
  @Polygon
end

#RowBrObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

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

  • Confidence:

    置信度 0 ~100

  • Polygon:

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

  • AdvancedInfo:

    此字段为扩展字段



12193
12194
12195
# File 'lib/v20181119/models.rb', line 12193

def RowBr
  @RowBr
end

#RowTlObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

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

  • Confidence:

    置信度 0 ~100

  • Polygon:

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

  • AdvancedInfo:

    此字段为扩展字段



12193
12194
12195
# File 'lib/v20181119/models.rb', line 12193

def RowTl
  @RowTl
end

#TextObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

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

  • Confidence:

    置信度 0 ~100

  • Polygon:

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

  • AdvancedInfo:

    此字段为扩展字段



12193
12194
12195
# File 'lib/v20181119/models.rb', line 12193

def Text
  @Text
end

#TypeObject

Parameters:

  • ColTl:

    单元格左上角的列索引

  • RowTl:

    单元格左上角的行索引

  • ColBr:

    单元格右下角的列索引

  • RowBr:

    单元格右下角的行索引

  • Text:

    单元格文字

  • Type:

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

  • Confidence:

    置信度 0 ~100

  • Polygon:

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

  • AdvancedInfo:

    此字段为扩展字段



12193
12194
12195
# File 'lib/v20181119/models.rb', line 12193

def Type
  @Type
end

Instance Method Details

#deserialize(params) ⇒ Object



12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
# File 'lib/v20181119/models.rb', line 12207

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