tencentcloud-sdk-nlp 3.0.1098 → 3.0.1209

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3ff48997819e0ee43db4a937140b611800a0f4b2
4
- data.tar.gz: 770cc92b66dd9eaab6044d3ab55d8516caacf50e
3
+ metadata.gz: a55e5b20418caded47ba91d061fc1632368e2bc3
4
+ data.tar.gz: bc4af6c2f952bf69f4d278cecf567751689185cb
5
5
  SHA512:
6
- metadata.gz: 722cacdd0d50c07a15022d59047cb15d670d24c6c15fe52e43603f4565095e93ced70fc9d247606882db5a703d187a636cf574dcd6eaf1ce1d7e1c326bc9a8f4
7
- data.tar.gz: adfbb19271d4861cb7d3c98f1c18e3a9be05ec94b680f1e35ef3139913853ea0b38b0fb9862df2dd3cecac46dfaa83f90e22a57c9a1722b046400b30b5dd2d8d
6
+ metadata.gz: 9d971e9eebcf1360a5bb3cda42709c6ed2aee72050fb62d875f09685b17efb0da75c725bb6fc06c3106a2d2e2d5c563c74b684c18e7b2b4b7c215ed3f4115ade
7
+ data.tar.gz: 0c505910989aabfc91c35765f6470c750e4c47537e0977f6728c77ad1589582d612a5c4613d6c964ea443407e1e4ffe1f5ea0c55832e32b2616fd716e237b1f2
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.1098
1
+ 3.0.1209
@@ -53,78 +53,6 @@ module TencentCloud
53
53
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
54
54
  end
55
55
 
56
- # 文本分类接口能够对用户输入的文章进行自动分类,将其映射到具体的类目上,用户只需要提供待分类的文本,而无需关注具体实现。该功能定义了一套较为完备的[三级分类体系](https://cloud.tencent.com/document/product/271/94286),积累了数百万的语料,经过多轮迭代优化打造了较先进的深度学习模型,以保证效果不断提升。
57
-
58
- # @param request: Request instance for ClassifyContent.
59
- # @type request: :class:`Tencentcloud::nlp::V20190408::ClassifyContentRequest`
60
- # @rtype: :class:`Tencentcloud::nlp::V20190408::ClassifyContentResponse`
61
- def ClassifyContent(request)
62
- body = send_request('ClassifyContent', request.serialize)
63
- response = JSON.parse(body)
64
- if response['Response'].key?('Error') == false
65
- model = ClassifyContentResponse.new
66
- model.deserialize(response['Response'])
67
- model
68
- else
69
- code = response['Response']['Error']['Code']
70
- message = response['Response']['Error']['Message']
71
- reqid = response['Response']['RequestId']
72
- raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
73
- end
74
- rescue TencentCloud::Common::TencentCloudSDKException => e
75
- raise e
76
- rescue StandardError => e
77
- raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
78
- end
79
-
80
- # 对联生成接口根据用户输入的命题关键词,智能生成一副完整的春联,包括上联、下联和横批。该接口利用先进的自然语言处理技术,确保生成的春联既符合传统对仗、对韵、对义的要求,又具有新意和创意,为用户提供独特的春节祝福。
81
-
82
- # @param request: Request instance for ComposeCouplet.
83
- # @type request: :class:`Tencentcloud::nlp::V20190408::ComposeCoupletRequest`
84
- # @rtype: :class:`Tencentcloud::nlp::V20190408::ComposeCoupletResponse`
85
- def ComposeCouplet(request)
86
- body = send_request('ComposeCouplet', request.serialize)
87
- response = JSON.parse(body)
88
- if response['Response'].key?('Error') == false
89
- model = ComposeCoupletResponse.new
90
- model.deserialize(response['Response'])
91
- model
92
- else
93
- code = response['Response']['Error']['Code']
94
- message = response['Response']['Error']['Message']
95
- reqid = response['Response']['RequestId']
96
- raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
97
- end
98
- rescue TencentCloud::Common::TencentCloudSDKException => e
99
- raise e
100
- rescue StandardError => e
101
- raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
102
- end
103
-
104
- # 通过计算句子间的语义相似性,帮助您快速找到文本中重复或相似的句子,用于文本聚类、相似问题检索等应用场景。
105
-
106
- # @param request: Request instance for EvaluateSentenceSimilarity.
107
- # @type request: :class:`Tencentcloud::nlp::V20190408::EvaluateSentenceSimilarityRequest`
108
- # @rtype: :class:`Tencentcloud::nlp::V20190408::EvaluateSentenceSimilarityResponse`
109
- def EvaluateSentenceSimilarity(request)
110
- body = send_request('EvaluateSentenceSimilarity', request.serialize)
111
- response = JSON.parse(body)
112
- if response['Response'].key?('Error') == false
113
- model = EvaluateSentenceSimilarityResponse.new
114
- model.deserialize(response['Response'])
115
- model
116
- else
117
- code = response['Response']['Error']['Code']
118
- message = response['Response']['Error']['Message']
119
- reqid = response['Response']['RequestId']
120
- raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
121
- end
122
- rescue TencentCloud::Common::TencentCloudSDKException => e
123
- raise e
124
- rescue StandardError => e
125
- raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
126
- end
127
-
128
56
  # 通过精准地对文本进行分词、词性标注、命名实体识别等功能,助您更好地理解文本内容,挖掘出潜在的价值信息。
