tencentcloud-sdk-nlp 1.0.200

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1623 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ module TencentCloud
18
+ module Nlp
19
+ module V20190408
20
+ # AutoSummarization请求参数结构体
21
+ class AutoSummarizationRequest < TencentCloud::Common::AbstractModel
22
+ # @param Text: 待处理的文本(仅支持UTF-8格式,不超过2000字)
23
+ # @type Text: String
24
+ # @param Length: 指定摘要的长度上限(默认值为200)
25
+ # 注:为保证摘要的可读性,最终生成的摘要长度会低于指定的长度上限。
26
+ # @type Length: Integer
27
+
28
+ attr_accessor :Text, :Length
29
+
30
+ def initialize(text=nil, length=nil)
31
+ @Text = text
32
+ @Length = length
33
+ end
34
+
35
+ def deserialize(params)
36
+ @Text = params['Text']
37
+ @Length = params['Length']
38
+ end
39
+ end
40
+
41
+ # AutoSummarization返回参数结构体
42
+ class AutoSummarizationResponse < TencentCloud::Common::AbstractModel
43
+ # @param Summary: 文本摘要结果
44
+ # @type Summary: String
45
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
46
+ # @type RequestId: String
47
+
48
+ attr_accessor :Summary, :RequestId
49
+
50
+ def initialize(summary=nil, requestid=nil)
51
+ @Summary = summary
52
+ @RequestId = requestid
53
+ end
54
+
55
+ def deserialize(params)
56
+ @Summary = params['Summary']
57
+ @RequestId = params['RequestId']
58
+ end
59
+ end
60
+
61
+ # 文本纠错结果
62
+ class CCIToken < TencentCloud::Common::AbstractModel
63
+ # @param Word: 错别字内容
64
+ # @type Word: String
65
+ # @param BeginOffset: 错别字的起始位置,从0开始
66
+ # @type BeginOffset: Integer
67
+ # @param CorrectWord: 错别字纠错结果
68
+ # @type CorrectWord: String
69
+
70
+ attr_accessor :Word, :BeginOffset, :CorrectWord
71
+
72
+ def initialize(word=nil, beginoffset=nil, correctword=nil)
73
+ @Word = word
74
+ @BeginOffset = beginoffset
75
+ @CorrectWord = correctword
76
+ end
77
+
78
+ def deserialize(params)
79
+ @Word = params['Word']
80
+ @BeginOffset = params['BeginOffset']
81
+ @CorrectWord = params['CorrectWord']
82
+ end
83
+ end
84
+
85
+ # ChatBot请求参数结构体
86
+ class ChatBotRequest < TencentCloud::Common::AbstractModel
87
+ # @param Query: 用户请求的query
88
+ # @type Query: String
89
+ # @param OpenId: 服务的id, 主要用于儿童闲聊接口,比如手Q的openid
90
+ # @type OpenId: String
91
+ # @param Flag: 0: 通用闲聊, 1:儿童闲聊, 默认是通用闲聊
92
+ # @type Flag: Integer
93
+
94
+ attr_accessor :Query, :OpenId, :Flag
95
+
96
+ def initialize(query=nil, openid=nil, flag=nil)
97
+ @Query = query
98
+ @OpenId = openid
99
+ @Flag = flag
100
+ end
101
+
102
+ def deserialize(params)
103
+ @Query = params['Query']
104
+ @OpenId = params['OpenId']
105
+ @Flag = params['Flag']
106
+ end
107
+ end
108
+
109
+ # ChatBot返回参数结构体
110
+ class ChatBotResponse < TencentCloud::Common::AbstractModel
111
+ # @param Reply: 闲聊回复
112
+ # @type Reply: String
113
+ # @param Confidence: 对于当前输出回复的自信度
114
+ # @type Confidence: Float
115
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
116
+ # @type RequestId: String
117
+
118
+ attr_accessor :Reply, :Confidence, :RequestId
119
+
120
+ def initialize(reply=nil, confidence=nil, requestid=nil)
121
+ @Reply = reply
122
+ @Confidence = confidence
123
+ @RequestId = requestid
124
+ end
125
+
126
+ def deserialize(params)
127
+ @Reply = params['Reply']
128
+ @Confidence = params['Confidence']
129
+ @RequestId = params['RequestId']
130
+ end
131
+ end
132
+
133
+ # 文本分类结果
134
+ class ClassificationResult < TencentCloud::Common::AbstractModel
135
+ # @param FirstClassName: 一级分类名称
136
+ # @type FirstClassName: String
137
+ # @param SecondClassName: 二级分类名称
138
+ # @type SecondClassName: String
139
+ # @param FirstClassProbability: 一级分类概率
140
+ # 注意:此字段可能返回 null,表示取不到有效值。
141
+ # @type FirstClassProbability: Float
142
+ # @param SecondClassProbability: 二级分类概率
143
+ # 注意:此字段可能返回 null,表示取不到有效值。
144
+ # @type SecondClassProbability: Float
145
+ # @param ThirdClassName: 三级分类名称,仅有当新闻领域五分类可能出现,详情见文本分类文档
146
+ # 注意:此字段可能返回 null,表示取不到有效值。
147
+ # @type ThirdClassName: String
148
+ # @param ThirdClassProbability: 三级分类概率,仅有当新闻领域五分类可能出现,详情见文本分类文档
149
+ # 注意:此字段可能返回 null,表示取不到有效值。
150
+ # @type ThirdClassProbability: Float
151
+ # @param FourthClassName: 四级分类名称,仅有当新闻领域五分类可能出现,详情见文本分类文档
152
+ # 注意:此字段可能返回 null,表示取不到有效值。
153
+ # @type FourthClassName: String
154
+ # @param FourthClassProbability: 四级分类概率,仅有当新闻领域五分类可能出现,详情见文本分类文档
155
+ # 注意:此字段可能返回 null,表示取不到有效值。
156
+ # @type FourthClassProbability: Float
157
+ # @param FifthClassName: 五级分类名称,仅有当新闻领域五分类可能出现,详情见文本分类文档
158
+ # 注意:此字段可能返回 null,表示取不到有效值。
159
+ # @type FifthClassName: String
160
+ # @param FifthClassProbability: 五级分类概率,仅有当新闻领域五分类可能出现,详情见文本分类文档
161
+ # 注意:此字段可能返回 null,表示取不到有效值。
162
+ # @type FifthClassProbability: Float
163
+
164
+ attr_accessor :FirstClassName, :SecondClassName, :FirstClassProbability, :SecondClassProbability, :ThirdClassName, :ThirdClassProbability, :FourthClassName, :FourthClassProbability, :FifthClassName, :FifthClassProbability
165
+
166
+ def initialize(firstclassname=nil, secondclassname=nil, firstclassprobability=nil, secondclassprobability=nil, thirdclassname=nil, thirdclassprobability=nil, fourthclassname=nil, fourthclassprobability=nil, fifthclassname=nil, fifthclassprobability=nil)
167
+ @FirstClassName = firstclassname
168
+ @SecondClassName = secondclassname
169
+ @FirstClassProbability = firstclassprobability
170
+ @SecondClassProbability = secondclassprobability
171
+ @ThirdClassName = thirdclassname
172
+ @ThirdClassProbability = thirdclassprobability
173
+ @FourthClassName = fourthclassname
174
+ @FourthClassProbability = fourthclassprobability
175
+ @FifthClassName = fifthclassname
176
+ @FifthClassProbability = fifthclassprobability
177
+ end
178
+
179
+ def deserialize(params)
180
+ @FirstClassName = params['FirstClassName']
181
+ @SecondClassName = params['SecondClassName']
182
+ @FirstClassProbability = params['FirstClassProbability']
183
+ @SecondClassProbability = params['SecondClassProbability']
184
+ @ThirdClassName = params['ThirdClassName']
185
+ @ThirdClassProbability = params['ThirdClassProbability']
186
+ @FourthClassName = params['FourthClassName']
187
+ @FourthClassProbability = params['FourthClassProbability']
188
+ @FifthClassName = params['FifthClassName']
189
+ @FifthClassProbability = params['FifthClassProbability']
190
+ end
191
+ end
192
+
193
+ # CreateDict请求参数结构体
194
+ class CreateDictRequest < TencentCloud::Common::AbstractModel
195
+ # @param Name: 自定义词库名称,不超过20字。
196
+ # @type Name: String
197
+ # @param Description: 自定义词库描述,不超过100字。
198
+ # @type Description: String
199
+
200
+ attr_accessor :Name, :Description
201
+
202
+ def initialize(name=nil, description=nil)
203
+ @Name = name
204
+ @Description = description
205
+ end
206
+
207
+ def deserialize(params)
208
+ @Name = params['Name']
209
+ @Description = params['Description']
210
+ end
211
+ end
212
+
213
+ # CreateDict返回参数结构体
214
+ class CreateDictResponse < TencentCloud::Common::AbstractModel
215
+ # @param DictId: 创建的自定义词库ID。
216
+ # 注意:此字段可能返回 null,表示取不到有效值。
217
+ # @type DictId: String
218
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
219
+ # @type RequestId: String
220
+
221
+ attr_accessor :DictId, :RequestId
222
+
223
+ def initialize(dictid=nil, requestid=nil)
224
+ @DictId = dictid
225
+ @RequestId = requestid
226
+ end
227
+
228
+ def deserialize(params)
229
+ @DictId = params['DictId']
230
+ @RequestId = params['RequestId']
231
+ end
232
+ end
233
+
234
+ # CreateWordItems请求参数结构体
235
+ class CreateWordItemsRequest < TencentCloud::Common::AbstractModel
236
+ # @param DictId: 自定义词库ID。
237
+ # @type DictId: String
238
+ # @param WordItems: 待添加的词条集合。
239
+ # @type WordItems: Array
240
+
241
+ attr_accessor :DictId, :WordItems
242
+
243
+ def initialize(dictid=nil, worditems=nil)
244
+ @DictId = dictid
245
+ @WordItems = worditems
246
+ end
247
+
248
+ def deserialize(params)
249
+ @DictId = params['DictId']
250
+ unless params['WordItems'].nil?
251
+ @WordItems = []
252
+ params['WordItems'].each do |i|
253
+ worditem_tmp = WordItem.new
254
+ worditem_tmp.deserialize(i)
255
+ @WordItems << worditem_tmp
256
+ end
257
+ end
258
+ end
259
+ end
260
+
261
+ # CreateWordItems返回参数结构体
262
+ class CreateWordItemsResponse < TencentCloud::Common::AbstractModel
263
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
264
+ # @type RequestId: String
265
+
266
+ attr_accessor :RequestId
267
+
268
+ def initialize(requestid=nil)
269
+ @RequestId = requestid
270
+ end
271
+
272
+ def deserialize(params)
273
+ @RequestId = params['RequestId']
274
+ end
275
+ end
276
+
277
+ # DeleteDict请求参数结构体
278
+ class DeleteDictRequest < TencentCloud::Common::AbstractModel
279
+ # @param DictId: 要删除的自定义词库ID。
280
+ # @type DictId: String
281
+
282
+ attr_accessor :DictId
283
+
284
+ def initialize(dictid=nil)
285
+ @DictId = dictid
286
+ end
287
+
288
+ def deserialize(params)
289
+ @DictId = params['DictId']
290
+ end
291
+ end
292
+
293
+ # DeleteDict返回参数结构体
294
+ class DeleteDictResponse < TencentCloud::Common::AbstractModel
295
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
296
+ # @type RequestId: String
297
+
298
+ attr_accessor :RequestId
299
+
300
+ def initialize(requestid=nil)
301
+ @RequestId = requestid
302
+ end
303
+
304
+ def deserialize(params)
305
+ @RequestId = params['RequestId']
306
+ end
307
+ end
308
+
309
+ # DeleteWordItems请求参数结构体
310
+ class DeleteWordItemsRequest < TencentCloud::Common::AbstractModel
311
+ # @param DictId: 自定义词库ID。
312
+ # @type DictId: String
313
+ # @param WordItems: 待删除的词条集合。
314
+ # @type WordItems: Array
315
+
316
+ attr_accessor :DictId, :WordItems
317
+
318
+ def initialize(dictid=nil, worditems=nil)
319
+ @DictId = dictid
320
+ @WordItems = worditems
321
+ end
322
+
323
+ def deserialize(params)
324
+ @DictId = params['DictId']
325
+ unless params['WordItems'].nil?
326
+ @WordItems = []
327
+ params['WordItems'].each do |i|
328
+ worditem_tmp = WordItem.new
329
+ worditem_tmp.deserialize(i)
330
+ @WordItems << worditem_tmp
331
+ end
332
+ end
333
+ end
334
+ end
335
+
336
+ # DeleteWordItems返回参数结构体
337
+ class DeleteWordItemsResponse < TencentCloud::Common::AbstractModel
338
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
339
+ # @type RequestId: String
340
+
341
+ attr_accessor :RequestId
342
+
343
+ def initialize(requestid=nil)
344
+ @RequestId = requestid
345
+ end
346
+
347
+ def deserialize(params)
348
+ @RequestId = params['RequestId']
349
+ end
350
+ end
351
+
352
+ # DependencyParsing请求参数结构体
353
+ class DependencyParsingRequest < TencentCloud::Common::AbstractModel
354
+ # @param Text: 待分析的文本(仅支持UTF-8格式,不超过200字)
355
+ # @type Text: String
356
+
357
+ attr_accessor :Text
358
+
359
+ def initialize(text=nil)
360
+ @Text = text
361
+ end
362
+
363
+ def deserialize(params)
364
+ @Text = params['Text']
365
+ end
366
+ end
367
+
368
+ # DependencyParsing返回参数结构体
369
+ class DependencyParsingResponse < TencentCloud::Common::AbstractModel
370
+ # @param DpTokens: 句法依存分析结果,其中句法依存关系的类型包括:
371
+ # <li>主谓关系,eg: 我送她一束花 (我 <-- 送)
372
+ # <li>动宾关系,eg: 我送她一束花 (送 --> 花)
373
+ # <li>间宾关系,eg: 我送她一束花 (送 --> 她)
374
+ # <li>前置宾语,eg: 他什么书都读 (书 <-- 读)
375
+ # <li>兼语,eg: 他请我吃饭 (请 --> 我)
376
+ # <li>定中关系,eg: 红苹果 (红 <-- 苹果)
377
+ # <li>状中结构,eg: 非常美丽 (非常 <-- 美丽)
378
+ # <li>动补结构,eg: 做完了作业 (做 --> 完)
379
+ # <li>并列关系,eg: 大山和大海 (大山 --> 大海)
380
+ # <li>介宾关系,eg: 在贸易区内 (在 --> 内)
381
+ # <li>左附加关系,eg: 大山和大海 (和 <-- 大海)
382
+ # <li>右附加关系,eg: 孩子们 (孩子 --> 们)
383
+ # <li>独立结构,eg: 两个单句在结构上彼此独立
384
+ # <li>标点符号,eg: 。
385
+ # <li>核心关系,eg: 整个句子的核心
386
+ # @type DpTokens: Array
387
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
388
+ # @type RequestId: String
389
+
390
+ attr_accessor :DpTokens, :RequestId
391
+
392
+ def initialize(dptokens=nil, requestid=nil)
393
+ @DpTokens = dptokens
394
+ @RequestId = requestid
395
+ end
396
+
397
+ def deserialize(params)
398
+ unless params['DpTokens'].nil?
399
+ @DpTokens = []
400
+ params['DpTokens'].each do |i|
401
+ dptoken_tmp = DpToken.new
402
+ dptoken_tmp.deserialize(i)
403
+ @DpTokens << dptoken_tmp
404
+ end
405
+ end
406
+ @RequestId = params['RequestId']
407
+ end
408
+ end
409
+
410
+ # DescribeDict请求参数结构体
411
+ class DescribeDictRequest < TencentCloud::Common::AbstractModel
412
+ # @param DictId: 自定义词库ID。
413
+ # @type DictId: String
414
+ # @param Name: 自定义词库名称,模糊搜索。
415
+ # @type Name: String
416
+
417
+ attr_accessor :DictId, :Name
418
+
419
+ def initialize(dictid=nil, name=nil)
420
+ @DictId = dictid
421
+ @Name = name
422
+ end
423
+
424
+ def deserialize(params)
425
+ @DictId = params['DictId']
426
+ @Name = params['Name']
427
+ end
428
+ end
429
+
430
+ # DescribeDict返回参数结构体
431
+ class DescribeDictResponse < TencentCloud::Common::AbstractModel
432
+ # @param Dicts: 查询到的词库信息列表。
433
+ # 注意:此字段可能返回 null,表示取不到有效值。
434
+ # @type Dicts: Array
435
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
436
+ # @type RequestId: String
437
+
438
+ attr_accessor :Dicts, :RequestId
439
+
440
+ def initialize(dicts=nil, requestid=nil)
441
+ @Dicts = dicts
442
+ @RequestId = requestid
443
+ end
444
+
445
+ def deserialize(params)
446
+ unless params['Dicts'].nil?
447
+ @Dicts = []
448
+ params['Dicts'].each do |i|
449
+ dictinfo_tmp = DictInfo.new
450
+ dictinfo_tmp.deserialize(i)
451
+ @Dicts << dictinfo_tmp
452
+ end
453
+ end
454
+ @RequestId = params['RequestId']
455
+ end
456
+ end
457
+
458
+ # DescribeDicts请求参数结构体
459
+ class DescribeDictsRequest < TencentCloud::Common::AbstractModel
460
+ # @param Limit: 每页数据量,范围为1~100,默认为10。
461
+ # @type Limit: Integer
462
+ # @param Offset: 分页偏移量,从0开始,默认为0。
463
+ # @type Offset: Integer
464
+
465
+ attr_accessor :Limit, :Offset
466
+
467
+ def initialize(limit=nil, offset=nil)
468
+ @Limit = limit
469
+ @Offset = offset
470
+ end
471
+
472
+ def deserialize(params)
473
+ @Limit = params['Limit']
474
+ @Offset = params['Offset']
475
+ end
476
+ end
477
+
478
+ # DescribeDicts返回参数结构体
479
+ class DescribeDictsResponse < TencentCloud::Common::AbstractModel
480
+ # @param TotalCount: 记录总条数。
481
+ # @type TotalCount: Integer
482
+ # @param Dicts: 自定义词库信息列表。
483
+ # 注意:此字段可能返回 null,表示取不到有效值。
484
+ # @type Dicts: Array
485
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
486
+ # @type RequestId: String
487
+
488
+ attr_accessor :TotalCount, :Dicts, :RequestId
489
+
490
+ def initialize(totalcount=nil, dicts=nil, requestid=nil)
491
+ @TotalCount = totalcount
492
+ @Dicts = dicts
493
+ @RequestId = requestid
494
+ end
495
+
496
+ def deserialize(params)
497
+ @TotalCount = params['TotalCount']
498
+ unless params['Dicts'].nil?
499
+ @Dicts = []
500
+ params['Dicts'].each do |i|
501
+ dictinfo_tmp = DictInfo.new
502
+ dictinfo_tmp.deserialize(i)
503
+ @Dicts << dictinfo_tmp
504
+ end
505
+ end
506
+ @RequestId = params['RequestId']
507
+ end
508
+ end
509
+
510
+ # DescribeEntity请求参数结构体
511
+ class DescribeEntityRequest < TencentCloud::Common::AbstractModel
512
+ # @param EntityName: 实体名称
513
+ # @type EntityName: String
514
+
515
+ attr_accessor :EntityName
516
+
517
+ def initialize(entityname=nil)
518
+ @EntityName = entityname
519
+ end
520
+
521
+ def deserialize(params)
522
+ @EntityName = params['EntityName']
523
+ end
524
+ end
525
+
526
+ # DescribeEntity返回参数结构体
527
+ class DescribeEntityResponse < TencentCloud::Common::AbstractModel
528
+ # @param Content: 返回查询实体相关信息
529
+ # @type Content: String
530
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
531
+ # @type RequestId: String
532
+
533
+ attr_accessor :Content, :RequestId
534
+
535
+ def initialize(content=nil, requestid=nil)
536
+ @Content = content
537
+ @RequestId = requestid
538
+ end
539
+
540
+ def deserialize(params)
541
+ @Content = params['Content']
542
+ @RequestId = params['RequestId']
543
+ end
544
+ end
545
+
546
+ # DescribeRelation请求参数结构体
547
+ class DescribeRelationRequest < TencentCloud::Common::AbstractModel
548
+ # @param LeftEntityName: 输入第一个实体
549
+ # @type LeftEntityName: String
550
+ # @param RightEntityName: 输入第二个实体
551
+ # @type RightEntityName: String
552
+
553
+ attr_accessor :LeftEntityName, :RightEntityName
554
+
555
+ def initialize(leftentityname=nil, rightentityname=nil)
556
+ @LeftEntityName = leftentityname
557
+ @RightEntityName = rightentityname
558
+ end
559
+
560
+ def deserialize(params)
561
+ @LeftEntityName = params['LeftEntityName']
562
+ @RightEntityName = params['RightEntityName']
563
+ end
564
+ end
565
+
566
+ # DescribeRelation返回参数结构体
567
+ class DescribeRelationResponse < TencentCloud::Common::AbstractModel
568
+ # @param Content: 返回查询实体间的关系
569
+ # @type Content: Array
570
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
571
+ # @type RequestId: String
572
+
573
+ attr_accessor :Content, :RequestId
574
+
575
+ def initialize(content=nil, requestid=nil)
576
+ @Content = content
577
+ @RequestId = requestid
578
+ end
579
+
580
+ def deserialize(params)
581
+ unless params['Content'].nil?
582
+ @Content = []
583
+ params['Content'].each do |i|
584
+ entityrelationcontent_tmp = EntityRelationContent.new
585
+ entityrelationcontent_tmp.deserialize(i)
586
+ @Content << entityrelationcontent_tmp
587
+ end
588
+ end
589
+ @RequestId = params['RequestId']
590
+ end
591
+ end
592
+
593
+ # DescribeTriple请求参数结构体
594
+ class DescribeTripleRequest < TencentCloud::Common::AbstractModel
595
+ # @param TripleCondition: 三元组查询条件
596
+ # @type TripleCondition: String
597
+
598
+ attr_accessor :TripleCondition
599
+
600
+ def initialize(triplecondition=nil)
601
+ @TripleCondition = triplecondition
602
+ end
603
+
604
+ def deserialize(params)
605
+ @TripleCondition = params['TripleCondition']
606
+ end
607
+ end
608
+
609
+ # DescribeTriple返回参数结构体
610
+ class DescribeTripleResponse < TencentCloud::Common::AbstractModel
611
+ # @param Content: 返回三元组信息
612
+ # @type Content: Array
613
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
614
+ # @type RequestId: String
615
+
616
+ attr_accessor :Content, :RequestId
617
+
618
+ def initialize(content=nil, requestid=nil)
619
+ @Content = content
620
+ @RequestId = requestid
621
+ end
622
+
623
+ def deserialize(params)
624
+ unless params['Content'].nil?
625
+ @Content = []
626
+ params['Content'].each do |i|
627
+ triplecontent_tmp = TripleContent.new
628
+ triplecontent_tmp.deserialize(i)
629
+ @Content << triplecontent_tmp
630
+ end
631
+ end
632
+ @RequestId = params['RequestId']
633
+ end
634
+ end
635
+
636
+ # DescribeWordItems请求参数结构体
637
+ class DescribeWordItemsRequest < TencentCloud::Common::AbstractModel
638
+ # @param DictId: 自定义词库ID。
639
+ # @type DictId: String
640
+ # @param Offset: 分页偏移量,从0开始,默认为0。
641
+ # @type Offset: Integer
642
+ # @param Limit: 每页数据量,范围为1~100,默认为10。
643
+ # @type Limit: Integer
644
+ # @param Text: 待检索的词条文本,支持模糊匹配。
645
+ # @type Text: String
646
+
647
+ attr_accessor :DictId, :Offset, :Limit, :Text
648
+
649
+ def initialize(dictid=nil, offset=nil, limit=nil, text=nil)
650
+ @DictId = dictid
651
+ @Offset = offset
652
+ @Limit = limit
653
+ @Text = text
654
+ end
655
+
656
+ def deserialize(params)
657
+ @DictId = params['DictId']
658
+ @Offset = params['Offset']
659
+ @Limit = params['Limit']
660
+ @Text = params['Text']
661
+ end
662
+ end
663
+
664
+ # DescribeWordItems返回参数结构体
665
+ class DescribeWordItemsResponse < TencentCloud::Common::AbstractModel
666
+ # @param TotalCount: 词条记录总条数。
667
+ # @type TotalCount: Integer
668
+ # @param WordItems: 词条信息列表。
669
+ # 注意:此字段可能返回 null,表示取不到有效值。
670
+ # @type WordItems: Array
671
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
672
+ # @type RequestId: String
673
+
674
+ attr_accessor :TotalCount, :WordItems, :RequestId
675
+
676
+ def initialize(totalcount=nil, worditems=nil, requestid=nil)
677
+ @TotalCount = totalcount
678
+ @WordItems = worditems
679
+ @RequestId = requestid
680
+ end
681
+
682
+ def deserialize(params)
683
+ @TotalCount = params['TotalCount']
684
+ unless params['WordItems'].nil?
685
+ @WordItems = []
686
+ params['WordItems'].each do |i|
687
+ worditem_tmp = WordItem.new
688
+ worditem_tmp.deserialize(i)
689
+ @WordItems << worditem_tmp
690
+ end
691
+ end
692
+ @RequestId = params['RequestId']
693
+ end
694
+ end
695
+
696
+ # 自定义词库信息
697
+ class DictInfo < TencentCloud::Common::AbstractModel
698
+ # @param Name: 自定义词库名称。
699
+ # @type Name: String
700
+ # @param Id: 自定义词库ID。
701
+ # @type Id: String
702
+ # @param Description: 自定义词库描述信息。
703
+ # 注意:此字段可能返回 null,表示取不到有效值。
704
+ # @type Description: String
705
+ # @param UpdateTime: 自定义词库修改时间,形式为:yyyy-mm-dd hh:mm:ss。
706
+ # 注意:此字段可能返回 null,表示取不到有效值。
707
+ # @type UpdateTime: String
708
+ # @param CreateTime: 自定义词库创建时间,形式为:yyyy-mm-dd hh:mm:ss。
709
+ # 注意:此字段可能返回 null,表示取不到有效值。
710
+ # @type CreateTime: String
711
+
712
+ attr_accessor :Name, :Id, :Description, :UpdateTime, :CreateTime
713
+
714
+ def initialize(name=nil, id=nil, description=nil, updatetime=nil, createtime=nil)
715
+ @Name = name
716
+ @Id = id
717
+ @Description = description
718
+ @UpdateTime = updatetime
719
+ @CreateTime = createtime
720
+ end
721
+
722
+ def deserialize(params)
723
+ @Name = params['Name']
724
+ @Id = params['Id']
725
+ @Description = params['Description']
726
+ @UpdateTime = params['UpdateTime']
727
+ @CreateTime = params['CreateTime']
728
+ end
729
+ end
730
+
731
+ # 句法依存分析结果,包括基础词,基础词的序号,当前词父节点的序号,句法依存关系的类型
732
+ class DpToken < TencentCloud::Common::AbstractModel
733
+ # @param Relation: 句法依存关系的类型
734
+ # 注意:此字段可能返回 null,表示取不到有效值。
735
+ # @type Relation: String
736
+ # @param HeadId: 当前词父节点的序号
737
+ # 注意:此字段可能返回 null,表示取不到有效值。
738
+ # @type HeadId: Integer
739
+ # @param Word: 基础词
740
+ # 注意:此字段可能返回 null,表示取不到有效值。
741
+ # @type Word: String
742
+ # @param Id: 基础词的序号
743
+ # 注意:此字段可能返回 null,表示取不到有效值。
744
+ # @type Id: Integer
745
+
746
+ attr_accessor :Relation, :HeadId, :Word, :Id
747
+
748
+ def initialize(relation=nil, headid=nil, word=nil, id=nil)
749
+ @Relation = relation
750
+ @HeadId = headid
751
+ @Word = word
752
+ @Id = id
753
+ end
754
+
755
+ def deserialize(params)
756
+ @Relation = params['Relation']
757
+ @HeadId = params['HeadId']
758
+ @Word = params['Word']
759
+ @Id = params['Id']
760
+ end
761
+ end
762
+
763
+ # 返回的实体关系查询结果详细内容
764
+ class EntityRelationContent < TencentCloud::Common::AbstractModel
765
+ # @param Object: 实体关系查询返回关系的object
766
+ # 注意:此字段可能返回 null,表示取不到有效值。
767
+ # @type Object: Array
768
+ # @param Relation: 实体关系查询返回的关系名称
769
+ # 注意:此字段可能返回 null,表示取不到有效值。
770
+ # @type Relation: String
771
+ # @param Subject: 实体关系查询返回关系的subject
772
+ # 注意:此字段可能返回 null,表示取不到有效值。
773
+ # @type Subject: Array
774
+
775
+ attr_accessor :Object, :Relation, :Subject
776
+
777
+ def initialize(object=nil, relation=nil, subject=nil)
778
+ @Object = object
779
+ @Relation = relation
780
+ @Subject = subject
781
+ end
782
+
783
+ def deserialize(params)
784
+ unless params['Object'].nil?
785
+ @Object = []
786
+ params['Object'].each do |i|
787
+ entityrelationobject_tmp = EntityRelationObject.new
788
+ entityrelationobject_tmp.deserialize(i)
789
+ @Object << entityrelationobject_tmp
790
+ end
791
+ end
792
+ @Relation = params['Relation']
793
+ unless params['Subject'].nil?
794
+ @Subject = []
795
+ params['Subject'].each do |i|
796
+ entityrelationsubject_tmp = EntityRelationSubject.new
797
+ entityrelationsubject_tmp.deserialize(i)
798
+ @Subject << entityrelationsubject_tmp
799
+ end
800
+ end
801
+ end
802
+ end
803
+
804
+ # 实体关系查询返回的Object类型
805
+ class EntityRelationObject < TencentCloud::Common::AbstractModel
806
+ # @param Popular: object对应popular值
807
+ # 注意:此字段可能返回 null,表示取不到有效值。
808
+ # @type Popular: Array
809
+ # @param Id: object对应id
810
+ # 注意:此字段可能返回 null,表示取不到有效值。
811
+ # @type Id: Array
812
+ # @param Name: object对应name
813
+ # 注意:此字段可能返回 null,表示取不到有效值。
814
+ # @type Name: Array
815
+
816
+ attr_accessor :Popular, :Id, :Name
817
+
818
+ def initialize(popular=nil, id=nil, name=nil)
819
+ @Popular = popular
820
+ @Id = id
821
+ @Name = name
822
+ end
823
+
824
+ def deserialize(params)
825
+ @Popular = params['Popular']
826
+ @Id = params['Id']
827
+ @Name = params['Name']
828
+ end
829
+ end
830
+
831
+ # 实体关系查询返回Subject
832
+ class EntityRelationSubject < TencentCloud::Common::AbstractModel
833
+ # @param Popular: Subject对应popular
834
+ # @type Popular: Array
835
+ # @param Id: Subject对应id
836
+ # @type Id: Array
837
+ # @param Name: Subject对应name
838
+ # @type Name: Array
839
+
840
+ attr_accessor :Popular, :Id, :Name
841
+
842
+ def initialize(popular=nil, id=nil, name=nil)
843
+ @Popular = popular
844
+ @Id = id
845
+ @Name = name
846
+ end
847
+
848
+ def deserialize(params)
849
+ @Popular = params['Popular']
850
+ @Id = params['Id']
851
+ @Name = params['Name']
852
+ end
853
+ end
854
+
855
+ # 关键词提取结果
856
+ class Keyword < TencentCloud::Common::AbstractModel
857
+ # @param Score: 权重
858
+ # @type Score: Float
859
+ # @param Word: 关键词
860
+ # @type Word: String
861
+
862
+ attr_accessor :Score, :Word
863
+
864
+ def initialize(score=nil, word=nil)
865
+ @Score = score
866
+ @Word = word
867
+ end
868
+
869
+ def deserialize(params)
870
+ @Score = params['Score']
871
+ @Word = params['Word']
872
+ end
873
+ end
874
+
875
+ # KeywordsExtraction请求参数结构体
876
+ class KeywordsExtractionRequest < TencentCloud::Common::AbstractModel
877
+ # @param Text: 待处理的文本(仅支持UTF-8格式,不超过10000字符)
878
+ # @type Text: String
879
+ # @param Num: 指定关键词个数上限(默认值为5)
880
+ # @type Num: Integer
881
+
882
+ attr_accessor :Text, :Num
883
+
884
+ def initialize(text=nil, num=nil)
885
+ @Text = text
886
+ @Num = num
887
+ end
888
+
889
+ def deserialize(params)
890
+ @Text = params['Text']
891
+ @Num = params['Num']
892
+ end
893
+ end
894
+
895
+ # KeywordsExtraction返回参数结构体
896
+ class KeywordsExtractionResponse < TencentCloud::Common::AbstractModel
897
+ # @param Keywords: 关键词提取结果
898
+ # 注意:此字段可能返回 null,表示取不到有效值。
899
+ # @type Keywords: Array
900
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
901
+ # @type RequestId: String
902
+
903
+ attr_accessor :Keywords, :RequestId
904
+
905
+ def initialize(keywords=nil, requestid=nil)
906
+ @Keywords = keywords
907
+ @RequestId = requestid
908
+ end
909
+
910
+ def deserialize(params)
911
+ unless params['Keywords'].nil?
912
+ @Keywords = []
913
+ params['Keywords'].each do |i|
914
+ keyword_tmp = Keyword.new
915
+ keyword_tmp.deserialize(i)
916
+ @Keywords << keyword_tmp
917
+ end
918
+ end
919
+ @RequestId = params['RequestId']
920
+ end
921
+ end
922
+
923
+ # LexicalAnalysis请求参数结构体
924
+ class LexicalAnalysisRequest < TencentCloud::Common::AbstractModel
925
+ # @param Text: 待分析的文本(仅支持UTF-8格式,不超过500字)
926
+ # @type Text: String
927
+ # @param DictId: 指定要加载的自定义词库ID。
928
+ # @type DictId: String
929
+ # @param Flag: 词法分析模式(默认取2值):
930
+ # 1、高精度(混合粒度分词能力);
931
+ # 2、高性能(单粒度分词能力);
932
+ # @type Flag: Integer
933
+
934
+ attr_accessor :Text, :DictId, :Flag
935
+
936
+ def initialize(text=nil, dictid=nil, flag=nil)
937
+ @Text = text
938
+ @DictId = dictid
939
+ @Flag = flag
940
+ end
941
+
942
+ def deserialize(params)
943
+ @Text = params['Text']
944
+ @DictId = params['DictId']
945
+ @Flag = params['Flag']
946
+ end
947
+ end
948
+
949
+ # LexicalAnalysis返回参数结构体
950
+ class LexicalAnalysisResponse < TencentCloud::Common::AbstractModel
951
+ # @param NerTokens: 命名实体识别结果。取值范围:
952
+ # <li>PER:表示人名,如刘德华、贝克汉姆</li>
953
+ # <li>LOC:表示地名,如北京、华山</li>
954
+ # <li>ORG:表示机构团体名,如腾讯、最高人民法院、人大附中</li>
955
+ # <li>PRODUCTION:表示产品名,如QQ、微信、iPhone</li>
956
+ # 注意:此字段可能返回 null,表示取不到有效值。
957
+ # @type NerTokens: Array
958
+ # @param PosTokens: 分词&词性标注结果(词性表请参见附录)
959
+ # @type PosTokens: Array
960
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
961
+ # @type RequestId: String
962
+
963
+ attr_accessor :NerTokens, :PosTokens, :RequestId
964
+
965
+ def initialize(nertokens=nil, postokens=nil, requestid=nil)
966
+ @NerTokens = nertokens
967
+ @PosTokens = postokens
968
+ @RequestId = requestid
969
+ end
970
+
971
+ def deserialize(params)
972
+ unless params['NerTokens'].nil?
973
+ @NerTokens = []
974
+ params['NerTokens'].each do |i|
975
+ nertoken_tmp = NerToken.new
976
+ nertoken_tmp.deserialize(i)
977
+ @NerTokens << nertoken_tmp
978
+ end
979
+ end
980
+ unless params['PosTokens'].nil?
981
+ @PosTokens = []
982
+ params['PosTokens'].each do |i|
983
+ postoken_tmp = PosToken.new
984
+ postoken_tmp.deserialize(i)
985
+ @PosTokens << postoken_tmp
986
+ end
987
+ end
988
+ @RequestId = params['RequestId']
989
+ end
990
+ end
991
+
992
+ # 命名实体识别结果
993
+ class NerToken < TencentCloud::Common::AbstractModel
994
+ # @param Word: 基础词
995
+ # @type Word: String
996
+ # @param Length: 长度
997
+ # @type Length: Integer
998
+ # @param BeginOffset: 起始位置
999
+ # @type BeginOffset: Integer
1000
+ # @param Type: 命名实体类型
1001
+ # @type Type: String
1002
+
1003
+ attr_accessor :Word, :Length, :BeginOffset, :Type
1004
+
1005
+ def initialize(word=nil, length=nil, beginoffset=nil, type=nil)
1006
+ @Word = word
1007
+ @Length = length
1008
+ @BeginOffset = beginoffset
1009
+ @Type = type
1010
+ end
1011
+
1012
+ def deserialize(params)
1013
+ @Word = params['Word']
1014
+ @Length = params['Length']
1015
+ @BeginOffset = params['BeginOffset']
1016
+ @Type = params['Type']
1017
+ end
1018
+ end
1019
+
1020
+ # 分词&词性标注结果
1021
+ class PosToken < TencentCloud::Common::AbstractModel
1022
+ # @param Word: 基础词
1023
+ # @type Word: String
1024
+ # @param Length: 长度
1025
+ # @type Length: Integer
1026
+ # @param BeginOffset: 起始位置
1027
+ # @type BeginOffset: Integer
1028
+ # @param Pos: 词性
1029
+ # @type Pos: String
1030
+
1031
+ attr_accessor :Word, :Length, :BeginOffset, :Pos
1032
+
1033
+ def initialize(word=nil, length=nil, beginoffset=nil, pos=nil)
1034
+ @Word = word
1035
+ @Length = length
1036
+ @BeginOffset = beginoffset
1037
+ @Pos = pos
1038
+ end
1039
+
1040
+ def deserialize(params)
1041
+ @Word = params['Word']
1042
+ @Length = params['Length']
1043
+ @BeginOffset = params['BeginOffset']
1044
+ @Pos = params['Pos']
1045
+ end
1046
+ end
1047
+
1048
+ # 词条搜索的结果,主要描述该词条是否存在以及相关的词性。
1049
+ class SearchResult < TencentCloud::Common::AbstractModel
1050
+ # @param Text: 被搜索的词条文本。
1051
+ # @type Text: String
1052
+ # @param IsExist: 0表示词条不存在,1表示存在。
1053
+ # @type IsExist: Integer
1054
+ # @param MatchText: 匹配到的词条文本。
1055
+ # 注意:此字段可能返回 null,表示取不到有效值。
1056
+ # @type MatchText: String
1057
+ # @param Pos: 词条的词性。
1058
+ # 注意:此字段可能返回 null,表示取不到有效值。
1059
+ # @type Pos: String
1060
+
1061
+ attr_accessor :Text, :IsExist, :MatchText, :Pos
1062
+
1063
+ def initialize(text=nil, isexist=nil, matchtext=nil, pos=nil)
1064
+ @Text = text
1065
+ @IsExist = isexist
1066
+ @MatchText = matchtext
1067
+ @Pos = pos
1068
+ end
1069
+
1070
+ def deserialize(params)
1071
+ @Text = params['Text']
1072
+ @IsExist = params['IsExist']
1073
+ @MatchText = params['MatchText']
1074
+ @Pos = params['Pos']
1075
+ end
1076
+ end
1077
+
1078
+ # SearchWordItems请求参数结构体
1079
+ class SearchWordItemsRequest < TencentCloud::Common::AbstractModel
1080
+ # @param DictId: 自定义词库ID。
1081
+ # @type DictId: String
1082
+ # @param WordItems: 待检索的词条集合。
1083
+ # @type WordItems: Array
1084
+
1085
+ attr_accessor :DictId, :WordItems
1086
+
1087
+ def initialize(dictid=nil, worditems=nil)
1088
+ @DictId = dictid
1089
+ @WordItems = worditems
1090
+ end
1091
+
1092
+ def deserialize(params)
1093
+ @DictId = params['DictId']
1094
+ unless params['WordItems'].nil?
1095
+ @WordItems = []
1096
+ params['WordItems'].each do |i|
1097
+ worditem_tmp = WordItem.new
1098
+ worditem_tmp.deserialize(i)
1099
+ @WordItems << worditem_tmp
1100
+ end
1101
+ end
1102
+ end
1103
+ end
1104
+
1105
+ # SearchWordItems返回参数结构体
1106
+ class SearchWordItemsResponse < TencentCloud::Common::AbstractModel
1107
+ # @param Results: 词条检索结果集合。
1108
+ # 注意:此字段可能返回 null,表示取不到有效值。
1109
+ # @type Results: Array
1110
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1111
+ # @type RequestId: String
1112
+
1113
+ attr_accessor :Results, :RequestId
1114
+
1115
+ def initialize(results=nil, requestid=nil)
1116
+ @Results = results
1117
+ @RequestId = requestid
1118
+ end
1119
+
1120
+ def deserialize(params)
1121
+ unless params['Results'].nil?
1122
+ @Results = []
1123
+ params['Results'].each do |i|
1124
+ searchresult_tmp = SearchResult.new
1125
+ searchresult_tmp.deserialize(i)
1126
+ @Results << searchresult_tmp
1127
+ end
1128
+ end
1129
+ @RequestId = params['RequestId']
1130
+ end
1131
+ end
1132
+
1133
+ # SentenceEmbedding请求参数结构体
1134
+ class SentenceEmbeddingRequest < TencentCloud::Common::AbstractModel
1135
+ # @param Text: 输入的文本(仅支持UTF-8格式,不超过500字)
1136
+ # @type Text: String
1137
+
1138
+ attr_accessor :Text
1139
+
1140
+ def initialize(text=nil)
1141
+ @Text = text
1142
+ end
1143
+
1144
+ def deserialize(params)
1145
+ @Text = params['Text']
1146
+ end
1147
+ end
1148
+
1149
+ # SentenceEmbedding返回参数结构体
1150
+ class SentenceEmbeddingResponse < TencentCloud::Common::AbstractModel
1151
+ # @param Vector: 句向量数组
1152
+ # @type Vector: Array
1153
+ # @param Dimension: 句向量的维度
1154
+ # @type Dimension: Integer
1155
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1156
+ # @type RequestId: String
1157
+
1158
+ attr_accessor :Vector, :Dimension, :RequestId
1159
+
1160
+ def initialize(vector=nil, dimension=nil, requestid=nil)
1161
+ @Vector = vector
1162
+ @Dimension = dimension
1163
+ @RequestId = requestid
1164
+ end
1165
+
1166
+ def deserialize(params)
1167
+ @Vector = params['Vector']
1168
+ @Dimension = params['Dimension']
1169
+ @RequestId = params['RequestId']
1170
+ end
1171
+ end
1172
+
1173
+ # SentimentAnalysis请求参数结构体
1174
+ class SentimentAnalysisRequest < TencentCloud::Common::AbstractModel
1175
+ # @param Text: 待分析的文本(仅支持UTF-8格式,不超过200字)
1176
+ # @type Text: String
1177
+ # @param Flag: 待分析文本所属的类型,仅当输入参数Mode取值为2class时有效(默认取4值):
1178
+ # 1、商品评论类
1179
+ # 2、社交类
1180
+ # 3、美食酒店类
1181
+ # 4、通用领域类
1182
+ # @type Flag: Integer
1183
+ # @param Mode: 情感分类模式选项,可取2class或3class(默认值为2class)
1184
+ # 1、2class:返回正负面二分类情感结果
1185
+ # 2、3class:返回正负面及中性三分类情感结果
1186
+ # @type Mode: String
1187
+
1188
+ attr_accessor :Text, :Flag, :Mode
1189
+
1190
+ def initialize(text=nil, flag=nil, mode=nil)
1191
+ @Text = text
1192
+ @Flag = flag
1193
+ @Mode = mode
1194
+ end
1195
+
1196
+ def deserialize(params)
1197
+ @Text = params['Text']
1198
+ @Flag = params['Flag']
1199
+ @Mode = params['Mode']
1200
+ end
1201
+ end
1202
+
1203
+ # SentimentAnalysis返回参数结构体
1204
+ class SentimentAnalysisResponse < TencentCloud::Common::AbstractModel
1205
+ # @param Positive: 正面情感概率
1206
+ # @type Positive: Float
1207
+ # @param Neutral: 中性情感概率,当输入参数Mode取值为3class时有效,否则值为空
1208
+ # 注意:此字段可能返回 null,表示取不到有效值。
1209
+ # @type Neutral: Float
1210
+ # @param Negative: 负面情感概率
1211
+ # @type Negative: Float
1212
+ # @param Sentiment: 情感分类结果:
1213
+ # 1、positive,表示正面情感
1214
+ # 2、negative,表示负面情感
1215
+ # 3、neutral,表示中性、无情感
1216
+ # @type Sentiment: String
1217
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1218
+ # @type RequestId: String
1219
+
1220
+ attr_accessor :Positive, :Neutral, :Negative, :Sentiment, :RequestId
1221
+
1222
+ def initialize(positive=nil, neutral=nil, negative=nil, sentiment=nil, requestid=nil)
1223
+ @Positive = positive
1224
+ @Neutral = neutral
1225
+ @Negative = negative
1226
+ @Sentiment = sentiment
1227
+ @RequestId = requestid
1228
+ end
1229
+
1230
+ def deserialize(params)
1231
+ @Positive = params['Positive']
1232
+ @Neutral = params['Neutral']
1233
+ @Negative = params['Negative']
1234
+ @Sentiment = params['Sentiment']
1235
+ @RequestId = params['RequestId']
1236
+ end
1237
+ end
1238
+
1239
+ # SimilarWords请求参数结构体
1240
+ class SimilarWordsRequest < TencentCloud::Common::AbstractModel
1241
+ # @param Text: 输入的词语(仅支持UTF-8格式,不超过20字)
1242
+ # @type Text: String
1243
+ # @param WordNumber: 相似词个数;取值范围:1-200,默认为10;
1244
+ # @type WordNumber: Integer
1245
+
1246
+ attr_accessor :Text, :WordNumber
1247
+
1248
+ def initialize(text=nil, wordnumber=nil)
1249
+ @Text = text
1250
+ @WordNumber = wordnumber
1251
+ end
1252
+
1253
+ def deserialize(params)
1254
+ @Text = params['Text']
1255
+ @WordNumber = params['WordNumber']
1256
+ end
1257
+ end
1258
+
1259
+ # SimilarWords返回参数结构体
1260
+ class SimilarWordsResponse < TencentCloud::Common::AbstractModel
1261
+ # @param SimilarWords: 相似词数组
1262
+ # @type SimilarWords: Array
1263
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1264
+ # @type RequestId: String
1265
+
1266
+ attr_accessor :SimilarWords, :RequestId
1267
+
1268
+ def initialize(similarwords=nil, requestid=nil)
1269
+ @SimilarWords = similarwords
1270
+ @RequestId = requestid
1271
+ end
1272
+
1273
+ def deserialize(params)
1274
+ @SimilarWords = params['SimilarWords']
1275
+ @RequestId = params['RequestId']
1276
+ end
1277
+ end
1278
+
1279
+ # 文本相似度
1280
+ class Similarity < TencentCloud::Common::AbstractModel
1281
+ # @param Text: 目标文本句子
1282
+ # @type Text: String
1283
+ # @param Score: 相似度分数
1284
+ # @type Score: Float
1285
+
1286
+ attr_accessor :Text, :Score
1287
+
1288
+ def initialize(text=nil, score=nil)
1289
+ @Text = text
1290
+ @Score = score
1291
+ end
1292
+
1293
+ def deserialize(params)
1294
+ @Text = params['Text']
1295
+ @Score = params['Score']
1296
+ end
1297
+ end
1298
+
1299
+ # TextClassification请求参数结构体
1300
+ class TextClassificationRequest < TencentCloud::Common::AbstractModel
1301
+ # @param Text: 待分类的文本(仅支持UTF-8格式,不超过10000字)
1302
+ # @type Text: String
1303
+ # @param Flag: 领域分类体系(默认取1值):
1304
+ # 1、通用领域,二分类
1305
+ # 2、新闻领域,五分类。类别数据不一定全部返回,详情见类目映射表
1306
+ # @type Flag: Integer
1307
+
1308
+ attr_accessor :Text, :Flag
1309
+
1310
+ def initialize(text=nil, flag=nil)
1311
+ @Text = text
1312
+ @Flag = flag
1313
+ end
1314
+
1315
+ def deserialize(params)
1316
+ @Text = params['Text']
1317
+ @Flag = params['Flag']
1318
+ end
1319
+ end
1320
+
1321
+ # TextClassification返回参数结构体
1322
+ class TextClassificationResponse < TencentCloud::Common::AbstractModel
1323
+ # @param Classes: 文本分类结果(文本分类映射表请参见附录)
1324
+ # @type Classes: Array
1325
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1326
+ # @type RequestId: String
1327
+
1328
+ attr_accessor :Classes, :RequestId
1329
+
1330
+ def initialize(classes=nil, requestid=nil)
1331
+ @Classes = classes
1332
+ @RequestId = requestid
1333
+ end
1334
+
1335
+ def deserialize(params)
1336
+ unless params['Classes'].nil?
1337
+ @Classes = []
1338
+ params['Classes'].each do |i|
1339
+ classificationresult_tmp = ClassificationResult.new
1340
+ classificationresult_tmp.deserialize(i)
1341
+ @Classes << classificationresult_tmp
1342
+ end
1343
+ end
1344
+ @RequestId = params['RequestId']
1345
+ end
1346
+ end
1347
+
1348
+ # TextCorrection请求参数结构体
1349
+ class TextCorrectionRequest < TencentCloud::Common::AbstractModel
1350
+ # @param Text: 待纠错的文本(仅支持UTF-8格式,不超过2000字符)
1351
+ # @type Text: String
1352
+
1353
+ attr_accessor :Text
1354
+
1355
+ def initialize(text=nil)
1356
+ @Text = text
1357
+ end
1358
+
1359
+ def deserialize(params)
1360
+ @Text = params['Text']
1361
+ end
1362
+ end
1363
+
1364
+ # TextCorrection返回参数结构体
1365
+ class TextCorrectionResponse < TencentCloud::Common::AbstractModel
1366
+ # @param CCITokens: 纠错详情
1367
+ # 注意:此字段可能返回 null,表示取不到有效值。
1368
+ # @type CCITokens: Array
1369
+ # @param ResultText: 纠错后的文本
1370
+ # @type ResultText: String
1371
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1372
+ # @type RequestId: String
1373
+
1374
+ attr_accessor :CCITokens, :ResultText, :RequestId
1375
+
1376
+ def initialize(ccitokens=nil, resulttext=nil, requestid=nil)
1377
+ @CCITokens = ccitokens
1378
+ @ResultText = resulttext
1379
+ @RequestId = requestid
1380
+ end
1381
+
1382
+ def deserialize(params)
1383
+ unless params['CCITokens'].nil?
1384
+ @CCITokens = []
1385
+ params['CCITokens'].each do |i|
1386
+ ccitoken_tmp = CCIToken.new
1387
+ ccitoken_tmp.deserialize(i)
1388
+ @CCITokens << ccitoken_tmp
1389
+ end
1390
+ end
1391
+ @ResultText = params['ResultText']
1392
+ @RequestId = params['RequestId']
1393
+ end
1394
+ end
1395
+
1396
+ # TextSimilarity请求参数结构体
1397
+ class TextSimilarityRequest < TencentCloud::Common::AbstractModel
1398
+ # @param SrcText: 需要与目标句子计算相似度的源句子(仅支持UTF-8格式,不超过500字符)
1399
+ # @type SrcText: String
1400
+ # @param TargetText: 目标句子(以句子数量为单位消耗资源包)
1401
+ # @type TargetText: Array
1402
+
1403
+ attr_accessor :SrcText, :TargetText
1404
+
1405
+ def initialize(srctext=nil, targettext=nil)
1406
+ @SrcText = srctext
1407
+ @TargetText = targettext
1408
+ end
1409
+
1410
+ def deserialize(params)
1411
+ @SrcText = params['SrcText']
1412
+ @TargetText = params['TargetText']
1413
+ end
1414
+ end
1415
+
1416
+ # TextSimilarity返回参数结构体
1417
+ class TextSimilarityResponse < TencentCloud::Common::AbstractModel
1418
+ # @param Similarity: 每个目标句子与源句子的相似度分值,按照分值降序排列
1419
+ # @type Similarity: Array
1420
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1421
+ # @type RequestId: String
1422
+
1423
+ attr_accessor :Similarity, :RequestId
1424
+
1425
+ def initialize(similarity=nil, requestid=nil)
1426
+ @Similarity = similarity
1427
+ @RequestId = requestid
1428
+ end
1429
+
1430
+ def deserialize(params)
1431
+ unless params['Similarity'].nil?
1432
+ @Similarity = []
1433
+ params['Similarity'].each do |i|
1434
+ similarity_tmp = Similarity.new
1435
+ similarity_tmp.deserialize(i)
1436
+ @Similarity << similarity_tmp
1437
+ end
1438
+ end
1439
+ @RequestId = params['RequestId']
1440
+ end
1441
+ end
1442
+
1443
+ # 三元组查询返回的元记录
1444
+ class TripleContent < TencentCloud::Common::AbstractModel
1445
+ # @param Popular: 实体流行度
1446
+ # 注意:此字段可能返回 null,表示取不到有效值。
1447
+ # @type Popular: Integer
1448
+ # @param Name: 实体名称
1449
+ # 注意:此字段可能返回 null,表示取不到有效值。
1450
+ # @type Name: String
1451
+ # @param Order: 实体order
1452
+ # 注意:此字段可能返回 null,表示取不到有效值。
1453
+ # @type Order: Integer
1454
+ # @param Id: 实体id
1455
+ # 注意:此字段可能返回 null,表示取不到有效值。
1456
+ # @type Id: String
1457
+
1458
+ attr_accessor :Popular, :Name, :Order, :Id
1459
+
1460
+ def initialize(popular=nil, name=nil, order=nil, id=nil)
1461
+ @Popular = popular
1462
+ @Name = name
1463
+ @Order = order
1464
+ @Id = id
1465
+ end
1466
+
1467
+ def deserialize(params)
1468
+ @Popular = params['Popular']
1469
+ @Name = params['Name']
1470
+ @Order = params['Order']
1471
+ @Id = params['Id']
1472
+ end
1473
+ end
1474
+
1475
+ # UpdateDict请求参数结构体
1476
+ class UpdateDictRequest < TencentCloud::Common::AbstractModel
1477
+ # @param DictId: 自定义词库ID。
1478
+ # @type DictId: String
1479
+ # @param Description: 词库描述,不超过100字。
1480
+ # @type Description: String
1481
+ # @param Name: 词库名称,不超过20字。
1482
+ # @type Name: String
1483
+
1484
+ attr_accessor :DictId, :Description, :Name
1485
+
1486
+ def initialize(dictid=nil, description=nil, name=nil)
1487
+ @DictId = dictid
1488
+ @Description = description
1489
+ @Name = name
1490
+ end
1491
+
1492
+ def deserialize(params)
1493
+ @DictId = params['DictId']
1494
+ @Description = params['Description']
1495
+ @Name = params['Name']
1496
+ end
1497
+ end
1498
+
1499
+ # UpdateDict返回参数结构体
1500
+ class UpdateDictResponse < TencentCloud::Common::AbstractModel
1501
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1502
+ # @type RequestId: String
1503
+
1504
+ attr_accessor :RequestId
1505
+
1506
+ def initialize(requestid=nil)
1507
+ @RequestId = requestid
1508
+ end
1509
+
1510
+ def deserialize(params)
1511
+ @RequestId = params['RequestId']
1512
+ end
1513
+ end
1514
+
1515
+ # WordEmbedding请求参数结构体
1516
+ class WordEmbeddingRequest < TencentCloud::Common::AbstractModel
1517
+ # @param Text: 输入的词语(仅支持UTF-8格式,不超过20字)
1518
+ # @type Text: String
1519
+
1520
+ attr_accessor :Text
1521
+
1522
+ def initialize(text=nil)
1523
+ @Text = text
1524
+ end
1525
+
1526
+ def deserialize(params)
1527
+ @Text = params['Text']
1528
+ end
1529
+ end
1530
+
1531
+ # WordEmbedding返回参数结构体
1532
+ class WordEmbeddingResponse < TencentCloud::Common::AbstractModel
1533
+ # @param Vector: 词向量数组
1534
+ # @type Vector: Array
1535
+ # @param Dimension: 词向量的维度
1536
+ # @type Dimension: Integer
1537
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1538
+ # @type RequestId: String
1539
+
1540
+ attr_accessor :Vector, :Dimension, :RequestId
1541
+
1542
+ def initialize(vector=nil, dimension=nil, requestid=nil)
1543
+ @Vector = vector
1544
+ @Dimension = dimension
1545
+ @RequestId = requestid
1546
+ end
1547
+
1548
+ def deserialize(params)
1549
+ @Vector = params['Vector']
1550
+ @Dimension = params['Dimension']
1551
+ @RequestId = params['RequestId']
1552
+ end
1553
+ end
1554
+
1555
+ # 词条信息。
1556
+ class WordItem < TencentCloud::Common::AbstractModel
1557
+ # @param Text: 词条文本内容。
1558
+ # @type Text: String
1559
+ # @param CreateTime: 词条创建时间。
1560
+ # @type CreateTime: String
1561
+ # @param Pos: 词条的词性。
1562
+ # 注意:此字段可能返回 null,表示取不到有效值。
1563
+ # @type Pos: String
1564
+
1565
+ attr_accessor :Text, :CreateTime, :Pos
1566
+
1567
+ def initialize(text=nil, createtime=nil, pos=nil)
1568
+ @Text = text
1569
+ @CreateTime = createtime
1570
+ @Pos = pos
1571
+ end
1572
+
1573
+ def deserialize(params)
1574
+ @Text = params['Text']
1575
+ @CreateTime = params['CreateTime']
1576
+ @Pos = params['Pos']
1577
+ end
1578
+ end
1579
+
1580
+ # WordSimilarity请求参数结构体
1581
+ class WordSimilarityRequest < TencentCloud::Common::AbstractModel
1582
+ # @param SrcWord: 计算相似度的源词(仅支持UTF-8格式,不超过20字)
1583
+ # @type SrcWord: String
1584
+ # @param TargetWord: 计算相似度的目标词(仅支持UTF-8格式,不超过20字)
1585
+ # @type TargetWord: String
1586
+
1587
+ attr_accessor :SrcWord, :TargetWord
1588
+
1589
+ def initialize(srcword=nil, targetword=nil)
1590
+ @SrcWord = srcword
1591
+ @TargetWord = targetword
1592
+ end
1593
+
1594
+ def deserialize(params)
1595
+ @SrcWord = params['SrcWord']
1596
+ @TargetWord = params['TargetWord']
1597
+ end
1598
+ end
1599
+
1600
+ # WordSimilarity返回参数结构体
1601
+ class WordSimilarityResponse < TencentCloud::Common::AbstractModel
1602
+ # @param Similarity: 两个词语的相似度
1603
+ # @type Similarity: Float
1604
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1605
+ # @type RequestId: String
1606
+
1607
+ attr_accessor :Similarity, :RequestId
1608
+
1609
+ def initialize(similarity=nil, requestid=nil)
1610
+ @Similarity = similarity
1611
+ @RequestId = requestid
1612
+ end
1613
+
1614
+ def deserialize(params)
1615
+ @Similarity = params['Similarity']
1616
+ @RequestId = params['RequestId']
1617
+ end
1618
+ end
1619
+
1620
+ end
1621
+ end
1622
+ end
1623
+