Class: TencentCloud::Nlp::V20190408::ParseWordsResponse

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

Overview

ParseWords返回参数结构体

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(normaltext = nil, basicparticiples = nil, compoundparticiples = nil, entities = nil, requestid = nil) ⇒ ParseWordsResponse

Returns a new instance of ParseWordsResponse.



422
423
424
425
426
427
428
# File 'lib/v20190408/models.rb', line 422

def initialize(normaltext=nil, basicparticiples=nil, compoundparticiples=nil, entities=nil, requestid=nil)
  @NormalText = normaltext
  @BasicParticiples = basicparticiples
  @CompoundParticiples = compoundparticiples
  @Entities = entities
  @RequestId = requestid
end

Instance Attribute Details

#BasicParticiplesObject

Parameters:



420
421
422
# File 'lib/v20190408/models.rb', line 420

def BasicParticiples
  @BasicParticiples
end

#CompoundParticiplesObject

Parameters:



420
421
422
# File 'lib/v20190408/models.rb', line 420

def CompoundParticiples
  @CompoundParticiples
end

#EntitiesObject

Parameters:



420
421
422
# File 'lib/v20190408/models.rb', line 420

def Entities
  @Entities
end

#NormalTextObject

Parameters:



420
421
422
# File 'lib/v20190408/models.rb', line 420

def NormalText
  @NormalText
end

#RequestIdObject

Parameters:



420
421
422
# File 'lib/v20190408/models.rb', line 420

def RequestId
  @RequestId
end

Instance Method Details

#deserialize(params) ⇒ Object



430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
# File 'lib/v20190408/models.rb', line 430

def deserialize(params)
  @NormalText = params['NormalText']
  unless params['BasicParticiples'].nil?
    @BasicParticiples = []
    params['BasicParticiples'].each do |i|
      basicparticiple_tmp = BasicParticiple.new
      basicparticiple_tmp.deserialize(i)
      @BasicParticiples << basicparticiple_tmp
    end
  end
  unless params['CompoundParticiples'].nil?
    @CompoundParticiples = []
    params['CompoundParticiples'].each do |i|
      compoundparticiple_tmp = CompoundParticiple.new
      compoundparticiple_tmp.deserialize(i)
      @CompoundParticiples << compoundparticiple_tmp
    end
  end
  unless params['Entities'].nil?
    @Entities = []
    params['Entities'].each do |i|
      entity_tmp = Entity.new
      entity_tmp.deserialize(i)
      @Entities << entity_tmp
    end
  end
  @RequestId = params['RequestId']
end