129
57
 
130
58
  # @param request: Request instance for ParseWords.
@@ -96,144 +96,6 @@ module TencentCloud
96
96
  end
97
97
  end
98
98
 
99
- # 分类详细信息
100
- class Category < TencentCloud::Common::AbstractModel
101
- # @param Id: 分类id。
102
- # 注意:此字段可能返回 null,表示取不到有效值。
103
- # @type Id: Integer
104
- # @param Label: 分类英文名。
105
- # 注意:此字段可能返回 null,表示取不到有效值。
106
- # @type Label: String
107
- # @param Name: 分类中文名。
108
- # 注意:此字段可能返回 null,表示取不到有效值。
109
- # @type Name: String
110
- # @param Score: 分类置信度。
111
- # 注意:此字段可能返回 null,表示取不到有效值。
112
- # @type Score: Float
113
-
114
- attr_accessor :Id, :Label, :Name, :Score
115
-
116
- def initialize(id=nil, label=nil, name=nil, score=nil)
117
- @Id = id
118
- @Label = label
119
- @Name = name
120
- @Score = score
121
- end
122
-
123
- def deserialize(params)
124
- @Id = params['Id']
125
- @Label = params['Label']
126
- @Name = params['Name']
127
- @Score = params['Score']
128
- end
129
- end
130
-
131
- # ClassifyContent请求参数结构体
132
- class ClassifyContentRequest < TencentCloud::Common::AbstractModel
133
- # @param Title: 待分类的文章的标题(仅支持UTF-8格式,不超过100字符)。
134
- # @type Title: String
135
- # @param Content: 待分类文章的内容, 每个元素对应一个段落。(仅支持UTF-8格式,文章内容长度总和不超过2000字符)
136
- # @type Content: Array
137
-
138
- attr_accessor :Title, :Content
139
-
140
- def initialize(title=nil, content=nil)
141
- @Title = title
142
- @Content = content
143
- end
144
-
145
- def deserialize(params)
146
- @Title = params['Title']
147
- @Content = params['Content']
148
- end
149
- end
150
-
151
- # ClassifyContent返回参数结构体
152
- class ClassifyContentResponse < TencentCloud::Common::AbstractModel
153
- # @param FirstClassification: 一级分类。(请参见附录[三级分类体系表](https://cloud.tencent.com/document/product/271/94286))
154
- # @type FirstClassification: :class:`Tencentcloud::Nlp.v20190408.models.Category`
155
- # @param SecondClassification: 二级分类。(请参见附录[三级分类体系表](https://cloud.tencent.com/document/product/271/94286))
156
- # @type SecondClassification: :class:`Tencentcloud::Nlp.v20190408.models.Category`
157
- # @param ThirdClassification: 三级分类。(请参见附录[三级分类体系表](https://cloud.tencent.com/document/product/271/94286))
158
- # 注意:此字段可能返回 null,表示取不到有效值。
159
- # @type ThirdClassification: :class:`Tencentcloud::Nlp.v20190408.models.Category`
160
- # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
161
- # @type RequestId: String
162
-
163
- attr_accessor :FirstClassification, :SecondClassification, :ThirdClassification, :RequestId
164
-
165
- def initialize(firstclassification=nil, secondclassification=nil, thirdclassification=nil, requestid=nil)
166
- @FirstClassification = firstclassification
167
- @SecondClassification = secondclassification
168
- @ThirdClassification = thirdclassification
169
- @RequestId = requestid
170
- end
171
-
172
- def deserialize(params)
173
- unless params['FirstClassification'].nil?
174
- @FirstClassification = Category.new
175
- @FirstClassification.deserialize(params['FirstClassification'])
176
- end
177
- unless params['SecondClassification'].nil?
178
- @SecondClassification = Category.new
179
- @SecondClassification.deserialize(params['SecondClassification'])
180
- end
181
- unless params['ThirdClassification'].nil?
182
- @ThirdClassification = Category.new
183
- @ThirdClassification.deserialize(params['ThirdClassification'])
184
- end
185
- @RequestId = params['RequestId']
186
- end
187
- end
188
-
189
- # ComposeCouplet请求参数结构体
190
- class ComposeCoupletRequest < TencentCloud::Common::AbstractModel
191
- # @param Text: 生成对联的关键词。长度需>=2,当长度>2时,自动截取前两个字作为关键字。内容需为常用汉字(不含有数字、英文、韩语、日语、符号等等其他)。
192
- # @type Text: String
193
- # @param TargetType: 返回的文本结果为繁体还是简体。0:简体;1:繁体。默认为0。
194
- # @type TargetType: Integer
195
-
196
- attr_accessor :Text, :TargetType
197
-
198
- def initialize(text=nil, targettype=nil)
199
- @Text = text
200
- @TargetType = targettype
201
- end
202
-
203
- def deserialize(params)
204
- @Text = params['Text']
205
- @TargetType = params['TargetType']
206
- end
207
- end
208
-
209
- # ComposeCouplet返回参数结构体
210
- class ComposeCoupletResponse < TencentCloud::Common::AbstractModel
211
- # @param TopScroll: 横批。
212
- # @type TopScroll: String
213
- # @param Content: 上联与下联。
214
- # @type Content: Array
215
- # @param RandomCause: 当对联随机生成时,展示随机生成原因。
216
- # @type RandomCause: String
217
- # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
218
- # @type RequestId: String
219
-
220
- attr_accessor :TopScroll, :Content, :RandomCause, :RequestId
221
-
222
- def initialize(topscroll=nil, content=nil, randomcause=nil, requestid=nil)
223
- @TopScroll = topscroll
224
- @Content = content
225
- @RandomCause = randomcause
226
- @RequestId = requestid
227
- end
228
-
229
- def deserialize(params)
230
- @TopScroll = params['TopScroll']
231
- @Content = params['Content']
232
- @RandomCause = params['RandomCause']
233
- @RequestId = params['RequestId']
234
- end
235
- end
236
-
237
99
  # 复合粒度分词和词性标注的结果。
