Class: TencentCloud::Ims::V20201229::OcrHitInfo

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

Overview

ocr关键词命中位置信息

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type = nil, keyword = nil, libname = nil, positions = nil) ⇒ OcrHitInfo

Returns a new instance of OcrHitInfo.



588
589
590
591
592
593
# File 'lib/v20201229/models.rb', line 588

def initialize(type=nil, keyword=nil, libname=nil, positions=nil)
  @Type = type
  @Keyword = keyword
  @LibName = libname
  @Positions = positions
end

Instance Attribute Details

#KeywordObject

Parameters:

  • Type:

    标识模型命中还是关键词命中

  • Keyword:

    命中关键词

  • LibName:

    自定义词库名称

  • Positions:

    位置信息



586
587
588
# File 'lib/v20201229/models.rb', line 586

def Keyword
  @Keyword
end

#LibNameObject

Parameters:

  • Type:

    标识模型命中还是关键词命中

  • Keyword:

    命中关键词

  • LibName:

    自定义词库名称

  • Positions:

    位置信息



586
587
588
# File 'lib/v20201229/models.rb', line 586

def LibName
  @LibName
end

#PositionsObject

Parameters:

  • Type:

    标识模型命中还是关键词命中

  • Keyword:

    命中关键词

  • LibName:

    自定义词库名称

  • Positions:

    位置信息



586
587
588
# File 'lib/v20201229/models.rb', line 586

def Positions
  @Positions
end

#TypeObject

Parameters:

  • Type:

    标识模型命中还是关键词命中

  • Keyword:

    命中关键词

  • LibName:

    自定义词库名称

  • Positions:

    位置信息



586
587
588
# File 'lib/v20201229/models.rb', line 586

def Type
  @Type
end

Instance Method Details

#deserialize(params) ⇒ Object



595
596
597
598
599
600
601
602
603
604
605
606
607
# File 'lib/v20201229/models.rb', line 595

def deserialize(params)
  @Type = params['Type']
  @Keyword = params['Keyword']
  @LibName = params['LibName']
  unless params['Positions'].nil?
    @Positions = []
    params['Positions'].each do |i|
      positions_tmp = Positions.new
      positions_tmp.deserialize(i)
      @Positions << positions_tmp
    end
  end
end