tencentcloud-sdk-ocr 3.0.1158 → 3.0.1159

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: 86fd2543c4c3013d887f87d9812645e178b8f403
4
- data.tar.gz: 02dbdf2741ac12538120cd25f441db7db95cf570
3
+ metadata.gz: 0838dff084aa9db23c7d8cb842ca6390512aa7a4
4
+ data.tar.gz: d9f21c375d4cd80d6b062772b0b693b51dde6f5b
5
5
  SHA512:
6
- metadata.gz: 9142af20094c9d8828b4690e0b7ab5ffa535269b534bf7fe19eb0509146bf55dcdbc355d49f95faec9d10e988ff2a48e582f87535433b75927f8de4ebc349aa9
7
- data.tar.gz: aba186389d6f666a7fa79bf635b6f2f061d816a18e044d5457c19d9a041a9b6af22c5d2a5983f3ca1b386a01a8cfc0cf135acac0254167eead0460ce2684bc6f
6
+ metadata.gz: 981a86e651c9144a9d8d9769f9b6bbe9ad42a5083ca1faba3f1507697758b965d3c6bab1515f7f609db47865fc94e880f63e66e34d86b45c9127ea07b80c0c8b
7
+ data.tar.gz: c4e40e8dc2d93781c29bab5f7fae77d37b1b9984d26bc54a03a3ea0c671f4a2166d680581bb4ccd31e989296bf5185db45f2ad11e1339cb1cb360577050c3230
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.1158
1
+ 3.0.1159
@@ -1589,6 +1589,32 @@ module TencentCloud
1589
1589
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1590
1590
  end
1591
1591
 
1592
+ # 试卷切题(仅检测)可将整页练习册、试卷或教辅中的题目进行自动切题,返回试题边框和题目元素的坐标位置。
1593
+
1594
+ # 默认接口请求频率限制:2次/秒。
1595
+
1596
+ # @param request: Request instance for QuestionSplitLayoutOCR.
1597
+ # @type request: :class:`Tencentcloud::ocr::V20181119::QuestionSplitLayoutOCRRequest`
1598
+ # @rtype: :class:`Tencentcloud::ocr::V20181119::QuestionSplitLayoutOCRResponse`
1599
+ def QuestionSplitLayoutOCR(request)
1600
+ body = send_request('QuestionSplitLayoutOCR', request.serialize)
1601
+ response = JSON.parse(body)
1602
+ if response['Response'].key?('Error') == false
1603
+ model = QuestionSplitLayoutOCRResponse.new
1604
+ model.deserialize(response['Response'])
1605
+ model
1606
+ else
1607
+ code = response['Response']['Error']['Code']
1608
+ message = response['Response']['Error']['Message']
1609
+ reqid = response['Response']['RequestId']
1610
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1611
+ end
1612
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1613
+ raise e
1614
+ rescue StandardError => e
1615
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1616
+ end
1617
+
1592
1618
  # 试卷切题识别可将整页练习册、试卷或教辅中的题目进行自动切题,并识别出其中的文字内容和坐标位置。
1593
1619
 
1594
1620
  # 默认接口请求频率限制:2次/秒。
@@ -8270,6 +8270,69 @@ module TencentCloud
8270
8270
  end
8271
8271
  end
8272
8272
 
8273
+ # QuestionSplitLayoutOCR请求参数结构体
8274
+ class QuestionSplitLayoutOCRRequest < TencentCloud::Common::AbstractModel
8275
+ # @param ImageUrl: 图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
8276
+ # @type ImageUrl: String
8277
+ # @param ImageBase64: 图片的 Base64 值。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经Base64编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
8278
+ # @type ImageBase64: String
8279
+ # @param IsPdf: 是否开启PDF识别,默认值为false,开启后可同时支持图片和PDF的识别。
8280
+ # @type IsPdf: Boolean
8281
+ # @param PdfPageNumber: 需要识别的PDF页面的对应页码,仅支持PDF单页识别,当上传文件为PDF且IsPdf参数值为true时有效,默认值为1。
8282
+ # @type PdfPageNumber: Integer
8283
+ # @param EnableImageCrop: 是否开启切边增强和弯曲矫正,默认为false不开启
8284
+ # @type EnableImageCrop: Boolean
8285
+ # @param UseNewModel: false: 使用当前默认模型 true: 使用新的多模态推理模型,速度更快推理效果更强,仅 `EnableOnlyDetectBorder` 为 `true` 时生效,公测中
8286
+ # @type UseNewModel: Boolean
8287
+
8288
+ attr_accessor :ImageUrl, :ImageBase64, :IsPdf, :PdfPageNumber, :EnableImageCrop, :UseNewModel
8289
+
8290
+ def initialize(imageurl=nil, imagebase64=nil, ispdf=nil, pdfpagenumber=nil, enableimagecrop=nil, usenewmodel=nil)
8291
+ @ImageUrl = imageurl
8292
+ @ImageBase64 = imagebase64
8293
+ @IsPdf = ispdf
8294
+ @PdfPageNumber = pdfpagenumber
8295
+ @EnableImageCrop = enableimagecrop
8296
+ @UseNewModel = usenewmodel
8297
+ end
8298
+
8299
+ def deserialize(params)
8300
+ @ImageUrl = params['ImageUrl']
8301
+ @ImageBase64 = params['ImageBase64']
8302
+ @IsPdf = params['IsPdf']
8303
+ @PdfPageNumber = params['PdfPageNumber']
8304
+ @EnableImageCrop = params['EnableImageCrop']
8305
+ @UseNewModel = params['UseNewModel']
8306
+ end
8307
+ end
8308
+
8309
+ # QuestionSplitLayoutOCR返回参数结构体
8310
+ class QuestionSplitLayoutOCRResponse < TencentCloud::Common::AbstractModel
8311
+ # @param QuestionInfo: 检测到的文本信息
8312
+ # @type QuestionInfo: Array
8313
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
8314
+ # @type RequestId: String
8315
+
8316
+ attr_accessor :QuestionInfo, :RequestId
8317
+
8318
+ def initialize(questioninfo=nil, requestid=nil)
8319
+ @QuestionInfo = questioninfo
8320
+ @RequestId = requestid
8321
+ end
8322
+
8323
+ def deserialize(params)
8324
+ unless params['QuestionInfo'].nil?
8325
+ @QuestionInfo = []
8326
+ params['QuestionInfo'].each do |i|
8327
+ questioninfo_tmp = QuestionInfo.new
8328
+ questioninfo_tmp.deserialize(i)
8329
+ @QuestionInfo << questioninfo_tmp
8330
+ end
8331
+ end
8332
+ @RequestId = params['RequestId']
8333
+ end
8334
+ end
8335
+
8273
8336
  # QuestionSplitOCR请求参数结构体
8274
8337
  class QuestionSplitOCRRequest < TencentCloud::Common::AbstractModel
8275
8338
  # @param ImageUrl: 图片的 Url 地址。支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。支持的图片大小:所下载图片经 Base64 编码后不超过 10M。图片下载时间不超过 3 秒。支持的图片像素:需介于20-10000px之间。图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。非腾讯云存储的 Url 速度和稳定性可能受一定影响。
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tencentcloud-sdk-ocr
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1158
4
+ version: 3.0.1159
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-10-21 00:00:00.000000000 Z
11
+ date: 2025-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tencentcloud-sdk-common