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.



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

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:

    位置信息



310
311
312
# File 'lib/v20201229/models.rb', line 310

def Keyword
  @Keyword
end

#LibNameObject

Parameters:

  • Type:

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

  • Keyword:

    命中关键词

  • LibName:

    自定义词库名称

  • Positions:

    位置信息



310
311
312
# File 'lib/v20201229/models.rb', line 310

def LibName
  @LibName
end

#PositionsObject

Parameters:

  • Type:

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

  • Keyword:

    命中关键词

  • LibName:

    自定义词库名称

  • Positions:

    位置信息



310
311
312
# File 'lib/v20201229/models.rb', line 310

def Positions
  @Positions
end

#TypeObject

Parameters:

  • Type:

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

  • Keyword:

    命中关键词

  • LibName:

    自定义词库名称

  • Positions:

    位置信息



310
311
312
# File 'lib/v20201229/models.rb', line 310

def Type
  @Type
end

Instance Method Details

#deserialize(params) ⇒ Object



319
320
321
322
323
324
325
326
327
328
329
330
331
# File 'lib/v20201229/models.rb', line 319

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