Class: TencentCloud::Tmt::V20180321::LanguageDetectRequest

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

Overview

LanguageDetect请求参数结构体

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text = nil, projectid = nil) ⇒ LanguageDetectRequest

Returns a new instance of LanguageDetectRequest.



346
347
348
349
# File 'lib/v20180321/models.rb', line 346

def initialize(text=nil, projectid=nil)
  @Text = text
  @ProjectId = projectid
end

Instance Attribute Details

#ProjectIdObject

Parameters:

  • Text:

    待识别的文本,文本统一使用utf-8格式编码,非utf-8格式编码字符会翻译失败。单次请求的文本长度需要低于2000。

  • ProjectId:

    项目ID,可以根据控制台-账号中心-项目管理中的配置填写,如无配置请填写默认项目ID:0



344
345
346
# File 'lib/v20180321/models.rb', line 344

def ProjectId
  @ProjectId
end

#TextObject

Parameters:

  • Text:

    待识别的文本,文本统一使用utf-8格式编码,非utf-8格式编码字符会翻译失败。单次请求的文本长度需要低于2000。

  • ProjectId:

    项目ID,可以根据控制台-账号中心-项目管理中的配置填写,如无配置请填写默认项目ID:0



344
345
346
# File 'lib/v20180321/models.rb', line 344

def Text
  @Text
end

Instance Method Details

#deserialize(params) ⇒ Object



351
352
353
354
# File 'lib/v20180321/models.rb', line 351

def deserialize(params)
  @Text = params['Text']
  @ProjectId = params['ProjectId']
end