238
100
  class CompoundParticiple < TencentCloud::Common::AbstractModel
239
101
  # @param Word: 基础词。
@@ -345,49 +207,6 @@ module TencentCloud
345
207
  end
346
208
  end
347
209
 
348
- # EvaluateSentenceSimilarity请求参数结构体
349
- class EvaluateSentenceSimilarityRequest < TencentCloud::Common::AbstractModel
350
- # @param SentencePairList: 待分析的句子对数组。句子对应不超过1对,仅支持中文文本,原句子与目标句子均应不超过500字符。
351
- # @type SentencePairList: Array
352
-
353
- attr_accessor :SentencePairList
354
-
355
- def initialize(sentencepairlist=nil)
356
- @SentencePairList = sentencepairlist
357
- end
358
-
359
- def deserialize(params)
360
- unless params['SentencePairList'].nil?
361
- @SentencePairList = []
362
- params['SentencePairList'].each do |i|
363
- sentencepair_tmp = SentencePair.new
364
- sentencepair_tmp.deserialize(i)
365
- @SentencePairList << sentencepair_tmp
366
- end
367
- end
368
- end
369
- end
370
-
371
- # EvaluateSentenceSimilarity返回参数结构体
372
- class EvaluateSentenceSimilarityResponse < TencentCloud::Common::AbstractModel
373
- # @param ScoreList: 每个句子对的相似度分值。
374
- # @type ScoreList: Array
375
- # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
376
- # @type RequestId: String
377
-
378
- attr_accessor :ScoreList, :RequestId
379
-
380
- def initialize(scorelist=nil, requestid=nil)
381
- @ScoreList = scorelist
382
- @RequestId = requestid
383
- end
384
-
385
- def deserialize(params)
386
- @ScoreList = params['ScoreList']
387
- @RequestId = params['RequestId']
388
- end
389
- end
390
-
391
210
  # ParseWords请求参数结构体
392
211
  class ParseWordsRequest < TencentCloud::Common::AbstractModel
393
212
  # @param Text: 待分析的文本(支持中英文文本,不超过500字符)
@@ -501,26 +320,6 @@ module TencentCloud
501
320
  end
502
321
  end
503
322
 
504
- # 待分析的句子对
505
- class SentencePair < TencentCloud::Common::AbstractModel
506
- # @param SourceText: 需要与目标句子计算相似度的源句子。(仅支持UTF-8格式,不超过500字符)
507
- # @type SourceText: String
508
- # @param TargetText: 目标句子。(仅支持UTF-8格式,不超过500字符)
509
- # @type TargetText: String
510
-
511
- attr_accessor :SourceText, :TargetText
512
-
513
- def initialize(sourcetext=nil, targettext=nil)
514
- @SourceText = sourcetext
515
- @TargetText = targettext
516
- end
517
-
518
- def deserialize(params)
519
- @SourceText = params['SourceText']
520
- @TargetText = params['TargetText']
521
- end
522
- end
523
-
524
323
  end
525
324
  end
526
325
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tencentcloud-sdk-nlp
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1098
4
+ version: 3.0.1209
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tencent Cloud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-07-10 00:00:00.000000000 Z
11
+ date: 2026-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tencentcloud-sdk-common
@@ -33,9 +33,9 @@ executables: []
33
33
  extensions: []
34
34
  extra_rdoc_files: []
35
35
  files:
36
+ - lib/tencentcloud-sdk-nlp.rb
36
37
  - lib/v20190408/client.rb
37
38
  - lib/v20190408/models.rb
38
- - lib/tencentcloud-sdk-nlp.rb
39
39
  - lib/VERSION
40
40
  homepage: https://github.com/TencentCloud/tencentcloud-sdk-ruby
41
41
  licenses: