tencentcloud-sdk-nlp 3.0.624 → 3.0.626

Sign up to get free protection for your applications and to get access to all the features.
@@ -68,47 +68,6 @@ module TencentCloud
68
68
  end
69
69
  end
70
70
 
71
- # AutoSummarization请求参数结构体
72
- class AutoSummarizationRequest < TencentCloud::Common::AbstractModel
73
- # @param Text: 待处理的文本(仅支持UTF-8格式,不超过2000字)
74
- # @type Text: String
75
- # @param Length: 指定摘要的长度上限(默认值为200)
76
- # 注:为保证摘要的可读性,最终生成的摘要长度会低于指定的长度上限。
77
- # @type Length: Integer
78
-
79
- attr_accessor :Text, :Length
80
-
81
- def initialize(text=nil, length=nil)
82
- @Text = text
83
- @Length = length
84
- end
85
-
86
- def deserialize(params)
87
- @Text = params['Text']
88
- @Length = params['Length']
89
- end
90
- end
91
-
92
- # AutoSummarization返回参数结构体
93
- class AutoSummarizationResponse < TencentCloud::Common::AbstractModel
94
- # @param Summary: 文本摘要结果
95
- # @type Summary: String
96
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
97
- # @type RequestId: String
98
-
99
- attr_accessor :Summary, :RequestId
100
-
101
- def initialize(summary=nil, requestid=nil)
102
- @Summary = summary
103
- @RequestId = requestid
104
- end
105
-
106
- def deserialize(params)
107
- @Summary = params['Summary']
108
- @RequestId = params['RequestId']
109
- end
110
- end
111
-
112
71
  # 基础粒度分词和词性标注的结果
113
72
  class BasicParticiple < TencentCloud::Common::AbstractModel
114
73
  # @param Word: 基础词。
@@ -137,30 +96,6 @@ module TencentCloud
137
96
  end
138
97
  end
139
98
 
140
- # 文本纠错结果
141
- class CCIToken < TencentCloud::Common::AbstractModel
142
- # @param Word: 错别字内容
143
- # @type Word: String
144
- # @param BeginOffset: 错别字的起始位置,从0开始
145
- # @type BeginOffset: Integer
146
- # @param CorrectWord: 错别字纠错结果
147
- # @type CorrectWord: String
148
-
149
- attr_accessor :Word, :BeginOffset, :CorrectWord
150
-
151
- def initialize(word=nil, beginoffset=nil, correctword=nil)
152
- @Word = word
153
- @BeginOffset = beginoffset
154
- @CorrectWord = correctword
155
- end
156
-
157
- def deserialize(params)
158
- @Word = params['Word']
159
- @BeginOffset = params['BeginOffset']
160
- @CorrectWord = params['CorrectWord']
161
- end
162
- end
163
-
164
99
  # 分类详细信息
165
100
  class Category < TencentCloud::Common::AbstractModel
166
101
  # @param Id: 分类id。
@@ -193,106 +128,6 @@ module TencentCloud
193
128
  end
194
129
  end
195
130
 
196
- # ChatBot请求参数结构体
197
- class ChatBotRequest < TencentCloud::Common::AbstractModel
198
- # @param Query: 用户请求的query
199
- # @type Query: String
200
- # @param OpenId: 服务的id, 主要用于儿童闲聊接口,比如手Q的openid
201
- # @type OpenId: String
202
- # @param Flag: 0: 通用闲聊, 1:儿童闲聊, 默认是通用闲聊
203
- # @type Flag: Integer
204
-
205
- attr_accessor :Query, :OpenId, :Flag
206
-
207
- def initialize(query=nil, openid=nil, flag=nil)
208
- @Query = query
209
- @OpenId = openid
210
- @Flag = flag
211
- end
212
-
213
- def deserialize(params)
214
- @Query = params['Query']
215
- @OpenId = params['OpenId']
216
- @Flag = params['Flag']
217
- end
218
- end
219
-
220
- # ChatBot返回参数结构体
221
- class ChatBotResponse < TencentCloud::Common::AbstractModel
222
- # @param Reply: 闲聊回复
223
- # @type Reply: String
224
- # @param Confidence: 对于当前输出回复的自信度
225
- # @type Confidence: Float
226
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
227
- # @type RequestId: String
228
-
229
- attr_accessor :Reply, :Confidence, :RequestId
230
-
231
- def initialize(reply=nil, confidence=nil, requestid=nil)
232
- @Reply = reply
233
- @Confidence = confidence
234
- @RequestId = requestid
235
- end
236
-
237
- def deserialize(params)
238
- @Reply = params['Reply']
239
- @Confidence = params['Confidence']
240
- @RequestId = params['RequestId']
241
- end
242
- end
243
-
244
- # 文本分类结果
245
- class ClassificationResult < TencentCloud::Common::AbstractModel
246
- # @param FirstClassName: 一级分类名称
247
- # @type FirstClassName: String
248
- # @param SecondClassName: 二级分类名称
249
- # @type SecondClassName: String
250
- # @param FirstClassProbability: 一级分类概率
251
- # @type FirstClassProbability: Float
252
- # @param SecondClassProbability: 二级分类概率
253
- # @type SecondClassProbability: Float
254
- # @param ThirdClassName: 三级分类名称,仅有当新闻领域五分类可能出现,详情见文本分类文档
255
- # @type ThirdClassName: String
256
- # @param ThirdClassProbability: 三级分类概率,仅有当新闻领域五分类可能出现,详情见文本分类文档
257
- # @type ThirdClassProbability: Float
258
- # @param FourthClassName: 四级分类名称,仅有当新闻领域五分类可能出现,详情见文本分类文档
259
- # @type FourthClassName: String
260
- # @param FourthClassProbability: 四级分类概率,仅有当新闻领域五分类可能出现,详情见文本分类文档
261
- # @type FourthClassProbability: Float
262
- # @param FifthClassName: 五级分类名称,仅有当新闻领域五分类可能出现,详情见文本分类文档
263
- # @type FifthClassName: String
264
- # @param FifthClassProbability: 五级分类概率,仅有当新闻领域五分类可能出现,详情见文本分类文档
265
- # @type FifthClassProbability: Float
266
-
267
- attr_accessor :FirstClassName, :SecondClassName, :FirstClassProbability, :SecondClassProbability, :ThirdClassName, :ThirdClassProbability, :FourthClassName, :FourthClassProbability, :FifthClassName, :FifthClassProbability
268
-
269
- def initialize(firstclassname=nil, secondclassname=nil, firstclassprobability=nil, secondclassprobability=nil, thirdclassname=nil, thirdclassprobability=nil, fourthclassname=nil, fourthclassprobability=nil, fifthclassname=nil, fifthclassprobability=nil)
270
- @FirstClassName = firstclassname
271
- @SecondClassName = secondclassname
272
- @FirstClassProbability = firstclassprobability
273
- @SecondClassProbability = secondclassprobability
274
- @ThirdClassName = thirdclassname
275
- @ThirdClassProbability = thirdclassprobability
276
- @FourthClassName = fourthclassname
277
- @FourthClassProbability = fourthclassprobability
278
- @FifthClassName = fifthclassname
279
- @FifthClassProbability = fifthclassprobability
280
- end
281
-
282
- def deserialize(params)
283
- @FirstClassName = params['FirstClassName']
284
- @SecondClassName = params['SecondClassName']
285
- @FirstClassProbability = params['FirstClassProbability']
286
- @SecondClassProbability = params['SecondClassProbability']
287
- @ThirdClassName = params['ThirdClassName']
288
- @ThirdClassProbability = params['ThirdClassProbability']
289
- @FourthClassName = params['FourthClassName']
290
- @FourthClassProbability = params['FourthClassProbability']
291
- @FifthClassName = params['FifthClassName']
292
- @FifthClassProbability = params['FifthClassProbability']
293
- end
294
- end
295
-
296
131
  # ClassifyContent请求参数结构体
297
132
  class ClassifyContentRequest < TencentCloud::Common::AbstractModel
298
133
  # @param Title: 待分类的文章的标题(仅支持UTF-8格式,不超过100字符)。
@@ -526,1510 +361,390 @@ module TencentCloud
526
361
  end
527
362
  end
528
363
 
529
- # CreateDict请求参数结构体
530
- class CreateDictRequest < TencentCloud::Common::AbstractModel
531
- # @param Name: 自定义词库名称,不超过20字。
532
- # @type Name: String
533
- # @param Description: 自定义词库描述,不超过100字。
534
- # @type Description: String
364
+ # 文本润色结果
365
+ class Embellish < TencentCloud::Common::AbstractModel
366
+ # @param Text: 润色后的文本。
367
+ # 注意:此字段可能返回 null,表示取不到有效值。
368
+ # @type Text: String
369
+ # @param EmbellishType: 润色类型。类型如下:
370
+ # expansion:扩写
371
+ # rewriting:改写
372
+ # translation_m2a:从现代文改写为古文
373
+ # translation_a2m:从古文改写为现代文
535
374
 
536
- attr_accessor :Name, :Description
537
375
 
538
- def initialize(name=nil, description=nil)
539
- @Name = name
540
- @Description = description
376
+ # 注意:此字段可能返回 null,表示取不到有效值。
377
+ # @type EmbellishType: String
378
+
379
+ attr_accessor :Text, :EmbellishType
380
+
381
+ def initialize(text=nil, embellishtype=nil)
382
+ @Text = text
383
+ @EmbellishType = embellishtype
541
384
  end
542
385
 
543
386
  def deserialize(params)
544
- @Name = params['Name']
545
- @Description = params['Description']
387
+ @Text = params['Text']
388
+ @EmbellishType = params['EmbellishType']
546
389
  end
547
390
  end
548
391
 
549
- # CreateDict返回参数结构体
550
- class CreateDictResponse < TencentCloud::Common::AbstractModel
551
- # @param DictId: 创建的自定义词库ID。
552
- # 注意:此字段可能返回 null,表示取不到有效值。
553
- # @type DictId: String
554
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
555
- # @type RequestId: String
392
+ # 实体识别结果。
393
+ class Entity < TencentCloud::Common::AbstractModel
394
+ # @param Word: 基础词。
395
+ # @type Word: String
396
+ # @param BeginOffset: 基础词在NormalText中的起始位置。
397
+ # @type BeginOffset: Integer
398
+ # @param Length: 基础词的长度。
399
+ # @type Length: Integer
400
+ # @param Type: 实体类型的标准名字。
401
+ # @type Type: String
402
+ # @param Name: 类型名字的自然语言表达。(中文或英文)
403
+ # @type Name: String
556
404
 
557
- attr_accessor :DictId, :RequestId
405
+ attr_accessor :Word, :BeginOffset, :Length, :Type, :Name
558
406
 
