tencentcloud-sdk-ecc 1.0.200

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9836cfba211bcc0073c61a9e1094ea37eac30503
4
+ data.tar.gz: b32278f84c43919aadf3b5c56a4a98780e1522b2
5
+ SHA512:
6
+ metadata.gz: d23f85d2387c22e9fbfcf597cdb76e6fa872ff7a876d491f2a570e85b824cb8676dfced6354230f132f1fdbc94caf11d01d5422f3700a104244db6928f3f28df
7
+ data.tar.gz: 5c2670aa67cb3b4c5e4c1aec4b6e1389cb21a610832e62c5769f7894fc4162ac0afd9e6cbb34fc85f036c2d746d06d8ff83ddff39ea49e3592d5547e629d82b6
data/lib/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.200
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tencentcloud-sdk-common'
4
+
5
+ require_relative 'v20181213/client'
6
+ require_relative 'v20181213/models'
7
+
8
+ module TencentCloud
9
+ module Ecc
10
+ end
11
+ end
@@ -0,0 +1,135 @@
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
+ require 'json'
18
+
19
+ module TencentCloud
20
+ module Ecc
21
+ module V20181213
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2018-12-13'
26
+ api_endpoint = 'ecc.tencentcloudapi.com'
27
+ sdk_version = 'ECC_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # https://ecc.tencentcloudapi.com/?Action=CorrectMultiImage
33
+ # 多图像识别批改接口
34
+
35
+ # @param request: Request instance for CorrectMultiImage.
36
+ # @type request: :class:`Tencentcloud::ecc::V20181213::CorrectMultiImageRequest`
37
+ # @rtype: :class:`Tencentcloud::ecc::V20181213::CorrectMultiImageResponse`
38
+ def CorrectMultiImage(request)
39
+ body = send_request('CorrectMultiImage', request.serialize)
40
+ response = JSON.parse(body)
41
+ if response['Response'].key?('Error') == false
42
+ model = CorrectMultiImageResponse.new
43
+ model.deserialize(response['Response'])
44
+ model
45
+ else
46
+ code = response['Response']['Error']['Code']
47
+ message = response['Response']['Error']['Message']
48
+ reqid = response['Response']['RequestId']
49
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
50
+ end
51
+ rescue TencentCloud::Common::TencentCloudSDKException => e
52
+ raise e
53
+ rescue StandardError => e
54
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
55
+ end
56
+
57
+ # 异步任务结果查询接口
58
+
59
+ # @param request: Request instance for DescribeTask.
60
+ # @type request: :class:`Tencentcloud::ecc::V20181213::DescribeTaskRequest`
61
+ # @rtype: :class:`Tencentcloud::ecc::V20181213::DescribeTaskResponse`
62
+ def DescribeTask(request)
63
+ body = send_request('DescribeTask', request.serialize)
64
+ response = JSON.parse(body)
65
+ if response['Response'].key?('Error') == false
66
+ model = DescribeTaskResponse.new
67
+ model.deserialize(response['Response'])
68
+ model
69
+ else
70
+ code = response['Response']['Error']['Code']
71
+ message = response['Response']['Error']['Message']
72
+ reqid = response['Response']['RequestId']
73
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
74
+ end
75
+ rescue TencentCloud::Common::TencentCloudSDKException => e
76
+ raise e
77
+ rescue StandardError => e
78
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
79
+ end
80
+
81
+ # 接口请求域名: ecc.tencentcloudapi.com
82
+ # 纯文本英语作文批改
83
+
84
+ # @param request: Request instance for ECC.
85
+ # @type request: :class:`Tencentcloud::ecc::V20181213::ECCRequest`
86
+ # @rtype: :class:`Tencentcloud::ecc::V20181213::ECCResponse`
87
+ def ECC(request)
88
+ body = send_request('ECC', request.serialize)
89
+ response = JSON.parse(body)
90
+ if response['Response'].key?('Error') == false
91
+ model = ECCResponse.new
92
+ model.deserialize(response['Response'])
93
+ model
94
+ else
95
+ code = response['Response']['Error']['Code']
96
+ message = response['Response']['Error']['Message']
97
+ reqid = response['Response']['RequestId']
98
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
99
+ end
100
+ rescue TencentCloud::Common::TencentCloudSDKException => e
101
+ raise e
102
+ rescue StandardError => e
103
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
104
+ end
105
+
106
+ # https://ecc.tencentcloudapi.com/?Action=EHOCR
107
+ # 图像识别批改接口
108
+
109
+ # @param request: Request instance for EHOCR.
110
+ # @type request: :class:`Tencentcloud::ecc::V20181213::EHOCRRequest`
111
+ # @rtype: :class:`Tencentcloud::ecc::V20181213::EHOCRResponse`
112
+ def EHOCR(request)
113
+ body = send_request('EHOCR', request.serialize)
114
+ response = JSON.parse(body)
115
+ if response['Response'].key?('Error') == false
116
+ model = EHOCRResponse.new
117
+ model.deserialize(response['Response'])
118
+ model
119
+ else
120
+ code = response['Response']['Error']['Code']
121
+ message = response['Response']['Error']['Message']
122
+ reqid = response['Response']['RequestId']
123
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
124
+ end
125
+ rescue TencentCloud::Common::TencentCloudSDKException => e
126
+ raise e
127
+ rescue StandardError => e
128
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
129
+ end
130
+
131
+
132
+ end
133
+ end
134
+ end
135
+ end
@@ -0,0 +1,572 @@
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 Ecc
19
+ module V20181213
20
+ # 作文批改每个维度名字与得分
21
+ class Aspect < TencentCloud::Common::AbstractModel
22
+ # @param Name: 维度名字
23
+ # @type Name: String
24
+ # @param Score: 维度得分
25
+ # @type Score: Float
26
+ # @param Percentage: 维度分数占比
27
+ # @type Percentage: Float
28
+
29
+ attr_accessor :Name, :Score, :Percentage
30
+
31
+ def initialize(name=nil, score=nil, percentage=nil)
32
+ @Name = name
33
+ @Score = score
34
+ @Percentage = percentage
35
+ end
36
+
37
+ def deserialize(params)
38
+ @Name = params['Name']
39
+ @Score = params['Score']
40
+ @Percentage = params['Percentage']
41
+ end
42
+ end
43
+
44
+ # 图像识别批改接口返回的作文文本信息或批改信息
45
+ class CompostionContext < TencentCloud::Common::AbstractModel
46
+ # @param Content: 作文内容
47
+ # @type Content: String
48
+ # @param CorrectData: 批改结果
49
+ # 注意:此字段可能返回 null,表示取不到有效值。
50
+ # @type CorrectData: :class:`Tencentcloud::Ecc.v20181213.models.CorrectData`
51
+ # @param TaskId: 任务 id,用于查询接口
52
+ # 注意:此字段可能返回 null,表示取不到有效值。
53
+ # @type TaskId: String
54
+ # @param SessionId: 图像识别唯一标识,一次识别一个 SessionId
55
+ # 注意:此字段可能返回 null,表示取不到有效值。
56
+ # @type SessionId: String
57
+
58
+ attr_accessor :Content, :CorrectData, :TaskId, :SessionId
59
+
60
+ def initialize(content=nil, correctdata=nil, taskid=nil, sessionid=nil)
61
+ @Content = content
62
+ @CorrectData = correctdata
63
+ @TaskId = taskid
64
+ @SessionId = sessionid
65
+ end
66
+
67
+ def deserialize(params)
68
+ @Content = params['Content']
69
+ unless params['CorrectData'].nil?
70
+ @CorrectData = CorrectData.new
71
+ @CorrectData.deserialize(params['CorrectData'])
72
+ end
73
+ @TaskId = params['TaskId']
74
+ @SessionId = params['SessionId']
75
+ end
76
+ end
77
+
78
+ # 批改的结果
79
+ class CorrectData < TencentCloud::Common::AbstractModel
80
+ # @param Score: 总得分
81
+ # @type Score: Float
82
+ # @param ScoreCat: 各项得分详情
83
+ # @type ScoreCat: :class:`Tencentcloud::Ecc.v20181213.models.ScoreCategory`
84
+ # @param Comment: 综合评价
85
+ # @type Comment: String
86
+ # @param SentenceComments: 句子点评
87
+ # @type SentenceComments: Array
88
+
89
+ attr_accessor :Score, :ScoreCat, :Comment, :SentenceComments
90
+
91
+ def initialize(score=nil, scorecat=nil, comment=nil, sentencecomments=nil)
92
+ @Score = score
93
+ @ScoreCat = scorecat
94
+ @Comment = comment
95
+ @SentenceComments = sentencecomments
96
+ end
97
+
98
+ def deserialize(params)
99
+ @Score = params['Score']
100
+ unless params['ScoreCat'].nil?
101
+ @ScoreCat = ScoreCategory.new
102
+ @ScoreCat.deserialize(params['ScoreCat'])
103
+ end
104
+ @Comment = params['Comment']
105
+ unless params['SentenceComments'].nil?
106
+ @SentenceComments = []
107
+ params['SentenceComments'].each do |i|
108
+ sentencecom_tmp = SentenceCom.new
109
+ sentencecom_tmp.deserialize(i)
110
+ @SentenceComments << sentencecom_tmp
111
+ end
112
+ end
113
+ end
114
+ end
115
+
116
+ # CorrectMultiImage请求参数结构体
117
+ class CorrectMultiImageRequest < TencentCloud::Common::AbstractModel
118
+ # @param Image: 图片的url链接或base64数据。每张图片数据作为数组的一个元素,数组个数与图片个数保持一致。存放类别依据InputType而定,url与base64编码不能混合使用。
119
+ # @type Image: Array
120
+ # @param InputType: 输出图片类型,0 表示 Image 字段是图片所在的 url,1 表示 Image 字段是 base64 编码后的图像数据。
121
+ # @type InputType: Integer
122
+ # @param EccAppid: 业务应用ID,与账号应用APPID无关,是用来方便客户管理服务的参数。
123
+ # @type EccAppid: String
124
+ # @param SessionId: 图像识别唯一标识,一次识别一个 SessionId,使用识别功能时 SessionId 可用于使用文本批改接口,此时按图像批改价格收费;如使用文本批改接口时没有传入 SessionId,则需要收取文本批改的费用。
125
+ # @type SessionId: String
126
+ # @param ServerType: 服务类型,0:“多图像识别”,只返回识别结果;1:“多图像批改”,同时返回识别结果与批改结果。默认为 0。
127
+ # @type ServerType: Integer
128
+ # @param Title: 作文题目,可选参数
129
+ # @type Title: String
130
+ # @param Grade: 年级标准, 默认以 cet4 为标准,取值与意义如下:elementary 小学,grade7 grade8 grade9分别对应初一,初二,初三。 grade10 grade11 grade12 分别对应高一,高二,高三,以及 cet4 和 cet6 分别表示 英语4级和6级。
131
+ # @type Grade: String
132
+ # @param Requirement: 作文提纲,可选参数,作文的写作要求。
133
+ # @type Requirement: String
134
+ # @param ModelTitle: 范文标题,可选参数,本接口可以依据提供的范文对作文进行评分。
135
+ # @type ModelTitle: String
136
+ # @param ModelContent: 范文内容,可选参数,同上,范文的正文部分。
137
+ # @type ModelContent: String
138
+ # @param IsAsync: 异步模式标识,0:同步模式,1:异步模式。默认为同步模式
139
+ # @type IsAsync: Integer
140
+
141
+ attr_accessor :Image, :InputType, :EccAppid, :SessionId, :ServerType, :Title, :Grade, :Requirement, :ModelTitle, :ModelContent, :IsAsync
142
+
143
+ def initialize(image=nil, inputtype=nil, eccappid=nil, sessionid=nil, servertype=nil, title=nil, grade=nil, requirement=nil, modeltitle=nil, modelcontent=nil, isasync=nil)
144
+ @Image = image
145
+ @InputType = inputtype
146
+ @EccAppid = eccappid
147
+ @SessionId = sessionid
148
+ @ServerType = servertype
149
+ @Title = title
150
+ @Grade = grade
151
+ @Requirement = requirement
152
+ @ModelTitle = modeltitle
153
+ @ModelContent = modelcontent
154
+ @IsAsync = isasync
155
+ end
156
+
157
+ def deserialize(params)
158
+ @Image = params['Image']
159
+ @InputType = params['InputType']
160
+ @EccAppid = params['EccAppid']
161
+ @SessionId = params['SessionId']
162
+ @ServerType = params['ServerType']
163
+ @Title = params['Title']
164
+ @Grade = params['Grade']
165
+ @Requirement = params['Requirement']
166
+ @ModelTitle = params['ModelTitle']
167
+ @ModelContent = params['ModelContent']
168
+ @IsAsync = params['IsAsync']
169
+ end
170
+ end
171
+
172
+ # CorrectMultiImage返回参数结构体
173
+ class CorrectMultiImageResponse < TencentCloud::Common::AbstractModel
174
+ # @param Data: 接口返回数据
175
+ # @type Data: :class:`Tencentcloud::Ecc.v20181213.models.CompostionContext`
176
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
177
+ # @type RequestId: String
178
+
179
+ attr_accessor :Data, :RequestId
180
+
181
+ def initialize(data=nil, requestid=nil)
182
+ @Data = data
183
+ @RequestId = requestid
184
+ end
185
+
186
+ def deserialize(params)
187
+ unless params['Data'].nil?
188
+ @Data = CompostionContext.new
189
+ @Data.deserialize(params['Data'])
190
+ end
191
+ @RequestId = params['RequestId']
192
+ end
193
+ end
194
+
195
+ # DescribeTask请求参数结构体
196
+ class DescribeTaskRequest < TencentCloud::Common::AbstractModel
197
+ # @param TaskId: 任务 ID
198
+ # @type TaskId: String
199
+ # @param EccAppid: 业务应用ID,与账号应用APPID无关,是用来方便客户管理服务的参数(暂时无需传入)。
200
+ # @type EccAppid: String
201
+
202
+ attr_accessor :TaskId, :EccAppid
203
+
204
+ def initialize(taskid=nil, eccappid=nil)
205
+ @TaskId = taskid
206
+ @EccAppid = eccappid
207
+ end
208
+
209
+ def deserialize(params)
210
+ @TaskId = params['TaskId']
211
+ @EccAppid = params['EccAppid']
212
+ end
213
+ end
214
+
215
+ # DescribeTask返回参数结构体
216
+ class DescribeTaskResponse < TencentCloud::Common::AbstractModel
217
+ # @param Content: 作文识别文本
218
+ # 注意:此字段可能返回 null,表示取不到有效值。
219
+ # @type Content: String
220
+ # @param CorrectData: 整体的批改结果
221
+ # 注意:此字段可能返回 null,表示取不到有效值。
222
+ # @type CorrectData: :class:`Tencentcloud::Ecc.v20181213.models.CorrectData`
223
+ # @param Status: 任务状态,“Progressing”: 处理中(此时无结果返回)、“Finished”: 处理完成
224
+ # @type Status: String
225
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
226
+ # @type RequestId: String
227
+
228
+ attr_accessor :Content, :CorrectData, :Status, :RequestId
229
+
230
+ def initialize(content=nil, correctdata=nil, status=nil, requestid=nil)
231
+ @Content = content
232
+ @CorrectData = correctdata
233
+ @Status = status
234
+ @RequestId = requestid
235
+ end
236
+
237
+ def deserialize(params)
238
+ @Content = params['Content']
239
+ unless params['CorrectData'].nil?
240
+ @CorrectData = CorrectData.new
241
+ @CorrectData.deserialize(params['CorrectData'])
242
+ end
243
+ @Status = params['Status']
244
+ @RequestId = params['RequestId']
245
+ end
246
+ end
247
+
248
+ # ECC请求参数结构体
249
+ class ECCRequest < TencentCloud::Common::AbstractModel
250
+ # @param Content: 作文文本,必填
251
+ # @type Content: String
252
+ # @param Title: 作文题目,可选参数
253
+ # @type Title: String
254
+ # @param Grade: 年级标准, 默认以cet4为标准,取值与意义如下:elementary 小学,grade7 grade8 grade9分别对应初一,初二,初三。 grade10 grade11 grade12 分别对应高一,高二,高三,以及cet4和cet6 分别表示 英语4级和6级。
255
+ # @type Grade: String
256
+ # @param Requirement: 作文提纲,可选参数,作文的写作要求。
257
+ # @type Requirement: String
258
+ # @param ModelTitle: 范文标题,可选参数,本接口可以依据提供的范文对作文进行评分。
259
+ # @type ModelTitle: String
260
+ # @param ModelContent: 范文内容,可选参数,同上,范文的正文部分。
261
+ # @type ModelContent: String
262
+ # @param EccAppid: 业务应用ID,与账号应用APPID无关,是用来方便客户管理服务的参数(暂时无需传入)。
263
+ # @type EccAppid: String
264
+ # @param IsAsync: 异步模式标识,0:同步模式,1:异步模式,默认为同步模式
265
+ # @type IsAsync: Integer
266
+ # @param SessionId: 图像识别唯一标识,一次识别一个 SessionId。当传入此前识别接口使用过的 SessionId,则本次批改按图像批改价格收费;如使用了识别接口且本次没有传入 SessionId,则需要加取文本批改的费用;如果直接使用文本批改接口,则只收取文本批改的费用
267
+ # @type SessionId: String
268
+
269
+ attr_accessor :Content, :Title, :Grade, :Requirement, :ModelTitle, :ModelContent, :EccAppid, :IsAsync, :SessionId
270
+
271
+ def initialize(content=nil, title=nil, grade=nil, requirement=nil, modeltitle=nil, modelcontent=nil, eccappid=nil, isasync=nil, sessionid=nil)
272
+ @Content = content
273
+ @Title = title
274
+ @Grade = grade
275
+ @Requirement = requirement
276
+ @ModelTitle = modeltitle
277
+ @ModelContent = modelcontent
278
+ @EccAppid = eccappid
279
+ @IsAsync = isasync
280
+ @SessionId = sessionid
281
+ end
282
+
283
+ def deserialize(params)
284
+ @Content = params['Content']
285
+ @Title = params['Title']
286
+ @Grade = params['Grade']
287
+ @Requirement = params['Requirement']
288
+ @ModelTitle = params['ModelTitle']
289
+ @ModelContent = params['ModelContent']
290
+ @EccAppid = params['EccAppid']
291
+ @IsAsync = params['IsAsync']
292
+ @SessionId = params['SessionId']
293
+ end
294
+ end
295
+
296
+ # ECC返回参数结构体
297
+ class ECCResponse < TencentCloud::Common::AbstractModel
298
+ # @param Data: 整体的批改结果
299
+ # 注意:此字段可能返回 null,表示取不到有效值。
300
+ # @type Data: :class:`Tencentcloud::Ecc.v20181213.models.CorrectData`
301
+ # @param TaskId: 任务 id,用于查询接口
302
+ # 注意:此字段可能返回 null,表示取不到有效值。
303
+ # @type TaskId: String
304
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
305
+ # @type RequestId: String
306
+
307
+ attr_accessor :Data, :TaskId, :RequestId
308
+
309
+ def initialize(data=nil, taskid=nil, requestid=nil)
310
+ @Data = data
311
+ @TaskId = taskid
312
+ @RequestId = requestid
313
+ end
314
+
315
+ def deserialize(params)
316
+ unless params['Data'].nil?
317
+ @Data = CorrectData.new
318
+ @Data.deserialize(params['Data'])
319
+ end
320
+ @TaskId = params['TaskId']
321
+ @RequestId = params['RequestId']
322
+ end
323
+ end
324
+
325
+ # EHOCR请求参数结构体
326
+ class EHOCRRequest < TencentCloud::Common::AbstractModel
327
+ # @param Image: 图片所在的url或base64编码后的图像数据,依据InputType而定
328
+ # @type Image: String
329
+ # @param InputType: 输出图片类型,0 表示 Image 字段是图片所在的 url,1 表示 Image 字段是 base64 编码后的图像数据
330
+ # @type InputType: Integer
331
+ # @param EccAppid: 业务应用ID,与账号应用APPID无关,是用来方便客户管理服务的参数(暂时无需传入)。
332
+ # @type EccAppid: String
333
+ # @param SessionId: 图像识别唯一标识,一次识别一个 SessionId,使用识别功能时 SessionId 可用于使用文本批改接口,此时按图像批改价格收费;如使用文本批改接口时没有传入 SessionId,则需要收取文本批改的费用
334
+ # @type SessionId: String
335
+ # @param ServerType: 服务类型,0:“图像识别”,只返回识别结果,1:“图像批改”,同时返回识别结果与批改结果。默认为 0
336
+ # @type ServerType: Integer
337
+ # @param Title: 作文题目,可选参数
338
+ # @type Title: String
339
+ # @param Grade: 年级标准, 默认以 cet4 为标准,取值与意义如下:elementary 小学,grade7 grade8 grade9分别对应初一,初二,初三。 grade10 grade11 grade12 分别对应高一,高二,高三,以及 cet4 和 cet6 分别表示 英语4级和6级。
340
+ # @type Grade: String
341
+ # @param Requirement: 作文提纲,可选参数,作文的写作要求。
342
+ # @type Requirement: String
343
+ # @param ModelTitle: 范文标题,可选参数,本接口可以依据提供的范文对作文进行评分。
344
+ # @type ModelTitle: String
345
+ # @param ModelContent: 范文内容,可选参数,同上,范文的正文部分。
346
+ # @type ModelContent: String
347
+ # @param IsAsync: 异步模式标识,0:同步模式,1:异步模式。默认为同步模式
348
+ # @type IsAsync: Integer
349
+
350
+ attr_accessor :Image, :InputType, :EccAppid, :SessionId, :ServerType, :Title, :Grade, :Requirement, :ModelTitle, :ModelContent, :IsAsync
351
+
352
+ def initialize(image=nil, inputtype=nil, eccappid=nil, sessionid=nil, servertype=nil, title=nil, grade=nil, requirement=nil, modeltitle=nil, modelcontent=nil, isasync=nil)
353
+ @Image = image
354
+ @InputType = inputtype
355
+ @EccAppid = eccappid
356
+ @SessionId = sessionid
357
+ @ServerType = servertype
358
+ @Title = title
359
+ @Grade = grade
360
+ @Requirement = requirement
361
+ @ModelTitle = modeltitle
362
+ @ModelContent = modelcontent
363
+ @IsAsync = isasync
364
+ end
365
+
366
+ def deserialize(params)
367
+ @Image = params['Image']
368
+ @InputType = params['InputType']
369
+ @EccAppid = params['EccAppid']
370
+ @SessionId = params['SessionId']
371
+ @ServerType = params['ServerType']
372
+ @Title = params['Title']
373
+ @Grade = params['Grade']
374
+ @Requirement = params['Requirement']
375
+ @ModelTitle = params['ModelTitle']
376
+ @ModelContent = params['ModelContent']
377
+ @IsAsync = params['IsAsync']
378
+ end
379
+ end
380
+
381
+ # EHOCR返回参数结构体
382
+ class EHOCRResponse < TencentCloud::Common::AbstractModel
383
+ # @param Data: 接口返回数据
384
+ # @type Data: :class:`Tencentcloud::Ecc.v20181213.models.CompostionContext`
385
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
386
+ # @type RequestId: String
387
+
388
+ attr_accessor :Data, :RequestId
389
+
390
+ def initialize(data=nil, requestid=nil)
391
+ @Data = data
392
+ @RequestId = requestid
393
+ end
394
+
395
+ def deserialize(params)
396
+ unless params['Data'].nil?
397
+ @Data = CompostionContext.new
398
+ @Data.deserialize(params['Data'])
399
+ end
400
+ @RequestId = params['RequestId']
401
+ end
402
+ end
403
+
404
+ # 维度单词坐标
405
+ class ErrorCoordinate < TencentCloud::Common::AbstractModel
406
+ # @param Coordinate: 维度单词坐标
407
+ # @type Coordinate: Array
408
+
409
+ attr_accessor :Coordinate
410
+
411
+ def initialize(coordinate=nil)
412
+ @Coordinate = coordinate
413
+ end
414
+
415
+ def deserialize(params)
416
+ @Coordinate = params['Coordinate']
417
+ end
418
+ end
419
+
420
+ # 四个维度的得分
421
+ class ScoreCategory < TencentCloud::Common::AbstractModel
422
+ # @param Words: 词汇维度
423
+ # @type Words: :class:`Tencentcloud::Ecc.v20181213.models.Aspect`
424
+ # @param Sentences: 句子维度
425
+ # @type Sentences: :class:`Tencentcloud::Ecc.v20181213.models.Aspect`
426
+ # @param Structure: 篇章结构维度
427
+ # @type Structure: :class:`Tencentcloud::Ecc.v20181213.models.Aspect`
428
+ # @param Content: 内容维度
429
+ # @type Content: :class:`Tencentcloud::Ecc.v20181213.models.Aspect`
430
+ # @param Score: 维度得分
431
+ # @type Score: Float
432
+ # @param Percentage: 维度分数占比
433
+ # @type Percentage: Float
434
+
435
+ attr_accessor :Words, :Sentences, :Structure, :Content, :Score, :Percentage
436
+
437
+ def initialize(words=nil, sentences=nil, structure=nil, content=nil, score=nil, percentage=nil)
438
+ @Words = words
439
+ @Sentences = sentences
440
+ @Structure = structure
441
+ @Content = content
442
+ @Score = score
443
+ @Percentage = percentage
444
+ end
445
+
446
+ def deserialize(params)
447
+ unless params['Words'].nil?
448
+ @Words = Aspect.new
449
+ @Words.deserialize(params['Words'])
450
+ end
451
+ unless params['Sentences'].nil?
452
+ @Sentences = Aspect.new
453
+ @Sentences.deserialize(params['Sentences'])
454
+ end
455
+ unless params['Structure'].nil?
456
+ @Structure = Aspect.new
457
+ @Structure.deserialize(params['Structure'])
458
+ end
459
+ unless params['Content'].nil?
460
+ @Content = Aspect.new
461
+ @Content.deserialize(params['Content'])
462
+ end
463
+ @Score = params['Score']
464
+ @Percentage = params['Percentage']
465
+ end
466
+ end
467
+
468
+ # 批改结果按句点评的详细信息
469
+ class SentenceCom < TencentCloud::Common::AbstractModel
470
+ # @param Suggestions: 句子错误纠正信息
471
+ # @type Suggestions: Array
472
+ # @param Sentence: 句子信息
473
+ # @type Sentence: :class:`Tencentcloud::Ecc.v20181213.models.SentenceItem`
474
+
475
+ attr_accessor :Suggestions, :Sentence
476
+
477
+ def initialize(suggestions=nil, sentence=nil)
478
+ @Suggestions = suggestions
479
+ @Sentence = sentence
480
+ end
481
+
482
+ def deserialize(params)
483
+ unless params['Suggestions'].nil?
484
+ @Suggestions = []
485
+ params['Suggestions'].each do |i|
486
+ sentencesuggest_tmp = SentenceSuggest.new
487
+ sentencesuggest_tmp.deserialize(i)
488
+ @Suggestions << sentencesuggest_tmp
489
+ end
490
+ end
491
+ unless params['Sentence'].nil?
492
+ @Sentence = SentenceItem.new
493
+ @Sentence.deserialize(params['Sentence'])
494
+ end
495
+ end
496
+ end
497
+
498
+ # 句子的相关信息
499
+ class SentenceItem < TencentCloud::Common::AbstractModel
500
+ # @param Sentence: 英语句子
501
+ # @type Sentence: String
502
+ # @param ParaID: 段落id
503
+ # @type ParaID: Integer
504
+ # @param SentenceID: 句子id
505
+ # @type SentenceID: Integer
506
+
507
+ attr_accessor :Sentence, :ParaID, :SentenceID
508
+
509
+ def initialize(sentence=nil, paraid=nil, sentenceid=nil)
510
+ @Sentence = sentence
511
+ @ParaID = paraid
512
+ @SentenceID = sentenceid
513
+ end
514
+
515
+ def deserialize(params)
516
+ @Sentence = params['Sentence']
517
+ @ParaID = params['ParaID']
518
+ @SentenceID = params['SentenceID']
519
+ end
520
+ end
521
+
522
+ # 句子批阅建议
523
+ class SentenceSuggest < TencentCloud::Common::AbstractModel
524
+ # @param Type: 类型
525
+ # @type Type: String
526
+ # @param ErrorType: 错误类型
527
+ # @type ErrorType: String
528
+ # @param Origin: 原始单词
529
+ # @type Origin: String
530
+ # @param Replace: 替换成 的单词
531
+ # @type Replace: String
532
+ # @param Message: 提示信息
533
+ # @type Message: String
534
+ # @param ErrorPosition: 维度单词位置,在句子的第几个到第几个单词之间
535
+ # @type ErrorPosition: Array
536
+ # @param ErrorCoordinates: 维度单词坐标,错误单词在图片中的坐标,只有传图片时正常返回,传文字时返回[ ]
537
+ # @type ErrorCoordinates: Array
538
+
539
+ attr_accessor :Type, :ErrorType, :Origin, :Replace, :Message, :ErrorPosition, :ErrorCoordinates
540
+
541
+ def initialize(type=nil, errortype=nil, origin=nil, replace=nil, message=nil, errorposition=nil, errorcoordinates=nil)
542
+ @Type = type
543
+ @ErrorType = errortype
544
+ @Origin = origin
545
+ @Replace = replace
546
+ @Message = message
547
+ @ErrorPosition = errorposition
548
+ @ErrorCoordinates = errorcoordinates
549
+ end
550
+
551
+ def deserialize(params)
552
+ @Type = params['Type']
553
+ @ErrorType = params['ErrorType']
554
+ @Origin = params['Origin']
555
+ @Replace = params['Replace']
556
+ @Message = params['Message']
557
+ @ErrorPosition = params['ErrorPosition']
558
+ unless params['ErrorCoordinates'].nil?
559
+ @ErrorCoordinates = []
560
+ params['ErrorCoordinates'].each do |i|
561
+ errorcoordinate_tmp = ErrorCoordinate.new
562
+ errorcoordinate_tmp.deserialize(i)
563
+ @ErrorCoordinates << errorcoordinate_tmp
564
+ end
565
+ end
566
+ end
567
+ end
568
+
569
+ end
570
+ end
571
+ end
572
+
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tencentcloud-sdk-ecc
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.200
5
+ platform: ruby
6
+ authors:
7
+ - Tencent Cloud
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-11-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: tencentcloud-sdk-common
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
27
+ description: Tencent Cloud Ruby SDK is the official software development kit, which
28
+ allows Ruby developers to write software that makes use of Tencent Cloud service
29
+ ECC.
30
+ email:
31
+ - tencentcloudapi@tencent.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - lib/VERSION
37
+ - lib/tencentcloud-sdk-ecc.rb
38
+ - lib/v20181213/client.rb
39
+ - lib/v20181213/models.rb
40
+ homepage: https://github.com/TencentCloud/tencentcloud-sdk-ruby
41
+ licenses:
42
+ - Apache-2.0
43
+ metadata:
44
+ source_code_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/tencentcloud-sdk-ecc
45
+ changelog_uri: https://github.com/TencentCloud/tencentcloud-sdk-ruby/blob/master/CHANGELOG.md
46
+ post_install_message:
47
+ rdoc_options: []
48
+ require_paths:
49
+ - lib
50
+ required_ruby_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ requirements: []
61
+ rubyforge_project:
62
+ rubygems_version: 2.6.14
63
+ signing_key:
64
+ specification_version: 4
65
+ summary: Tencent Cloud SDK for Ruby - ECC
66
+ test_files: []