Class: TencentCloud::Tms::V20201229::HitInfo

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

Overview

关键词命中位置信息

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of HitInfo.



316
317
318
319
320
321
# File 'lib/v20201229/models.rb', line 316

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:

    位置信息



314
315
316
# File 'lib/v20201229/models.rb', line 314

def Keyword
  @Keyword
end

#LibNameObject

Parameters:

  • Type:

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

  • Keyword:

    命中关键词

  • LibName:

    自定义词库名称

  • Positions:

    位置信息



314
315
316
# File 'lib/v20201229/models.rb', line 314

def LibName
  @LibName
end

#PositionsObject

Parameters:

  • Type:

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

  • Keyword:

    命中关键词

  • LibName:

    自定义词库名称

  • Positions:

    位置信息



314
315
316
# File 'lib/v20201229/models.rb', line 314

def Positions
  @Positions
end

#TypeObject

Parameters:

  • Type:

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

  • Keyword:

    命中关键词

  • LibName:

    自定义词库名称

  • Positions:

    位置信息



314
315
316
# File 'lib/v20201229/models.rb', line 314

def Type
  @Type
end

Instance Method Details

#deserialize(params) ⇒ Object



323
324
325
326
327
328
329
330
331
332
333
334
335
# File 'lib/v20201229/models.rb', line 323

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