559
- def initialize(dictid=nil, requestid=nil)
560
- @DictId = dictid
561
- @RequestId = requestid
407
+ def initialize(word=nil, beginoffset=nil, length=nil, type=nil, name=nil)
408
+ @Word = word
409
+ @BeginOffset = beginoffset
410
+ @Length = length
411
+ @Type = type
412
+ @Name = name
562
413
  end
563
414
 
564
415
  def deserialize(params)
565
- @DictId = params['DictId']
566
- @RequestId = params['RequestId']
416
+ @Word = params['Word']
417
+ @BeginOffset = params['BeginOffset']
418
+ @Length = params['Length']
419
+ @Type = params['Type']
420
+ @Name = params['Name']
567
421
  end
568
422
  end
569
423
 
570
- # CreateWordItems请求参数结构体
571
- class CreateWordItemsRequest < TencentCloud::Common::AbstractModel
572
- # @param DictId: 自定义词库ID。
573
- # @type DictId: String
574
- # @param WordItems: 待添加的词条集合。
575
- # @type WordItems: Array
424
+ # EvaluateSentenceSimilarity请求参数结构体
425
+ class EvaluateSentenceSimilarityRequest < TencentCloud::Common::AbstractModel
426
+ # @param SentencePairList: 待分析的句子对数组。句子对应不超过1对,仅支持中文文本,原句子与目标句子均应不超过500字符。
427
+ # @type SentencePairList: Array
576
428
 
577
- attr_accessor :DictId, :WordItems
429
+ attr_accessor :SentencePairList
578
430
 
579
- def initialize(dictid=nil, worditems=nil)
580
- @DictId = dictid
581
- @WordItems = worditems
431
+ def initialize(sentencepairlist=nil)
432
+ @SentencePairList = sentencepairlist
582
433
  end
583
434
 
584
435
  def deserialize(params)
585
- @DictId = params['DictId']
586
- unless params['WordItems'].nil?
587
- @WordItems = []
588
- params['WordItems'].each do |i|
589
- worditem_tmp = WordItem.new
590
- worditem_tmp.deserialize(i)
591
- @WordItems << worditem_tmp
436
+ unless params['SentencePairList'].nil?
437
+ @SentencePairList = []
438
+ params['SentencePairList'].each do |i|
439
+ sentencepair_tmp = SentencePair.new
440
+ sentencepair_tmp.deserialize(i)
441
+ @SentencePairList << sentencepair_tmp
592
442
  end
593
443
  end
594
444
  end
595
445
  end
596
446
 
597
- # CreateWordItems返回参数结构体
598
- class CreateWordItemsResponse < TencentCloud::Common::AbstractModel
447
+ # EvaluateSentenceSimilarity返回参数结构体
448
+ class EvaluateSentenceSimilarityResponse < TencentCloud::Common::AbstractModel
449
+ # @param ScoreList: 每个句子对的相似度分值。
450
+ # @type ScoreList: Array
599
451
  # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
600
452
  # @type RequestId: String
601
453
 
602
- attr_accessor :RequestId
454
+ attr_accessor :ScoreList, :RequestId
603
455
 
604
- def initialize(requestid=nil)
456
+ def initialize(scorelist=nil, requestid=nil)
457
+ @ScoreList = scorelist
605
458
  @RequestId = requestid
606
459
  end
607
460
 
608
461
  def deserialize(params)
462
+ @ScoreList = params['ScoreList']
609
463
  @RequestId = params['RequestId']
610
464
  end
611
465
  end
612
466
 
613
- # DeleteDict请求参数结构体
614
- class DeleteDictRequest < TencentCloud::Common::AbstractModel
615
- # @param DictId: 要删除的自定义词库ID。
616
- # @type DictId: String
467
+ # EvaluateWordSimilarity请求参数结构体
468
+ class EvaluateWordSimilarityRequest < TencentCloud::Common::AbstractModel
469
+ # @param SourceWord: 计算相似度的源词。(仅支持UTF-8格式,不超过10字符)
470
+ # @type SourceWord: String
471
+ # @param TargetWord: 计算相似度的目标词。(仅支持UTF-8格式,不超过10字符)
472
+ # @type TargetWord: String
617
473
 
618
- attr_accessor :DictId
474
+ attr_accessor :SourceWord, :TargetWord
619
475
 
620
- def initialize(dictid=nil)
621
- @DictId = dictid
476
+ def initialize(sourceword=nil, targetword=nil)
477
+ @SourceWord = sourceword
478
+ @TargetWord = targetword
622
479
  end
623
480
 
624
481
  def deserialize(params)
625
- @DictId = params['DictId']
482
+ @SourceWord = params['SourceWord']
483
+ @TargetWord = params['TargetWord']
626
484
  end
627
485
  end
628
486
 
629
- # DeleteDict返回参数结构体
630
- class DeleteDictResponse < TencentCloud::Common::AbstractModel
487
+ # EvaluateWordSimilarity返回参数结构体
488
+ class EvaluateWordSimilarityResponse < TencentCloud::Common::AbstractModel
489
+ # @param Similarity: 词相似度分值。
490
+ # @type Similarity: Float
631
491
  # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
632
492
  # @type RequestId: String
633
493
 
634
- attr_accessor :RequestId
494
+ attr_accessor :Similarity, :RequestId
635
495
 
636
- def initialize(requestid=nil)
496
+ def initialize(similarity=nil, requestid=nil)
497
+ @Similarity = similarity
637
498
  @RequestId = requestid
638
499
  end
639
500
 
640
501
  def deserialize(params)
502
+ @Similarity = params['Similarity']
641
503
  @RequestId = params['RequestId']
642
504
  end
643
505
  end
644
506
 
645
- # DeleteWordItems请求参数结构体
646
- class DeleteWordItemsRequest < TencentCloud::Common::AbstractModel
647
- # @param DictId: 自定义词库ID。
648
- # @type DictId: String
649
- # @param WordItems: 待删除的词条集合。
650
- # @type WordItems: Array
507
+ # GenerateKeywordSentence请求参数结构体
508
+ class GenerateKeywordSentenceRequest < TencentCloud::Common::AbstractModel
509
+ # @param WordList: 生成句子的关键词,关键词个数需不超过4个,中文关键词长度应不超过10字符,英文关键词长度不超过3个单词。关键词中不可包含标点符号。
510
+ # @type WordList: Array
511
+ # @param Number: 返回生成句子的个数。数量需>=1且<=5。
512
+ # (注意实际结果可能小于指定个数)
513
+ # @type Number: Integer
514
+ # @param Domain: 指定生成句子的领域,支持领域如下:
515
+ # general:通用领域,支持中英文
516
+ # academic:学术领域,仅支持英文
517
+ # 默认为general(通用领域)。
518
+ # @type Domain: String
651
519
 
652
- attr_accessor :DictId, :WordItems
520
+ attr_accessor :WordList, :Number, :Domain
653
521
 
654
- def initialize(dictid=nil, worditems=nil)
655
- @DictId = dictid
656
- @WordItems = worditems
522
+ def initialize(wordlist=nil, number=nil, domain=nil)
523
+ @WordList = wordlist
524
+ @Number = number
525
+ @Domain = domain
657
526
  end
658
527
 
659
528
  def deserialize(params)
660
- @DictId = params['DictId']
661
- unless params['WordItems'].nil?
662
- @WordItems = []
663
- params['WordItems'].each do |i|
664
- worditem_tmp = WordItem.new
665
- worditem_tmp.deserialize(i)
666
- @WordItems << worditem_tmp
667
- end
668
- end
529
+ @WordList = params['WordList']
530
+ @Number = params['Number']
531
+ @Domain = params['Domain']
669
532
  end
670
533
  end
671
534
 
672
- # DeleteWordItems返回参数结构体
673
- class DeleteWordItemsResponse < TencentCloud::Common::AbstractModel
535
+ # GenerateKeywordSentence返回参数结构体
536
+ class GenerateKeywordSentenceResponse < TencentCloud::Common::AbstractModel
537
+ # @param KeywordSentenceList: 生成的句子列表。
538
+ # @type KeywordSentenceList: Array
674
539
  # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
675
540
  # @type RequestId: String
676
541
 
677
- attr_accessor :RequestId
542
+ attr_accessor :KeywordSentenceList, :RequestId
678
543
 
679
- def initialize(requestid=nil)
544
+ def initialize(keywordsentencelist=nil, requestid=nil)
545
+ @KeywordSentenceList = keywordsentencelist
680
546
  @RequestId = requestid
681
547
  end
682
548
 
683
549
  def deserialize(params)
550
+ unless params['KeywordSentenceList'].nil?
551
+ @KeywordSentenceList = []
552
+ params['KeywordSentenceList'].each do |i|
553
+ keywordsentence_tmp = KeywordSentence.new
554
+ keywordsentence_tmp.deserialize(i)
555
+ @KeywordSentenceList << keywordsentence_tmp
556
+ end
557
+ end
684
558
  @RequestId = params['RequestId']
685
559
  end
686
560
  end
687
561
 
688
- # DependencyParsing请求参数结构体
689
- class DependencyParsingRequest < TencentCloud::Common::AbstractModel
690
- # @param Text: 待分析的文本(仅支持UTF-8格式,不超过200字)
691
- # @type Text: String
692
-
693
- attr_accessor :Text
694
-
695
- def initialize(text=nil)
696
- @Text = text
697
- end
698
-
699
- def deserialize(params)
700
- @Text = params['Text']
701
- end
702
- end
703
-
704
- # DependencyParsing返回参数结构体
705
- class DependencyParsingResponse < TencentCloud::Common::AbstractModel
706
- # @param DpTokens: 句法依存分析结果,其中句法依存关系的类型包括:
707
- # <li>主谓关系,eg: 我送她一束花 (我 <-- 送)
708
- # <li>动宾关系,eg: 我送她一束花 (送 --> 花)
709
- # <li>间宾关系,eg: 我送她一束花 (送 --> 她)
710
- # <li>前置宾语,eg: 他什么书都读 (书 <-- 读)
711
- # <li>兼语,eg: 他请我吃饭 (请 --> 我)
712
- # <li>定中关系,eg: 红苹果 (红 <-- 苹果)
713
- # <li>状中结构,eg: 非常美丽 (非常 <-- 美丽)
714
- # <li>动补结构,eg: 做完了作业 (做 --> 完)
715
- # <li>并列关系,eg: 大山和大海 (大山 --> 大海)
716
- # <li>介宾关系,eg: 在贸易区内 (在 --> 内)
717
- # <li>左附加关系,eg: 大山和大海 (和 <-- 大海)
718
- # <li>右附加关系,eg: 孩子们 (孩子 --> 们)
719
- # <li>独立结构,eg: 两个单句在结构上彼此独立
720
- # <li>标点符号,eg: 。
721
- # <li>核心关系,eg: 整个句子的核心
722
- # @type DpTokens: Array
723
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
724
- # @type RequestId: String
562
+ # 通过关键词生成的句子信息
563
+ class KeywordSentence < TencentCloud::Common::AbstractModel
564
+ # @param TargetText: 通过关键词生成的句子。
565
+ # @type TargetText: String
725
566
 
726
- attr_accessor :DpTokens, :RequestId
567
+ attr_accessor :TargetText
727
568
 
728
- def initialize(dptokens=nil, requestid=nil)
729
- @DpTokens = dptokens
730
- @RequestId = requestid
569
+ def initialize(targettext=nil)
570
+ @TargetText = targettext
731
571
  end
732
572
 
733
573
  def deserialize(params)
734
- unless params['DpTokens'].nil?
735
- @DpTokens = []
736
- params['DpTokens'].each do |i|
737
- dptoken_tmp = DpToken.new
738
- dptoken_tmp.deserialize(i)
739
- @DpTokens << dptoken_tmp
740
- end
741
- end
742
- @RequestId = params['RequestId']
574
+ @TargetText = params['TargetText']
743
575
  end
744
576
  end
745
577
 
746
- # DescribeDict请求参数结构体
747
- class DescribeDictRequest < TencentCloud::Common::AbstractModel
748
- # @param DictId: 自定义词库ID。
749
- # @type DictId: String
750
- # @param Name: 自定义词库名称,模糊搜索。
751
- # @type Name: String
578
+ # ParseWords请求参数结构体
579
+ class ParseWordsRequest < TencentCloud::Common::AbstractModel
580
+ # @param Text: 待分析的文本(支持中英文文本,不超过500字符)
581
+ # @type Text: String
752
582
 
753
- attr_accessor :DictId, :Name
583
+ attr_accessor :Text
754
584
 
755
- def initialize(dictid=nil, name=nil)
756
- @DictId = dictid
757
- @Name = name
585
+ def initialize(text=nil)
586
+ @Text = text
758
587
  end
759
588
 
760
589
  def deserialize(params)
761
- @DictId = params['DictId']
762
- @Name = params['Name']
590
+ @Text = params['Text']
763
591
  end
764
592
  end
765
593
 
766
- # DescribeDict返回参数结构体
767
- class DescribeDictResponse < TencentCloud::Common::AbstractModel
768
- # @param Dicts: 查询到的词库信息列表。
769
- # 注意:此字段可能返回 null,表示取不到有效值。
770
- # @type Dicts: Array
594
+ # ParseWords返回参数结构体
595
+ class ParseWordsResponse < TencentCloud::Common::AbstractModel
596
+ # @param NormalText: 输入文本正则化的结果。(包括对英文文本中的开头和实体进行大写等)
597
+ # @type NormalText: String
598
+ # @param BasicParticiples: 基础粒度分词和词性标注的结果。(请参见附录[词性表](https://cloud.tencent.com/document/product/271/36460))
599
+ # @type BasicParticiples: Array
600
+ # @param CompoundParticiples: 复合粒度分词和词性标注的结果。(请参见附录[词性表](https://cloud.tencent.com/document/product/271/36460))
601
+ # @type CompoundParticiples: Array
602
+ # @param Entities: 实体识别结果。(请参见附录[实体类型数据](https://cloud.tencent.com/document/product/271/90592))
603
+ # @type Entities: Array
771
604
  # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
772
605
  # @type RequestId: String
773
606
 
774
- attr_accessor :Dicts, :RequestId
607
+ attr_accessor :NormalText, :BasicParticiples, :CompoundParticiples, :Entities, :RequestId
775
608
 
776
- def initialize(dicts=nil, requestid=nil)
777
- @Dicts = dicts
609
+ def initialize(normaltext=nil, basicparticiples=nil, compoundparticiples=nil, entities=nil, requestid=nil)
610
+ @NormalText = normaltext
611
+ @BasicParticiples = basicparticiples
612
+ @CompoundParticiples = compoundparticiples
613
+ @Entities = entities
778
614
  @RequestId = requestid
779
615
  end
780
616
 
781
617
  def deserialize(params)
782
- unless params['Dicts'].nil?
783
- @Dicts = []
784
- params['Dicts'].each do |i|
785
- dictinfo_tmp = DictInfo.new
786
- dictinfo_tmp.deserialize(i)
787
- @Dicts << dictinfo_tmp
788
- end
789
- end
790
- @RequestId = params['RequestId']
791
- end
792
- end
793
-
794
- # DescribeDicts请求参数结构体
795
- class DescribeDictsRequest < TencentCloud::Common::AbstractModel
796
- # @param Limit: 每页数据量,范围为1~100,默认为10。
797
- # @type Limit: Integer
798
- # @param Offset: 分页偏移量,从0开始,默认为0。
799
- # @type Offset: Integer
800
-
801
- attr_accessor :Limit, :Offset
802
-
803
- def initialize(limit=nil, offset=nil)
804
- @Limit = limit
805
- @Offset = offset
806
- end
807
-
808
- def deserialize(params)
809
- @Limit = params['Limit']
810
- @Offset = params['Offset']
811
- end
812
- end
813
-
814
- # DescribeDicts返回参数结构体
815
- class DescribeDictsResponse < TencentCloud::Common::AbstractModel
816
- # @param TotalCount: 记录总条数。
817
- # @type TotalCount: Integer
818
- # @param Dicts: 自定义词库信息列表。
819
- # 注意:此字段可能返回 null,表示取不到有效值。
820
- # @type Dicts: Array
821
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
822
- # @type RequestId: String
823
-
824
- attr_accessor :TotalCount, :Dicts, :RequestId
825
-
826
- def initialize(totalcount=nil, dicts=nil, requestid=nil)
827
- @TotalCount = totalcount
828
- @Dicts = dicts
829
- @RequestId = requestid
830
- end
831
-
832
- def deserialize(params)
833
- @TotalCount = params['TotalCount']
834
- unless params['Dicts'].nil?
835
- @Dicts = []
836
- params['Dicts'].each do |i|
837
- dictinfo_tmp = DictInfo.new
838
- dictinfo_tmp.deserialize(i)
839
- @Dicts << dictinfo_tmp
840
- end
841
- end
842
- @RequestId = params['RequestId']
843
- end
844
- end
845
-
846
- # DescribeWordItems请求参数结构体
847
- class DescribeWordItemsRequest < TencentCloud::Common::AbstractModel
848
- # @param DictId: 自定义词库ID。
849
- # @type DictId: String
850
- # @param Offset: 分页偏移量,从0开始,默认为0。
851
- # @type Offset: Integer
852
- # @param Limit: 每页数据量,范围为1~100,默认为10。
853
- # @type Limit: Integer
854
- # @param Text: 待检索的词条文本,支持模糊匹配。
855
- # @type Text: String
856
-
857
- attr_accessor :DictId, :Offset, :Limit, :Text
858
-
859
- def initialize(dictid=nil, offset=nil, limit=nil, text=nil)
860
- @DictId = dictid
861
- @Offset = offset
862
- @Limit = limit
863
- @Text = text
864
- end
865
-
866
- def deserialize(params)
867
- @DictId = params['DictId']
868
- @Offset = params['Offset']
869
- @Limit = params['Limit']
870
- @Text = params['Text']
871
- end
872
- end
873
-
874
- # DescribeWordItems返回参数结构体
875
- class DescribeWordItemsResponse < TencentCloud::Common::AbstractModel
876
- # @param TotalCount: 词条记录总条数。
877
- # @type TotalCount: Integer
878
- # @param WordItems: 词条信息列表。
879
- # 注意:此字段可能返回 null,表示取不到有效值。
880
- # @type WordItems: Array
881
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
882
- # @type RequestId: String
883
-
884
- attr_accessor :TotalCount, :WordItems, :RequestId
885
-
886
- def initialize(totalcount=nil, worditems=nil, requestid=nil)
887
- @TotalCount = totalcount
888
- @WordItems = worditems
889
- @RequestId = requestid
890
- end
891
-
892
- def deserialize(params)
893
- @TotalCount = params['TotalCount']
894
- unless params['WordItems'].nil?
895
- @WordItems = []
896
- params['WordItems'].each do |i|
897
- worditem_tmp = WordItem.new
898
- worditem_tmp.deserialize(i)
899
- @WordItems << worditem_tmp
900
- end
901
- end
902
- @RequestId = params['RequestId']
903
- end
904
- end
905
-
906
- # 自定义词库信息
907
- class DictInfo < TencentCloud::Common::AbstractModel
908
- # @param Name: 自定义词库名称。
909
- # @type Name: String
910
- # @param Id: 自定义词库ID。
911
- # @type Id: String
912
- # @param Description: 自定义词库描述信息。
913
- # @type Description: String
914
- # @param UpdateTime: 自定义词库修改时间,形式为:yyyy-mm-dd hh:mm:ss。
915
- # @type UpdateTime: String
916
- # @param CreateTime: 自定义词库创建时间,形式为:yyyy-mm-dd hh:mm:ss。
917
- # @type CreateTime: String
918
-
919
- attr_accessor :Name, :Id, :Description, :UpdateTime, :CreateTime
920
-
921
- def initialize(name=nil, id=nil, description=nil, updatetime=nil, createtime=nil)
922
- @Name = name
923
- @Id = id
924
- @Description = description
925
- @UpdateTime = updatetime
926
- @CreateTime = createtime
927
- end
928
-
929
- def deserialize(params)
930
- @Name = params['Name']
931
- @Id = params['Id']
932
- @Description = params['Description']
933
- @UpdateTime = params['UpdateTime']
934
- @CreateTime = params['CreateTime']
935
- end
936
- end
937
-
938
- # 句法依存分析结果,包括基础词,基础词的序号,当前词父节点的序号,句法依存关系的类型
939
- class DpToken < TencentCloud::Common::AbstractModel
940
- # @param Relation: 句法依存关系的类型
941
- # @type Relation: String
942
- # @param HeadId: 当前词父节点的序号
943
- # @type HeadId: Integer
944
- # @param Word: 基础词
945
- # @type Word: String
946
- # @param Id: 基础词的序号
947
- # @type Id: Integer
948
-
949
- attr_accessor :Relation, :HeadId, :Word, :Id
950
-
951
- def initialize(relation=nil, headid=nil, word=nil, id=nil)
952
- @Relation = relation
953
- @HeadId = headid
954
- @Word = word
955
- @Id = id
956
- end
957
-
958
- def deserialize(params)
959
- @Relation = params['Relation']
960
- @HeadId = params['HeadId']
961
- @Word = params['Word']
962
- @Id = params['Id']
963
- end
964
- end
965
-
966
- # 文本润色结果
967
- class Embellish < TencentCloud::Common::AbstractModel
968
- # @param Text: 润色后的文本。
969
- # 注意:此字段可能返回 null,表示取不到有效值。
970
- # @type Text: String
971
- # @param EmbellishType: 润色类型。类型如下:
972
- # expansion:扩写
973
- # rewriting:改写
974
- # translation_m2a:从现代文改写为古文
975
- # translation_a2m:从古文改写为现代文
976
-
977
-
978
- # 注意:此字段可能返回 null,表示取不到有效值。
979
- # @type EmbellishType: String
980
-
981
- attr_accessor :Text, :EmbellishType
982
-
983
- def initialize(text=nil, embellishtype=nil)
984
- @Text = text
985
- @EmbellishType = embellishtype
986
- end
987
-
988
- def deserialize(params)
989
- @Text = params['Text']
990
- @EmbellishType = params['EmbellishType']
991
- end
992
- end
993
-
994
- # 实体识别结果。
995
- class Entity < TencentCloud::Common::AbstractModel
996
- # @param Word: 基础词。
997
- # @type Word: String
998
- # @param BeginOffset: 基础词在NormalText中的起始位置。
999
- # @type BeginOffset: Integer
1000
- # @param Length: 基础词的长度。
1001
- # @type Length: Integer
1002
- # @param Type: 实体类型的标准名字。
1003
- # @type Type: String
1004
- # @param Name: 类型名字的自然语言表达。(中文或英文)
1005
- # @type Name: String
1006
-
1007
- attr_accessor :Word, :BeginOffset, :Length, :Type, :Name
1008
-
1009
- def initialize(word=nil, beginoffset=nil, length=nil, type=nil, name=nil)
1010
- @Word = word
1011
- @BeginOffset = beginoffset
1012
- @Length = length
1013
- @Type = type
1014
- @Name = name
1015
- end
1016
-
1017
- def deserialize(params)
1018
- @Word = params['Word']
1019
- @BeginOffset = params['BeginOffset']
1020
- @Length = params['Length']
1021
- @Type = params['Type']
1022
- @Name = params['Name']
1023
- end
1024
- end
1025
-
1026
- # EvaluateSentenceSimilarity请求参数结构体
1027
- class EvaluateSentenceSimilarityRequest < TencentCloud::Common::AbstractModel
1028
- # @param SentencePairList: 待分析的句子对数组。句子对应不超过1对,仅支持中文文本,原句子与目标句子均应不超过500字符。
1029
- # @type SentencePairList: Array
1030
-
1031
- attr_accessor :SentencePairList
1032
-
1033
- def initialize(sentencepairlist=nil)
1034
- @SentencePairList = sentencepairlist
1035
- end
1036
-
1037
- def deserialize(params)
1038
- unless params['SentencePairList'].nil?
1039
- @SentencePairList = []
1040
- params['SentencePairList'].each do |i|
1041
- sentencepair_tmp = SentencePair.new
1042
- sentencepair_tmp.deserialize(i)
1043
- @SentencePairList << sentencepair_tmp
1044
- end
1045
- end
1046
- end
1047
- end
1048
-
1049
- # EvaluateSentenceSimilarity返回参数结构体
1050
- class EvaluateSentenceSimilarityResponse < TencentCloud::Common::AbstractModel
1051
- # @param ScoreList: 每个句子对的相似度分值。
1052
- # @type ScoreList: Array
1053
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1054
- # @type RequestId: String
1055
-
1056
- attr_accessor :ScoreList, :RequestId
1057
-
1058
- def initialize(scorelist=nil, requestid=nil)
1059
- @ScoreList = scorelist
1060
- @RequestId = requestid
1061
- end
1062
-
1063
- def deserialize(params)
1064
- @ScoreList = params['ScoreList']
1065
- @RequestId = params['RequestId']
1066
- end
1067
- end
1068
-
1069
- # EvaluateWordSimilarity请求参数结构体
1070
- class EvaluateWordSimilarityRequest < TencentCloud::Common::AbstractModel
1071
- # @param SourceWord: 计算相似度的源词。(仅支持UTF-8格式,不超过10字符)
1072
- # @type SourceWord: String
1073
- # @param TargetWord: 计算相似度的目标词。(仅支持UTF-8格式,不超过10字符)
1074
- # @type TargetWord: String
1075
-
1076
- attr_accessor :SourceWord, :TargetWord
1077
-
1078
- def initialize(sourceword=nil, targetword=nil)
1079
- @SourceWord = sourceword
1080
- @TargetWord = targetword
1081
- end
1082
-
1083
- def deserialize(params)
1084
- @SourceWord = params['SourceWord']
1085
- @TargetWord = params['TargetWord']
1086
- end
1087
- end
1088
-
1089
- # EvaluateWordSimilarity返回参数结构体
1090
- class EvaluateWordSimilarityResponse < TencentCloud::Common::AbstractModel
1091
- # @param Similarity: 词相似度分值。
1092
- # @type Similarity: Float
1093
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1094
- # @type RequestId: String
1095
-
1096
- attr_accessor :Similarity, :RequestId
1097
-
1098
- def initialize(similarity=nil, requestid=nil)
1099
- @Similarity = similarity
1100
- @RequestId = requestid
1101
- end
1102
-
1103
- def deserialize(params)
1104
- @Similarity = params['Similarity']
1105
- @RequestId = params['RequestId']
1106
- end
1107
- end
1108
-
1109
- # GenerateCouplet请求参数结构体
1110
- class GenerateCoupletRequest < TencentCloud::Common::AbstractModel
1111
- # @param Text: 生成对联的关键词。长度需>=2,当长度>2时,自动截取前两个字作为关键字。内容需为常用汉字(不含有数字、英文、韩语、日语、符号等等其他)。
1112
- # @type Text: String
1113
- # @param TargetType: 返回的文本结果为繁体还是简体。0:简体;1:繁体。默认为0。
1114
- # @type TargetType: Integer
1115
-
1116
- attr_accessor :Text, :TargetType
1117
-
1118
- def initialize(text=nil, targettype=nil)
1119
- @Text = text
1120
- @TargetType = targettype
1121
- end
1122
-
1123
- def deserialize(params)
1124
- @Text = params['Text']
1125
- @TargetType = params['TargetType']
1126
- end
1127
- end
1128
-
1129
- # GenerateCouplet返回参数结构体
1130
- class GenerateCoupletResponse < TencentCloud::Common::AbstractModel
1131
- # @param TopScroll: 横批。
1132
- # @type TopScroll: String
1133
- # @param Content: 上联与下联。
1134
- # @type Content: Array
1135
- # @param RandomCause: 当对联随机生成时,展示随机生成原因。
1136
- # @type RandomCause: String
1137
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1138
- # @type RequestId: String
1139
-
1140
- attr_accessor :TopScroll, :Content, :RandomCause, :RequestId
1141
-
1142
- def initialize(topscroll=nil, content=nil, randomcause=nil, requestid=nil)
1143
- @TopScroll = topscroll
1144
- @Content = content
1145
- @RandomCause = randomcause
1146
- @RequestId = requestid
1147
- end
1148
-
1149
- def deserialize(params)
1150
- @TopScroll = params['TopScroll']
1151
- @Content = params['Content']
1152
- @RandomCause = params['RandomCause']
1153
- @RequestId = params['RequestId']
1154
- end
1155
- end
1156
-
1157
- # GenerateKeywordSentence请求参数结构体
1158
- class GenerateKeywordSentenceRequest < TencentCloud::Common::AbstractModel
1159
- # @param WordList: 生成句子的关键词,关键词个数需不超过4个,中文关键词长度应不超过10字符,英文关键词长度不超过3个单词。关键词中不可包含标点符号。
1160
- # @type WordList: Array
1161
- # @param Number: 返回生成句子的个数。数量需>=1且<=5。
1162
- # (注意实际结果可能小于指定个数)
1163
- # @type Number: Integer
1164
- # @param Domain: 指定生成句子的领域,支持领域如下:
1165
- # general:通用领域,支持中英文
1166
- # academic:学术领域,仅支持英文
1167
- # 默认为general(通用领域)。
1168
- # @type Domain: String
1169
-
1170
- attr_accessor :WordList, :Number, :Domain
1171
-
1172
- def initialize(wordlist=nil, number=nil, domain=nil)
1173
- @WordList = wordlist
1174
- @Number = number
1175
- @Domain = domain
1176
- end
1177
-
1178
- def deserialize(params)
1179
- @WordList = params['WordList']
1180
- @Number = params['Number']
1181
- @Domain = params['Domain']
1182
- end
1183
- end
1184
-
1185
- # GenerateKeywordSentence返回参数结构体
1186
- class GenerateKeywordSentenceResponse < TencentCloud::Common::AbstractModel
1187
- # @param KeywordSentenceList: 生成的句子列表。
1188
- # @type KeywordSentenceList: Array
1189
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1190
- # @type RequestId: String
1191
-
1192
- attr_accessor :KeywordSentenceList, :RequestId
1193
-
1194
- def initialize(keywordsentencelist=nil, requestid=nil)
1195
- @KeywordSentenceList = keywordsentencelist
1196
- @RequestId = requestid
1197
- end
1198
-
1199
- def deserialize(params)
1200
- unless params['KeywordSentenceList'].nil?
1201
- @KeywordSentenceList = []
1202
- params['KeywordSentenceList'].each do |i|
1203
- keywordsentence_tmp = KeywordSentence.new
1204
- keywordsentence_tmp.deserialize(i)
1205
- @KeywordSentenceList << keywordsentence_tmp
1206
- end
1207
- end
1208
- @RequestId = params['RequestId']
1209
- end
1210
- end
1211
-
1212
- # GeneratePoetry请求参数结构体
1213
- class GeneratePoetryRequest < TencentCloud::Common::AbstractModel
1214
- # @param Text: 生成诗词的关键词。
1215
- # @type Text: String
1216
- # @param PoetryType: 生成诗词的类型。0:藏头或藏身;1:藏头;2:藏身。默认为0。
1217
- # @type PoetryType: Integer
1218
- # @param Genre: 诗的体裁。0:五言律诗或七言律诗;5:五言律诗;7:七言律诗。默认为0。
1219
- # @type Genre: Integer
1220
-
1221
- attr_accessor :Text, :PoetryType, :Genre
1222
-
1223
- def initialize(text=nil, poetrytype=nil, genre=nil)
1224
- @Text = text
1225
- @PoetryType = poetrytype
1226
- @Genre = genre
1227
- end
1228
-
1229
- def deserialize(params)
1230
- @Text = params['Text']
1231
- @PoetryType = params['PoetryType']
1232
- @Genre = params['Genre']
1233
- end
1234
- end
1235
-
1236
- # GeneratePoetry返回参数结构体
1237
- class GeneratePoetryResponse < TencentCloud::Common::AbstractModel
1238
- # @param Title: 诗题,即输入的生成诗词的关键词。
1239
- # @type Title: String
1240
- # @param Content: 诗的内容。
1241
- # @type Content: Array
1242
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1243
- # @type RequestId: String
1244
-
1245
- attr_accessor :Title, :Content, :RequestId
1246
-
1247
- def initialize(title=nil, content=nil, requestid=nil)
1248
- @Title = title
1249
- @Content = content
1250
- @RequestId = requestid
1251
- end
1252
-
1253
- def deserialize(params)
1254
- @Title = params['Title']
1255
- @Content = params['Content']
1256
- @RequestId = params['RequestId']
1257
- end
1258
- end
1259
-
1260
- # 关键词提取结果
1261
- class Keyword < TencentCloud::Common::AbstractModel
1262
- # @param Score: 权重
1263
- # @type Score: Float
1264
- # @param Word: 关键词
1265
- # @type Word: String
1266
-
1267
- attr_accessor :Score, :Word
1268
-
1269
- def initialize(score=nil, word=nil)
1270
- @Score = score
1271
- @Word = word
1272
- end
1273
-
1274
- def deserialize(params)
1275
- @Score = params['Score']
1276
- @Word = params['Word']
1277
- end
1278
- end
1279
-
1280
- # 通过关键词生成的句子信息
1281
- class KeywordSentence < TencentCloud::Common::AbstractModel
1282
- # @param TargetText: 通过关键词生成的句子。
1283
- # @type TargetText: String
1284
-
1285
- attr_accessor :TargetText
1286
-
1287
- def initialize(targettext=nil)
1288
- @TargetText = targettext
1289
- end
1290
-
1291
- def deserialize(params)
1292
- @TargetText = params['TargetText']
1293
- end
1294
- end
1295
-
1296
- # KeywordsExtraction请求参数结构体
1297
- class KeywordsExtractionRequest < TencentCloud::Common::AbstractModel
1298
- # @param Text: 待处理的文本(仅支持UTF-8格式,不超过10000字符)
1299
- # @type Text: String
1300
- # @param Num: 指定关键词个数上限(默认值为5)
1301
- # @type Num: Integer
1302
-
1303
- attr_accessor :Text, :Num
1304
-
1305
- def initialize(text=nil, num=nil)
1306
- @Text = text
1307
- @Num = num
1308
- end
1309
-
1310
- def deserialize(params)
1311
- @Text = params['Text']
1312
- @Num = params['Num']
1313
- end
1314
- end
1315
-
1316
- # KeywordsExtraction返回参数结构体
1317
- class KeywordsExtractionResponse < TencentCloud::Common::AbstractModel
1318
- # @param Keywords: 关键词提取结果
1319
- # 注意:此字段可能返回 null,表示取不到有效值。
1320
- # @type Keywords: Array
1321
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1322
- # @type RequestId: String
1323
-
1324
- attr_accessor :Keywords, :RequestId
1325
-
1326
- def initialize(keywords=nil, requestid=nil)
1327
- @Keywords = keywords
1328
- @RequestId = requestid
1329
- end
1330
-
1331
- def deserialize(params)
1332
- unless params['Keywords'].nil?
1333
- @Keywords = []
1334
- params['Keywords'].each do |i|
1335
- keyword_tmp = Keyword.new
1336
- keyword_tmp.deserialize(i)
1337
- @Keywords << keyword_tmp
1338
- end
1339
- end
1340
- @RequestId = params['RequestId']
1341
- end
1342
- end
1343
-
1344
- # LexicalAnalysis请求参数结构体
1345
- class LexicalAnalysisRequest < TencentCloud::Common::AbstractModel
1346
- # @param Text: 待分析的文本(仅支持UTF-8格式,不超过500字)
1347
- # @type Text: String
1348
- # @param DictId: 指定要加载的自定义词库ID。
1349
- # @type DictId: String
1350
- # @param Flag: 词法分析模式(默认取2值):
1351
- # 1、高精度(混合粒度分词能力);
1352
- # 2、高性能(单粒度分词能力);
1353
- # @type Flag: Integer
1354
-
1355
- attr_accessor :Text, :DictId, :Flag
1356
-
1357
- def initialize(text=nil, dictid=nil, flag=nil)
1358
- @Text = text
1359
- @DictId = dictid
1360
- @Flag = flag
1361
- end
1362
-
1363
- def deserialize(params)
1364
- @Text = params['Text']
1365
- @DictId = params['DictId']
1366
- @Flag = params['Flag']
1367
- end
1368
- end
1369
-
1370
- # LexicalAnalysis返回参数结构体
1371
- class LexicalAnalysisResponse < TencentCloud::Common::AbstractModel
1372
- # @param NerTokens: 命名实体识别结果。取值范围:
1373
- # <li>PER:表示人名,如刘德华、贝克汉姆</li>
1374
- # <li>LOC:表示地名,如北京、华山</li>
1375
- # <li>ORG:表示机构团体名,如腾讯、最高人民法院、人大附中</li>
1376
- # <li>PRODUCTION:表示产品名,如QQ、微信、iPhone</li>
1377
- # 注意:此字段可能返回 null,表示取不到有效值。
1378
- # @type NerTokens: Array
1379
- # @param PosTokens: 分词&词性标注结果(词性表请参见附录)
1380
- # @type PosTokens: Array
1381
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1382
- # @type RequestId: String
1383
-
1384
- attr_accessor :NerTokens, :PosTokens, :RequestId
1385
-
1386
- def initialize(nertokens=nil, postokens=nil, requestid=nil)
1387
- @NerTokens = nertokens
1388
- @PosTokens = postokens
1389
- @RequestId = requestid
1390
- end
1391
-
1392
- def deserialize(params)
1393
- unless params['NerTokens'].nil?
1394
- @NerTokens = []
1395
- params['NerTokens'].each do |i|
1396
- nertoken_tmp = NerToken.new
1397
- nertoken_tmp.deserialize(i)
1398
- @NerTokens << nertoken_tmp
1399
- end
1400
- end
1401
- unless params['PosTokens'].nil?
1402
- @PosTokens = []
1403
- params['PosTokens'].each do |i|
1404
- postoken_tmp = PosToken.new
1405
- postoken_tmp.deserialize(i)
1406
- @PosTokens << postoken_tmp
1407
- end
1408
- end
1409
- @RequestId = params['RequestId']
1410
- end
1411
- end
1412
-
1413
- # 命名实体识别结果
1414
- class NerToken < TencentCloud::Common::AbstractModel
1415
- # @param Word: 基础词
1416
- # @type Word: String
1417
- # @param Length: 长度
1418
- # @type Length: Integer
1419
- # @param BeginOffset: 起始位置
1420
- # @type BeginOffset: Integer
1421
- # @param Type: 命名实体类型
1422
- # @type Type: String
1423
-
1424
- attr_accessor :Word, :Length, :BeginOffset, :Type
1425
-
1426
- def initialize(word=nil, length=nil, beginoffset=nil, type=nil)
1427
- @Word = word
1428
- @Length = length
1429
- @BeginOffset = beginoffset
1430
- @Type = type
1431
- end
1432
-
1433
- def deserialize(params)
1434
- @Word = params['Word']
1435
- @Length = params['Length']
1436
- @BeginOffset = params['BeginOffset']
1437
- @Type = params['Type']
1438
- end
1439
- end
1440
-
1441
- # ParseWords请求参数结构体
1442
- class ParseWordsRequest < TencentCloud::Common::AbstractModel
1443
- # @param Text: 待分析的文本(支持中英文文本,不超过500字符)
1444
- # @type Text: String
1445
-
1446
- attr_accessor :Text
1447
-
1448
- def initialize(text=nil)
1449
- @Text = text
1450
- end
1451
-
1452
- def deserialize(params)
1453
- @Text = params['Text']
1454
- end
1455
- end
1456
-
1457
- # ParseWords返回参数结构体
1458
- class ParseWordsResponse < TencentCloud::Common::AbstractModel
1459
- # @param NormalText: 输入文本正则化的结果。(包括对英文文本中的开头和实体进行大写等)
1460
- # @type NormalText: String
1461
- # @param BasicParticiples: 基础粒度分词和词性标注的结果。(请参见附录[词性表](https://cloud.tencent.com/document/product/271/36460))
1462
- # @type BasicParticiples: Array
1463
- # @param CompoundParticiples: 复合粒度分词和词性标注的结果。(请参见附录[词性表](https://cloud.tencent.com/document/product/271/36460))
1464
- # @type CompoundParticiples: Array
1465
- # @param Entities: 实体识别结果。(请参见附录[实体类型数据](https://cloud.tencent.com/document/product/271/90592))
1466
- # @type Entities: Array
1467
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1468
- # @type RequestId: String
1469
-
1470
- attr_accessor :NormalText, :BasicParticiples, :CompoundParticiples, :Entities, :RequestId
1471
-
1472
- def initialize(normaltext=nil, basicparticiples=nil, compoundparticiples=nil, entities=nil, requestid=nil)
1473
- @NormalText = normaltext
1474
- @BasicParticiples = basicparticiples
1475
- @CompoundParticiples = compoundparticiples
1476
- @Entities = entities
1477
- @RequestId = requestid
1478
- end
1479
-
1480
- def deserialize(params)
1481
- @NormalText = params['NormalText']
1482
- unless params['BasicParticiples'].nil?
1483
- @BasicParticiples = []
1484
- params['BasicParticiples'].each do |i|
1485
- basicparticiple_tmp = BasicParticiple.new
1486
- basicparticiple_tmp.deserialize(i)
1487
- @BasicParticiples << basicparticiple_tmp
1488
- end
1489
- end
1490
- unless params['CompoundParticiples'].nil?
1491
- @CompoundParticiples = []
1492
- params['CompoundParticiples'].each do |i|
1493
- compoundparticiple_tmp = CompoundParticiple.new
1494
- compoundparticiple_tmp.deserialize(i)
1495
- @CompoundParticiples << compoundparticiple_tmp
1496
- end
1497
- end
1498
- unless params['Entities'].nil?
1499
- @Entities = []
1500
- params['Entities'].each do |i|
1501
- entity_tmp = Entity.new
1502
- entity_tmp.deserialize(i)
1503
- @Entities << entity_tmp
1504
- end
1505
- end
1506
- @RequestId = params['RequestId']
1507
- end
1508
- end
1509
-
1510
- # 分词&词性标注结果
1511
- class PosToken < TencentCloud::Common::AbstractModel
1512
- # @param Word: 基础词
1513
- # @type Word: String
1514
- # @param Length: 长度
1515
- # @type Length: Integer
1516
- # @param BeginOffset: 起始位置
1517
- # @type BeginOffset: Integer
1518
- # @param Pos: 词性
1519
- # @type Pos: String
1520
-
1521
- attr_accessor :Word, :Length, :BeginOffset, :Pos
1522
-
1523
- def initialize(word=nil, length=nil, beginoffset=nil, pos=nil)
1524
- @Word = word
1525
- @Length = length
1526
- @BeginOffset = beginoffset
1527
- @Pos = pos
1528
- end
1529
-
1530
- def deserialize(params)
1531
- @Word = params['Word']
1532
- @Length = params['Length']
1533
- @BeginOffset = params['BeginOffset']
1534
- @Pos = params['Pos']
1535
- end
1536
- end
1537
-
1538
- # RetrieveSimilarWords请求参数结构体
1539
- class RetrieveSimilarWordsRequest < TencentCloud::Common::AbstractModel
1540
- # @param Text: 输入的词语。(仅支持UTF-8格式,不超过10字符)
1541
- # @type Text: String
1542
- # @param Number: 召回的相似词个数,取值范围为1-20。
1543
- # @type Number: Integer
1544
-
1545
- attr_accessor :Text, :Number
1546
-
1547
- def initialize(text=nil, number=nil)
1548
- @Text = text
1549
- @Number = number
1550
- end
1551
-
1552
- def deserialize(params)
1553
- @Text = params['Text']
1554
- @Number = params['Number']
1555
- end
1556
- end
1557
-
1558
- # RetrieveSimilarWords返回参数结构体
1559
- class RetrieveSimilarWordsResponse < TencentCloud::Common::AbstractModel
1560
- # @param WordList: 召回的相似词数组。
1561
- # @type WordList: Array
1562
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1563
- # @type RequestId: String
1564
-
1565
- attr_accessor :WordList, :RequestId
1566
-
1567
- def initialize(wordlist=nil, requestid=nil)
1568
- @WordList = wordlist
1569
- @RequestId = requestid
1570
- end
1571
-
1572
- def deserialize(params)
1573
- @WordList = params['WordList']
1574
- @RequestId = params['RequestId']
1575
- end
1576
- end
1577
-
1578
- # 词条搜索的结果,主要描述该词条是否存在以及相关的词性。
1579
- class SearchResult < TencentCloud::Common::AbstractModel
1580
- # @param Text: 被搜索的词条文本。
1581
- # @type Text: String
1582
- # @param IsExist: 0表示词条不存在,1表示存在。
1583
- # @type IsExist: Integer
1584
- # @param MatchText: 匹配到的词条文本。
1585
- # @type MatchText: String
1586
- # @param Pos: 词条的词性。
1587
- # @type Pos: String
1588
-
1589
- attr_accessor :Text, :IsExist, :MatchText, :Pos
1590
-
1591
- def initialize(text=nil, isexist=nil, matchtext=nil, pos=nil)
1592
- @Text = text
1593
- @IsExist = isexist
1594
- @MatchText = matchtext
1595
- @Pos = pos
1596
- end
1597
-
1598
- def deserialize(params)
1599
- @Text = params['Text']
1600
- @IsExist = params['IsExist']
1601
- @MatchText = params['MatchText']
1602
- @Pos = params['Pos']
1603
- end
1604
- end
1605
-
1606
- # SearchWordItems请求参数结构体
1607
- class SearchWordItemsRequest < TencentCloud::Common::AbstractModel
1608
- # @param DictId: 自定义词库ID。
1609
- # @type DictId: String
1610
- # @param WordItems: 待检索的词条集合。
1611
- # @type WordItems: Array
1612
-
1613
- attr_accessor :DictId, :WordItems
1614
-
1615
- def initialize(dictid=nil, worditems=nil)
1616
- @DictId = dictid
1617
- @WordItems = worditems
1618
- end
1619
-
1620
- def deserialize(params)
1621
- @DictId = params['DictId']
1622
- unless params['WordItems'].nil?
1623
- @WordItems = []
1624
- params['WordItems'].each do |i|
1625
- worditem_tmp = WordItem.new
1626
- worditem_tmp.deserialize(i)
1627
- @WordItems << worditem_tmp
1628
- end
1629
- end
1630
- end
1631
- end
1632
-
1633
- # SearchWordItems返回参数结构体
1634
- class SearchWordItemsResponse < TencentCloud::Common::AbstractModel
1635
- # @param Results: 词条检索结果集合。
1636
- # 注意:此字段可能返回 null,表示取不到有效值。
1637
- # @type Results: Array
1638
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1639
- # @type RequestId: String
1640
-
1641
- attr_accessor :Results, :RequestId
1642
-
1643
- def initialize(results=nil, requestid=nil)
1644
- @Results = results
1645
- @RequestId = requestid
1646
- end
1647
-
1648
- def deserialize(params)
1649
- unless params['Results'].nil?
1650
- @Results = []
1651
- params['Results'].each do |i|
1652
- searchresult_tmp = SearchResult.new
1653
- searchresult_tmp.deserialize(i)
1654
- @Results << searchresult_tmp
1655
- end
1656
- end
1657
- @RequestId = params['RequestId']
1658
- end
1659
- end
1660
-
1661
- # SentenceCorrection请求参数结构体
1662
- class SentenceCorrectionRequest < TencentCloud::Common::AbstractModel
1663
- # @param TextList: 待纠错的句子列表。可以以数组方式在一次请求中填写多个待纠错的句子。文本统一使用utf-8格式编码,每个中文句子的长度不超过150字符,每个英文句子的长度不超过100个单词,且数组长度需小于30,即句子总数需少于30句。
1664
- # @type TextList: Array
1665
-
1666
- attr_accessor :TextList
1667
-
1668
- def initialize(textlist=nil)
1669
- @TextList = textlist
1670
- end
1671
-
1672
- def deserialize(params)
1673
- @TextList = params['TextList']
1674
- end
1675
- end
1676
-
1677
- # SentenceCorrection返回参数结构体
1678
- class SentenceCorrectionResponse < TencentCloud::Common::AbstractModel
1679
- # @param CorrectionList: 纠错结果列表。
1680
- # (注意仅展示错误句子的纠错结果,若句子无错则不展示,若全部待纠错句子都被认为无错,则可能返回数组为空)
1681
- # @type CorrectionList: Array
1682
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1683
- # @type RequestId: String
1684
-
1685
- attr_accessor :CorrectionList, :RequestId
1686
-
1687
- def initialize(correctionlist=nil, requestid=nil)
1688
- @CorrectionList = correctionlist
1689
- @RequestId = requestid
1690
- end
1691
-
1692
- def deserialize(params)
1693
- unless params['CorrectionList'].nil?
1694
- @CorrectionList = []
1695
- params['CorrectionList'].each do |i|
1696
- correctionitem_tmp = CorrectionItem.new
1697
- correctionitem_tmp.deserialize(i)
1698
- @CorrectionList << correctionitem_tmp
1699
- end
1700
- end
1701
- @RequestId = params['RequestId']
1702
- end
1703
- end
1704
-
1705
- # SentenceEmbedding请求参数结构体
1706
- class SentenceEmbeddingRequest < TencentCloud::Common::AbstractModel
1707
- # @param Text: 输入的文本(仅支持UTF-8格式,不超过500字)
1708
- # @type Text: String
1709
-
1710
- attr_accessor :Text
1711
-
1712
- def initialize(text=nil)
1713
- @Text = text
1714
- end
1715
-
1716
- def deserialize(params)
1717
- @Text = params['Text']
1718
- end
1719
- end
1720
-
1721
- # SentenceEmbedding返回参数结构体
1722
- class SentenceEmbeddingResponse < TencentCloud::Common::AbstractModel
1723
- # @param Vector: 句向量数组
1724
- # @type Vector: Array
1725
- # @param Dimension: 句向量的维度
1726
- # @type Dimension: Integer
1727
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1728
- # @type RequestId: String
1729
-
1730
- attr_accessor :Vector, :Dimension, :RequestId
1731
-
1732
- def initialize(vector=nil, dimension=nil, requestid=nil)
1733
- @Vector = vector
1734
- @Dimension = dimension
1735
- @RequestId = requestid
1736
- end
1737
-
1738
- def deserialize(params)
1739
- @Vector = params['Vector']
1740
- @Dimension = params['Dimension']
1741
- @RequestId = params['RequestId']
1742
- end
1743
- end
1744
-
1745
- # 待分析的句子对
1746
- class SentencePair < TencentCloud::Common::AbstractModel
1747
- # @param SourceText: 需要与目标句子计算相似度的源句子。(仅支持UTF-8格式,不超过500字符)
1748
- # @type SourceText: String
1749
- # @param TargetText: 目标句子。(仅支持UTF-8格式,不超过500字符)
1750
- # @type TargetText: String
1751
-
1752
- attr_accessor :SourceText, :TargetText
1753
-
1754
- def initialize(sourcetext=nil, targettext=nil)
1755
- @SourceText = sourcetext
1756
- @TargetText = targettext
1757
- end
1758
-
1759
- def deserialize(params)
1760
- @SourceText = params['SourceText']
1761
- @TargetText = params['TargetText']
1762
- end
1763
- end
1764
-
1765
- # SentimentAnalysis请求参数结构体
1766
- class SentimentAnalysisRequest < TencentCloud::Common::AbstractModel
1767
- # @param Text: 待分析的文本(仅支持UTF-8格式,不超过200字)
1768
- # @type Text: String
1769
- # @param Flag: 待分析文本所属的类型,仅当输入参数Mode取值为2class时有效(默认取4值):
1770
- # 1、商品评论类
1771
- # 2、社交类
1772
- # 3、美食酒店类
1773
- # 4、通用领域类
1774
- # @type Flag: Integer
1775
- # @param Mode: 情感分类模式选项,可取2class或3class(默认值为2class)
1776
- # 1、2class:返回正负面二分类情感结果
1777
- # 2、3class:返回正负面及中性三分类情感结果
1778
- # @type Mode: String
1779
-
1780
- attr_accessor :Text, :Flag, :Mode
1781
-
1782
- def initialize(text=nil, flag=nil, mode=nil)
1783
- @Text = text
1784
- @Flag = flag
1785
- @Mode = mode
1786
- end
1787
-
1788
- def deserialize(params)
1789
- @Text = params['Text']
1790
- @Flag = params['Flag']
1791
- @Mode = params['Mode']
1792
- end
1793
- end
1794
-
1795
- # SentimentAnalysis返回参数结构体
1796
- class SentimentAnalysisResponse < TencentCloud::Common::AbstractModel
1797
- # @param Positive: 正面情感概率
1798
- # @type Positive: Float
1799
- # @param Neutral: 中性情感概率,当输入参数Mode取值为3class时有效,否则值为空
1800
- # 注意:此字段可能返回 null,表示取不到有效值。
1801
- # @type Neutral: Float
1802
- # @param Negative: 负面情感概率
1803
- # @type Negative: Float
1804
- # @param Sentiment: 情感分类结果:
1805
- # 1、positive,表示正面情感
1806
- # 2、negative,表示负面情感
1807
- # 3、neutral,表示中性、无情感
1808
- # @type Sentiment: String
1809
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1810
- # @type RequestId: String
1811
-
1812
- attr_accessor :Positive, :Neutral, :Negative, :Sentiment, :RequestId
1813
-
1814
- def initialize(positive=nil, neutral=nil, negative=nil, sentiment=nil, requestid=nil)
1815
- @Positive = positive
1816
- @Neutral = neutral
1817
- @Negative = negative
1818
- @Sentiment = sentiment
1819
- @RequestId = requestid
1820
- end
1821
-
1822
- def deserialize(params)
1823
- @Positive = params['Positive']
1824
- @Neutral = params['Neutral']
1825
- @Negative = params['Negative']
1826
- @Sentiment = params['Sentiment']
1827
- @RequestId = params['RequestId']
1828
- end
1829
- end
1830
-
1831
- # SimilarWords请求参数结构体
1832
- class SimilarWordsRequest < TencentCloud::Common::AbstractModel
1833
- # @param Text: 输入的词语(仅支持UTF-8格式,不超过20字)
1834
- # @type Text: String
1835
- # @param WordNumber: 相似词个数;取值范围:1-200,默认为10;
1836
- # @type WordNumber: Integer
1837
-
1838
- attr_accessor :Text, :WordNumber
1839
-
1840
- def initialize(text=nil, wordnumber=nil)
1841
- @Text = text
1842
- @WordNumber = wordnumber
1843
- end
1844
-
1845
- def deserialize(params)
1846
- @Text = params['Text']
1847
- @WordNumber = params['WordNumber']
1848
- end
1849
- end
1850
-
1851
- # SimilarWords返回参数结构体
1852
- class SimilarWordsResponse < TencentCloud::Common::AbstractModel
1853
- # @param SimilarWords: 相似词数组
1854
- # @type SimilarWords: Array
1855
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1856
- # @type RequestId: String
1857
-
1858
- attr_accessor :SimilarWords, :RequestId
1859
-
1860
- def initialize(similarwords=nil, requestid=nil)
1861
- @SimilarWords = similarwords
1862
- @RequestId = requestid
1863
- end
1864
-
1865
- def deserialize(params)
1866
- @SimilarWords = params['SimilarWords']
618
+ @NormalText = params['NormalText']
619
+ unless params['BasicParticiples'].nil?
620
+ @BasicParticiples = []
621
+ params['BasicParticiples'].each do |i|
622
+ basicparticiple_tmp = BasicParticiple.new
623
+ basicparticiple_tmp.deserialize(i)
624
+ @BasicParticiples << basicparticiple_tmp
625
+ end
626
+ end
627
+ unless params['CompoundParticiples'].nil?
628
+ @CompoundParticiples = []
629
+ params['CompoundParticiples'].each do |i|
630
+ compoundparticiple_tmp = CompoundParticiple.new
631
+ compoundparticiple_tmp.deserialize(i)
632
+ @CompoundParticiples << compoundparticiple_tmp
633
+ end
634
+ end
635
+ unless params['Entities'].nil?
636
+ @Entities = []
637
+ params['Entities'].each do |i|
638
+ entity_tmp = Entity.new
639
+ entity_tmp.deserialize(i)
640
+ @Entities << entity_tmp
641
+ end
642
+ end
1867
643
  @RequestId = params['RequestId']
1868
644
  end
1869
645
  end
1870
646
 
1871
- # 文本相似度
1872
- class Similarity < TencentCloud::Common::AbstractModel
1873
- # @param Text: 目标文本句子
1874
- # @type Text: String
1875
- # @param Score: 相似度分数
1876
- # @type Score: Float
1877
-
1878
- attr_accessor :Text, :Score
1879
-
1880
- def initialize(text=nil, score=nil)
1881
- @Text = text
1882
- @Score = score
1883
- end
1884
-
1885
- def deserialize(params)
1886
- @Text = params['Text']
1887
- @Score = params['Score']
1888
- end
1889
- end
1890
-
1891
- # TextClassification请求参数结构体
1892
- class TextClassificationRequest < TencentCloud::Common::AbstractModel
1893
- # @param Text: 待分类的文本(仅支持UTF-8格式,不超过10000字)
647
+ # RetrieveSimilarWords请求参数结构体
648
+ class RetrieveSimilarWordsRequest < TencentCloud::Common::AbstractModel
649
+ # @param Text: 输入的词语。(仅支持UTF-8格式,不超过10字符)
1894
650
  # @type Text: String
1895
- # @param Flag: 领域分类体系(默认取1值):
1896
- # 1、通用领域,二分类
1897
- # 2、新闻领域,五分类。类别数据不一定全部返回,详情见类目映射表(注意:目前五分类已下线不可用)
1898
- # @type Flag: Integer
651
+ # @param Number: 召回的相似词个数,取值范围为1-20。
652
+ # @type Number: Integer
1899
653
 
1900
- attr_accessor :Text, :Flag
654
+ attr_accessor :Text, :Number
1901
655
 
1902
- def initialize(text=nil, flag=nil)
656
+ def initialize(text=nil, number=nil)
1903
657
  @Text = text
1904
- @Flag = flag
658
+ @Number = number
1905
659
  end
1906
660
 
1907
661
  def deserialize(params)
1908
662
  @Text = params['Text']
1909
- @Flag = params['Flag']
663
+ @Number = params['Number']
1910
664
  end
1911
665
  end
1912
666
 
1913
- # TextClassification返回参数结构体
1914
- class TextClassificationResponse < TencentCloud::Common::AbstractModel
1915
- # @param Classes: 文本分类结果(文本分类映射表请参见附录)
1916
- # @type Classes: Array
667
+ # RetrieveSimilarWords返回参数结构体
668
+ class RetrieveSimilarWordsResponse < TencentCloud::Common::AbstractModel
669
+ # @param WordList: 召回的相似词数组。
670
+ # @type WordList: Array
1917
671
  # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1918
672
  # @type RequestId: String
1919
673
 
1920
- attr_accessor :Classes, :RequestId
674
+ attr_accessor :WordList, :RequestId
1921
675
 
1922
- def initialize(classes=nil, requestid=nil)
1923
- @Classes = classes
676
+ def initialize(wordlist=nil, requestid=nil)
677
+ @WordList = wordlist
1924
678
  @RequestId = requestid
1925
679
  end
1926
680
 
1927
681
  def deserialize(params)
1928
- unless params['Classes'].nil?
1929
- @Classes = []
1930
- params['Classes'].each do |i|
1931
- classificationresult_tmp = ClassificationResult.new
1932
- classificationresult_tmp.deserialize(i)
1933
- @Classes << classificationresult_tmp
1934
- end
1935
- end
682
+ @WordList = params['WordList']
1936
683
  @RequestId = params['RequestId']
1937
684
  end
1938
685
  end
1939
686
 
1940
- # TextCorrectionPro请求参数结构体
1941
- class TextCorrectionProRequest < TencentCloud::Common::AbstractModel
1942
- # @param Text: 待纠错的文本(仅支持UTF-8格式,不超过128字符)
1943
- # @type Text: String
687
+ # SentenceCorrection请求参数结构体
688
+ class SentenceCorrectionRequest < TencentCloud::Common::AbstractModel
689
+ # @param TextList: 待纠错的句子列表。可以以数组方式在一次请求中填写多个待纠错的句子。文本统一使用utf-8格式编码,每个中文句子的长度不超过150字符,每个英文句子的长度不超过100个单词,且数组长度需小于30,即句子总数需少于30句。
690
+ # @type TextList: Array
1944
691
 
1945
- attr_accessor :Text
692
+ attr_accessor :TextList
1946
693
 
1947
- def initialize(text=nil)
1948
- @Text = text
694
+ def initialize(textlist=nil)
695
+ @TextList = textlist
1949
696
  end
1950
697
 
1951
698
  def deserialize(params)
1952
- @Text = params['Text']
699
+ @TextList = params['TextList']
1953
700
  end
1954
701
  end
1955
702
 
1956
- # TextCorrectionPro返回参数结构体
1957
- class TextCorrectionProResponse < TencentCloud::Common::AbstractModel
1958
- # @param CCITokens: 纠错详情
1959
- # 注意:此字段可能返回 null,表示取不到有效值。
1960
- # @type CCITokens: Array
1961
- # @param ResultText: 纠错后的文本
1962
- # @type ResultText: String
703
+ # SentenceCorrection返回参数结构体
704
+ class SentenceCorrectionResponse < TencentCloud::Common::AbstractModel
705
+ # @param CorrectionList: 纠错结果列表。
706
+ # (注意仅展示错误句子的纠错结果,若句子无错则不展示,若全部待纠错句子都被认为无错,则可能返回数组为空)
707
+ # @type CorrectionList: Array
1963
708
  # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1964
709
  # @type RequestId: String
1965
710
 
1966
- attr_accessor :CCITokens, :ResultText, :RequestId
711
+ attr_accessor :CorrectionList, :RequestId
1967
712
 
1968
- def initialize(ccitokens=nil, resulttext=nil, requestid=nil)
1969
- @CCITokens = ccitokens
1970
- @ResultText = resulttext
713
+ def initialize(correctionlist=nil, requestid=nil)
714
+ @CorrectionList = correctionlist
1971
715
  @RequestId = requestid
1972
716
  end
1973
717
 
1974
718
  def deserialize(params)
1975
- unless params['CCITokens'].nil?
1976
- @CCITokens = []
1977
- params['CCITokens'].each do |i|
1978
- ccitoken_tmp = CCIToken.new
1979
- ccitoken_tmp.deserialize(i)
1980
- @CCITokens << ccitoken_tmp
719
+ unless params['CorrectionList'].nil?
720
+ @CorrectionList = []
721
+ params['CorrectionList'].each do |i|
722
+ correctionitem_tmp = CorrectionItem.new
723
+ correctionitem_tmp.deserialize(i)
724
+ @CorrectionList << correctionitem_tmp
1981
725
  end
1982
726
  end
1983
- @ResultText = params['ResultText']
1984
727
  @RequestId = params['RequestId']
1985
728
  end
1986
729
  end
1987
730
 
1988
- # TextCorrection请求参数结构体
1989
- class TextCorrectionRequest < TencentCloud::Common::AbstractModel
1990
- # @param Text: 待纠错的文本(仅支持UTF-8格式,不超过2000字符)
1991
- # @type Text: String
1992
-
1993
- attr_accessor :Text
1994
-
1995
- def initialize(text=nil)
1996
- @Text = text
1997
- end
1998
-
1999
- def deserialize(params)
2000
- @Text = params['Text']
2001
- end
2002
- end
2003
-
2004
- # TextCorrection返回参数结构体
2005
- class TextCorrectionResponse < TencentCloud::Common::AbstractModel
2006
- # @param CCITokens: 纠错详情
2007
- # 注意:此字段可能返回 null,表示取不到有效值。
2008
- # @type CCITokens: Array
2009
- # @param ResultText: 纠错后的文本
2010
- # @type ResultText: String
2011
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2012
- # @type RequestId: String
731
+ # 待分析的句子对
732
+ class SentencePair < TencentCloud::Common::AbstractModel
733
+ # @param SourceText: 需要与目标句子计算相似度的源句子。(仅支持UTF-8格式,不超过500字符)
734
+ # @type SourceText: String
735
+ # @param TargetText: 目标句子。(仅支持UTF-8格式,不超过500字符)
736
+ # @type TargetText: String
2013
737
 
2014
- attr_accessor :CCITokens, :ResultText, :RequestId
738
+ attr_accessor :SourceText, :TargetText
2015
739
 
2016
- def initialize(ccitokens=nil, resulttext=nil, requestid=nil)
2017
- @CCITokens = ccitokens
2018
- @ResultText = resulttext
2019
- @RequestId = requestid
740
+ def initialize(sourcetext=nil, targettext=nil)
741
+ @SourceText = sourcetext
742
+ @TargetText = targettext
2020
743
  end
2021
744
 
2022
745
  def deserialize(params)
2023
- unless params['CCITokens'].nil?
2024
- @CCITokens = []
2025
- params['CCITokens'].each do |i|
2026
- ccitoken_tmp = CCIToken.new
2027
- ccitoken_tmp.deserialize(i)
2028
- @CCITokens << ccitoken_tmp
2029
- end
2030
- end
2031
- @ResultText = params['ResultText']
2032
- @RequestId = params['RequestId']
746
+ @SourceText = params['SourceText']
747
+ @TargetText = params['TargetText']
2033
748
  end
2034
749
  end
2035
750
 
@@ -2097,100 +812,6 @@ module TencentCloud
2097
812
  end
2098
813
  end
2099
814
 
2100
- # TextSimilarityPro请求参数结构体
2101
- class TextSimilarityProRequest < TencentCloud::Common::AbstractModel
2102
- # @param SrcText: 需要与目标句子计算相似度的源句子(仅支持UTF-8格式,不超过128字符)
2103
- # @type SrcText: String
2104
- # @param TargetText: 目标句子(仅支持UTF-8格式,不超过128字符)
2105
- # @type TargetText: Array
2106
-
2107
- attr_accessor :SrcText, :TargetText
2108
-
2109
- def initialize(srctext=nil, targettext=nil)
2110
- @SrcText = srctext
2111
- @TargetText = targettext
2112
- end
2113
-
2114
- def deserialize(params)
2115
- @SrcText = params['SrcText']
2116
- @TargetText = params['TargetText']
2117
- end
2118
- end
2119
-
2120
- # TextSimilarityPro返回参数结构体
2121
- class TextSimilarityProResponse < TencentCloud::Common::AbstractModel
2122
- # @param Similarity: 每个目标句子与源句子的相似度分值,按照分值降序排列
2123
- # @type Similarity: Array
2124
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2125
- # @type RequestId: String
2126
-
2127
- attr_accessor :Similarity, :RequestId
2128
-
2129
- def initialize(similarity=nil, requestid=nil)
2130
- @Similarity = similarity
2131
- @RequestId = requestid
2132
- end
2133
-
2134
- def deserialize(params)
2135
- unless params['Similarity'].nil?
2136
- @Similarity = []
2137
- params['Similarity'].each do |i|
2138
- similarity_tmp = Similarity.new
2139
- similarity_tmp.deserialize(i)
2140
- @Similarity << similarity_tmp
2141
- end
2142
- end
2143
- @RequestId = params['RequestId']
2144
- end
2145
- end
2146
-
2147
- # TextSimilarity请求参数结构体
2148
- class TextSimilarityRequest < TencentCloud::Common::AbstractModel
2149
- # @param SrcText: 需要与目标句子计算相似度的源句子(仅支持UTF-8格式,不超过500字符)
2150
- # @type SrcText: String
2151
- # @param TargetText: 目标句子(以句子数量为单位消耗资源包)
2152
- # @type TargetText: Array
2153
-
2154
- attr_accessor :SrcText, :TargetText
2155
-
2156
- def initialize(srctext=nil, targettext=nil)
2157
- @SrcText = srctext
2158
- @TargetText = targettext
2159
- end
2160
-
2161
- def deserialize(params)
2162
- @SrcText = params['SrcText']
2163
- @TargetText = params['TargetText']
2164
- end
2165
- end
2166
-
2167
- # TextSimilarity返回参数结构体
2168
- class TextSimilarityResponse < TencentCloud::Common::AbstractModel
2169
- # @param Similarity: 每个目标句子与源句子的相似度分值,按照分值降序排列
2170
- # @type Similarity: Array
2171
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2172
- # @type RequestId: String
2173
-
2174
- attr_accessor :Similarity, :RequestId
2175
-
2176
- def initialize(similarity=nil, requestid=nil)
2177
- @Similarity = similarity
2178
- @RequestId = requestid
2179
- end
2180
-
2181
- def deserialize(params)
2182
- unless params['Similarity'].nil?
2183
- @Similarity = []
2184
- params['Similarity'].each do |i|
2185
- similarity_tmp = Similarity.new
2186
- similarity_tmp.deserialize(i)
2187
- @Similarity << similarity_tmp
2188
- end
2189
- end
2190
- @RequestId = params['RequestId']
2191
- end
2192
- end
2193
-
2194
815
  # TextWriting请求参数结构体
2195
816
  class TextWritingRequest < TencentCloud::Common::AbstractModel
2196
817
  # @param Text: 待续写的句子,文本统一使用utf-8格式编码,长度不超过200字符。
@@ -2261,150 +882,6 @@ module TencentCloud
2261
882
  end
2262
883
  end
2263
884
 
2264
- # UpdateDict请求参数结构体
2265
- class UpdateDictRequest < TencentCloud::Common::AbstractModel
2266
- # @param DictId: 自定义词库ID。
2267
- # @type DictId: String
2268
- # @param Description: 词库描述,不超过100字。
2269
- # @type Description: String
2270
- # @param Name: 词库名称,不超过20字。
2271
- # @type Name: String
2272
-
2273
- attr_accessor :DictId, :Description, :Name
2274
-
2275
- def initialize(dictid=nil, description=nil, name=nil)
2276
- @DictId = dictid
2277
- @Description = description
2278
- @Name = name
2279
- end
2280
-
2281
- def deserialize(params)
2282
- @DictId = params['DictId']
2283
- @Description = params['Description']
2284
- @Name = params['Name']
2285
- end
2286
- end
2287
-
2288
- # UpdateDict返回参数结构体
2289
- class UpdateDictResponse < TencentCloud::Common::AbstractModel
2290
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2291
- # @type RequestId: String
2292
-
2293
- attr_accessor :RequestId
2294
-
2295
- def initialize(requestid=nil)
2296
- @RequestId = requestid
2297
- end
2298
-
2299
- def deserialize(params)
2300
- @RequestId = params['RequestId']
2301
- end
2302
- end
2303
-
2304
- # WordEmbedding请求参数结构体
2305
- class WordEmbeddingRequest < TencentCloud::Common::AbstractModel
2306
- # @param Text: 输入的词语(仅支持UTF-8格式,不超过20字)
2307
- # @type Text: String
2308
-
2309
- attr_accessor :Text
2310
-
2311
- def initialize(text=nil)
2312
- @Text = text
2313
- end
2314
-
2315
- def deserialize(params)
2316
- @Text = params['Text']
2317
- end
2318
- end
2319
-
2320
- # WordEmbedding返回参数结构体
2321
- class WordEmbeddingResponse < TencentCloud::Common::AbstractModel
2322
- # @param Vector: 词向量数组
2323
- # @type Vector: Array
2324
- # @param Dimension: 词向量的维度
2325
- # @type Dimension: Integer
2326
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2327
- # @type RequestId: String
2328
-
2329
- attr_accessor :Vector, :Dimension, :RequestId
2330
-
2331
- def initialize(vector=nil, dimension=nil, requestid=nil)
2332
- @Vector = vector
2333
- @Dimension = dimension
2334
- @RequestId = requestid
2335
- end
2336
-
2337
- def deserialize(params)
2338
- @Vector = params['Vector']
2339
- @Dimension = params['Dimension']
2340
- @RequestId = params['RequestId']
2341
- end
2342
- end
2343
-
2344
- # 词条信息。
2345
- class WordItem < TencentCloud::Common::AbstractModel
2346
- # @param Text: 词条文本内容。
2347
- # @type Text: String
2348
- # @param CreateTime: 词条创建时间。
2349
- # @type CreateTime: String
2350
- # @param Pos: 词条的词性。
2351
- # @type Pos: String
2352
-
2353
- attr_accessor :Text, :CreateTime, :Pos
2354
-
2355
- def initialize(text=nil, createtime=nil, pos=nil)
2356
- @Text = text
2357
- @CreateTime = createtime
2358
- @Pos = pos
2359
- end
2360
-
2361
- def deserialize(params)
2362
- @Text = params['Text']
2363
- @CreateTime = params['CreateTime']
2364
- @Pos = params['Pos']
2365
- end
2366
- end
2367
-
2368
- # WordSimilarity请求参数结构体
2369
- class WordSimilarityRequest < TencentCloud::Common::AbstractModel
2370
- # @param SrcWord: 计算相似度的源词(仅支持UTF-8格式,不超过20字)
2371
- # @type SrcWord: String
2372
- # @param TargetWord: 计算相似度的目标词(仅支持UTF-8格式,不超过20字)
2373
- # @type TargetWord: String
2374
-
2375
- attr_accessor :SrcWord, :TargetWord
2376
-
2377
- def initialize(srcword=nil, targetword=nil)
2378
- @SrcWord = srcword
2379
- @TargetWord = targetword
2380
- end
2381
-
2382
- def deserialize(params)
2383
- @SrcWord = params['SrcWord']
2384
- @TargetWord = params['TargetWord']
2385
- end
2386
- end
2387
-
2388
- # WordSimilarity返回参数结构体
2389
- class WordSimilarityResponse < TencentCloud::Common::AbstractModel
2390
- # @param Similarity: 两个词语的相似度
2391
- # @type Similarity: Float
2392
- # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2393
- # @type RequestId: String
2394
-
2395
- attr_accessor :Similarity, :RequestId
2396
-
2397
- def initialize(similarity=nil, requestid=nil)
2398
- @Similarity = similarity
2399
- @RequestId = requestid
2400
- end
2401
-
2402
- def deserialize(params)
2403
- @Similarity = params['Similarity']
2404
- @RequestId = params['RequestId']
2405
- end
2406
- end
2407
-
2408
885
  # 文本续写结果
2409
886
  class Writing < TencentCloud::Common::AbstractModel
2410
887
  # @param TargetText: 续写的文本。